/* Define color variables for light mode only */
:root {
    --border-color: #e5e7eb;
    /* gray-200 */
    --text-heading: #27272a;
    /* zinc-800 */
    --text-subheading: #71717a;
    /* zinc-500 */
    --button-bg: #ffffff;
    /* white */
    --button-bg-hover: #f4f4f5;
    /* zinc-50 */
    --button-text: #27272a;
    /* zinc-800 */
    --button-border: #e4e4e7;
    /* zinc-200 */
    --button-border-bottom: rgba(212, 212, 216, 0.8);
    /* zinc-300/80 */
    --shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --avatar-bg: #e4e4e7;
    /* zinc-200 */
    --avatar-text: #27272a;
    /* zinc-800 */
    --avatar-ring: rgba(0, 0, 0, 0.07);
    /* black/7 */
    --separator-bg: rgba(39, 39, 42, 0.15);
    /* zinc-800/15 */
}

/* Grid Container */
.grid-container {
    display: grid;
    grid-template-columns: 1fr;
    /* grid-cols-1 */
    gap: 1.5rem;
    /* gap-6 */
}

@media (min-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
        /* md:grid-cols-2 */
    }
}

@media (min-width: 1024px) {
    .grid-container {
        grid-template-columns: repeat(3, 1fr);
        /* lg:grid-cols-3 */
    }
}

/* Container (for the entire post preview) */
.post-preview {
    display: flex;

    flex-direction: row;
    align-items: center;
    gap: 1.5rem;

    margin-bottom: 1rem;
}

@media (width <=40rem) {
    .post-preview {

        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Author Info */
.author-info {
    flex: 2;
    min-width: 0;
}

/* Author Link */
.author-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.author-link:hover {
    text-decoration: underline;
}

/* Avatar */
[data-flux-avatar] {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    /* 1.5rem에서 25px로 변경 */
    height: 25px;
    /* 1.5rem에서 25px로 변경 */
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 500;
    background-color: #e4e4e7;
    /* avatar-bg */
    color: #27272a;
    /* avatar-text */
    border-radius: 0.25rem;
    overflow: hidden;
    /* 이미지가 div를 벗어나지 않도록 */
    min-width: 25px;
    /* 최소 가로 크기 */
    min-height: 25px;
    /* 최소 세로 크기 */
}

[data-flux-avatar]::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.07);
    /* avatar-ring */
    border-radius: 0.125rem;
}

[data-flux-avatar] img {
    width: 100%;
    /* 부모 div에 맞게 크기 조정 */
    height: 100%;
    /* 부모 div에 맞게 크기 조정 */
    border-radius: 0.25rem;
    /* 부모와 동일한 둥근 모서리 */
    object-fit: cover;
    /* 이미지가 잘 맞춰지도록 */
}

/* Username */
.author-link span {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

/* Post Link */
.post-link {
    display: block;
    margin-top: 0.5rem;
}

@media (min-width: 640px) {
    .post-link {
        margin-top: 0;
    }
}

/* Heading */
[data-flux-heading] {
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 500;
    color: var(--text-heading);
    margin-bottom: 0.5rem;
}


/* Detail Heading */
.detail-heading {
    font-size: 1.5rem;
    /* text-2xl */
    line-height: 2rem;
    font-weight: 500;
    /* font-medium */
    color: #27272a;
    /* text-zinc-800 */
    margin-bottom: 0;
    /* mb-0 */
}


/* Excerpt */
.post-excerpt {
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: var(--text-subheading);
    margin: 0.5rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Metadata Container */
.metadata {
    /* margin-bottom: 0.75rem; */
    display: flex;
    justify-content: space-between;
}

/* Metadata Text */
.metadata [data-flux-text] {
    font-size: 0.75rem;
    line-height: 1rem;
    color: var(--text-subheading);
}

/* Thumbnail Container */
.thumbnail {
    flex: 1;
    min-width: 8rem;
    /* 최소 너비 설정 */
    width: 100%;
    height: 12rem;
}

@media (width >=40rem) {
    .thumbnail {
        max-width: 8rem;
        height: 8rem;
        width: 8rem;
    }
}

/* Thumbnail Image */
.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Separator */
[data-flux-separator] {
    border: 0;
    background-color: var(--separator-bg);
    height: 1px;
    width: 100%;
    print-color-adjust: exact;
}

/* Container (for the top section) */
.container {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

@media (min-width: 640px) {
    .container {
        margin-bottom: 2rem;
    }
}

/* Button */
[data-flux-button] {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 2.5rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
    padding: 0 1rem;
    border-radius: 0.5rem;
    background-color: var(--button-bg);
    color: var(--button-text);
    border: 1px solid var(--button-border);
    border-bottom-color: var(--button-border-bottom);
    box-shadow: var(--shadow);
    white-space: nowrap;
    text-decoration: none;
}

[data-flux-button]:hover {
    background-color: var(--button-bg-hover);
    border-color: var(--button-border);
}

[data-flux-button]:disabled {
    opacity: 0.75;
    cursor: default;
    pointer-events: none;
}

/* Icon */
[data-flux-icon] {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.space-y-2 {
    margin-top: 16px;
}



/* Space-y (Vertical spacing between elements) */
.space-y-4 {
    margin-top: 0;
    /* 첫 번째 요소의 상단 마진 제거 */
}

.space-y-4>*+* {
    margin-top: 1rem;
    /* 자식 요소들 사이의 간격 1rem (16px) */
}

@media (min-width: 640px) {
    .space-y-4 {
        margin-top: 0;
    }

    .space-y-4>*+* {
        margin-top: 1.5rem;
        /* sm: 기준으로 간격 1.5rem (24px) */
    }
}



/* Card */
[data-flux-card] {
    background-color: #ffffff;
    /* bg-white */
    border: 1px solid #e4e4e7;
    /* border-zinc-200 */
    padding: 1.5rem;
    /* p-6 */
    border-radius: 0.75rem;
    /* rounded-xl */
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    /* transition-shadow */
}

[data-flux-card]:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    /* hover:shadow-lg */
}

/* Thumbnail Container */
[data-flux-card] .thumbnail {
    max-width: none;
    height: 15rem;
    /* max-width: 8rem;을 해제 */
    width: 100%;
}

[data-flux-card] .thumbnail img {
    width: 100%;
    height: 15rem;
    /* h-60 */
    object-fit: cover;
}

/* Card Content */
[data-flux-card] .card-content {
    padding: 1rem;
    /* p-4 */
}

/* Heading inside Card */
[data-flux-card] [data-flux-heading] {
    font-size: 1.25rem;
    /* text-base */
    line-height: 1.75rem;
    font-weight: 600;
    /* font-semibold */
    color: #27272a;
    /* text-gray-900 */
    margin-bottom: 0.5rem;
    /* mb-2 when followed by subheading */
}

/* Excerpt inside Card */
[data-flux-card] .card-content p {
    font-size: 0.875rem;
    /* text-sm */
    line-height: 1.25rem;
    color: #4b5563;
    /* text-gray-600 */
    margin-top: 0.5rem;
    /* mt-2 */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    /* line-clamp-3 */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Author and Metadata Container */
[data-flux-card] .card-content .metadata {
    margin-top: 1rem;
    margin-bottom: 1rem;
    /* mt-4 */
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* space-x-2 */
}

/* Author Link inside Card */
[data-flux-card] .author-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

[data-flux-card] .author-link:hover {
    text-decoration: underline;
}

/* Author Name */
[data-flux-card] .metadata .author-link span {
    font-size: 0.8rem;
    /* text-sm */
    font-weight: 500;
    /* font-medium */
    color: #27272a;
    /* text-gray-900 */
}

/* Metadata Text */
[data-flux-card] .metadata span.text-sm {
    font-size: 0.8rem;
    /* text-sm */
    color: #6b7280;
    /* text-gray-500 */
}

.about-wrap.counsel .entry li:nth-child(1) {
    float: left;
    width: 100%;
}

.about-wrap.counsel .entry li:nth-child(2) {
    margin-top: 12px;
    float: left;
    width: 100%;
    position: relative;
    z-index: 1;
}


/* Preview Container */
.preview-container {

    margin-top: 1rem;
    max-width: 100%;
    /* 부모 컨테이너에 맞게 최대 너비 제한 */
    overflow: hidden;
    /* 이미지가 영역을 넘지 않도록 */
}

.preview-image {
    width: 100%;
    /* 부모 크기에 맞게 조정 */
    max-height: 12rem;
    /* 적당한 최대 높이 설정 (조정 가능) */
    object-fit: contain;
    /* 비율 유지하며 영역에 맞게 조정 */
    border-radius: 0.25rem;
    /* 둥근 모서리 추가 (선택 사항) */
}


/* Detail Card */
.detail-card {
    background-color: #ffffff;
    /* bg-white */
    background-color: #ffffff;
    /* bg-white */
    border-radius: 0.75rem;
    /* rounded-lg */
    padding: 1.5rem;
    /* p-6 */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    /* shadow */
    overflow: hidden;
}

.detail-heading {
    font-size: 1.5rem;
    /* text-2xl */
    line-height: 2rem;
    font-weight: 500;
    /* font-medium */
    color: #27272a;
    /* text-zinc-800 */
    margin-bottom: 0;
    /* mb-0 */
}

.author-metadata {
    display: flex;
    align-items: center;
    /* items-center */
    gap: 1rem;
    /* gap-4 */
    margin-top: 1rem;
    /* my-4 */
    margin-bottom: 1rem;
}

.author-metadata .author-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* gap-2 */
    text-decoration: none;
}

.author-metadata .author-link:hover {
    text-decoration: underline;
}

.author-metadata .metadata-text {
    display: flex;
    flex-direction: column;
    /* flex-col */
    gap: 0.25rem;
    /* gap-1 */
}

@media (min-width: 640px) {
    .author-metadata .metadata-text {
        flex-direction: row;
        /* sm:flex-row */
        align-items: center;
        /* sm:items-center */
        gap: 0.5rem;
        /* sm:gap-2 */
    }

    .author-metadata .metadata-text span.sm:before {
        content: '|';
        /* sm:before:content-['|'] */
        margin-left: 0.5rem;
        /* sm:before:mx-2 */
        margin-right: 0.5rem;
    }
}

.author-metadata .metadata-text span {
    font-size: 0.75rem;
    /* text-xs */
    color: #6b7280;
    /* text-gray-500 */
}

.tags {
    font-size: 0.75rem;
    /* text-xs */
    color: #6b7280;
    /* text-gray-500 */
    margin-bottom: 1rem;
    /* mb-4 */
}

.thumbnail-detail {
    margin-bottom: 1.5rem;
    /* mb-6 */
}

.thumbnail-detail img {
    margin-left: auto;
    /* mx-auto */
    margin-right: auto;
    width: 100%;
    /* w-full */
    max-width: 80rem;
    /* sm:max-w-5xl */
    height: auto;
    /* h-auto */
    object-fit: contain;
    /* object-contain */
    border-radius: 0.5rem;
    /* rounded-lg */
}

.detail-content {
    font-size: 0.875rem;
    /* text-sm */
    line-height: 1.5rem;
    color: #71717a;
    /* text-zinc-500 */
    margin-bottom: 1.5rem;
    /* mb-6 */
    white-space: pre-wrap;
    /* whitespace-pre-wrap */
}

.button-group {
    display: flex;
    flex-direction: column;
    /* flex-col */
    gap: 1rem;
    /* gap-4 */
    margin-bottom: 1.5rem;
    /* mb-6 */
}

@media (min-width: 640px) {
    .button-group {
        flex-direction: row;
        /* sm:flex-row */
    }
}

[data-flux-button].delete-button {
    background-color: #ef4444;
    /* bg-red-500 */
    color: #ffffff;
    /* text-white */
    border: none;
}

[data-flux-button].delete-button:hover {
    background-color: #dc2626;
    /* hover:bg-red-600 */
}

[data-flux-button].comment-button {
    background-color: var(--button-bg);
    /* bg-[var(--color-accent)] */
    color: var(--button-text);
    /* text-[var(--color-accent-foreground)] */
    border: 1px solid rgba(0, 0, 0, 0.1);
    /* border-black/10 */
}

[data-flux-button].comment-button:hover {
    background-color: #f4f4f5;
    /* hover:bg-[color-mix(in_oklab,_var(--color-accent),_transparent_10%)] */
}

.comment-section {
    margin-bottom: 1.5rem;
    /* mb-6 */
}

.comment-form textarea {
    width: 98%;
    /* w-full */
    padding: 0.75rem;
    /* p-3 */
    border-radius: 0.5rem;
    /* rounded-lg */
    border: 1px solid #e4e4e7;
    /* border-zinc-200 */
    border-bottom-color: rgba(212, 212, 216, 0.8);
    /* border-b-zinc-300/80 */
    background-color: #ffffff;
    /* bg-white */
    resize: vertical;
    /* resize-y */
    font-size: 0.875rem;
    /* text-base sm:text-sm */
    color: #27272a;
    /* text-zinc-700 */
}

.comment-form textarea:disabled {
    background-color: rgba(255, 255, 255, 0.1);
    /* disabled:bg-white/[7%] */
    color: #a1a1aa;
    /* disabled:text-zinc-500 */
}

.comment-form textarea::placeholder {
    color: #a1a1aa;
    /* placeholder-zinc-400 */
}

.comment-form .comment-label {
    font-size: 0.875rem;
    /* text-sm */
    font-weight: 500;
    /* font-medium */
    color: #27272a;
    /* text-zinc-800 */
    margin-bottom: 0.5rem;
    /* mb-2 */
}

.comment-item {
    border-top: 1px solid #e5e7eb;
    /* border-t border-gray-200 */
    padding-top: 1rem;
    /* pt-4 */
}

.comment-item .comment-content {
    background-color: #f3f4f6;
    /* bg-gray-100 */
    padding: 1rem;
    /* p-4 */
    border-radius: 0.5rem;
    /* rounded-lg */
}

.comment-item .comment-header {
    display: flex;
    align-items: center;
    /* items-center */
    gap: 0.5rem;
    /* gap-2 */
    margin-bottom: 0.5rem;
    /* mb-2 */
}

.comment-item .comment-actions {
    display: flex;
    gap: 0.5rem;
    /* gap-2 */
    margin-top: 0.5rem;
    /* mt-2 */
}

.comment-item .comment-reply {
    margin-left: 1rem;
    /* ml-4 */
}

.comment-item .ml-4 {
    margin-left: 1rem;
    /* ml-4 */
}


.comment-item [data-flux-button] {
    height: 2rem;
    /* h-8 */
    padding: 0 0.75rem;
    /* px-3 */
    border-radius: 0.375rem;
    /* rounded-md */
}

.comment-item [data-flux-button]:hover {
    background-color: rgba(0, 0, 0, 0.05);
    /* hover:bg-zinc-800/5 */
}


/* Reply Form */
.reply-form {
    margin-left: 1rem;
    /* ml-4 */
}

.reply-form textarea {
    width: 98%;
    /* w-full */
    padding: 0.75rem;
    /* p-3 */
    border-radius: 0.5rem;
    /* rounded-lg */
    border: 1px solid #e4e4e7;
    /* border-zinc-200 */
    border-bottom-color: rgba(212, 212, 216, 0.8);
    /* border-b-zinc-300/80 */
    background-color: #ffffff;
    /* bg-white */
    resize: vertical;
    /* resize-y */
    font-size: 0.875rem;
    /* text-base sm:text-sm */
    color: #27272a;
    /* text-zinc-700 */
    margin-top: 0.5rem;
    /* mt-2 */
}

.reply-form textarea:disabled {
    background-color: rgba(255, 255, 255, 0.1);
    /* disabled:bg-white/[7%] */
    color: #a1a1aa;
    /* disabled:text-zinc-500 */
}

.reply-form textarea::placeholder {
    color: #a1a1aa;
    /* placeholder-zinc-400 */
}

.reply-form .button-group {
    display: flex;
    gap: 0.5rem;
    /* gap-2 */
    margin-top: 0.5rem;
    /* mt-2 */
}

.reply-form [data-flux-button].reply-submit {
    background-color: var(--button-bg);
    /* bg-[var(--color-accent)] */
    color: var(--button-text);
    /* text-[var(--color-accent-foreground)] */
    border: 1px solid rgba(0, 0, 0, 0.1);
    /* border-black/10 */
    height: 2rem;
    /* h-8 */
    padding: 0 0.75rem;
    /* px-3 */
    border-radius: 0.375rem;
    /* rounded-md */
}

.reply-form [data-flux-button].reply-submit:hover {
    background-color: #f4f4f5;
    /* hover:bg-[color-mix(in_oklab,_var(--color-accent),_transparent_10%)] */
}

.reply-form [data-flux-button].reply-cancel {
    background-color: transparent;
    /* bg-transparent */
    color: #27272a;
    /* text-zinc-800 */
    height: 2rem;
    /* h-8 */
    padding: 0 0.75rem;
    /* px-3 */
    border-radius: 0.375rem;
    /* rounded-md */
}

.reply-form [data-flux-button].reply-cancel:hover {
    background-color: rgba(0, 0, 0, 0.05);
    /* hover:bg-zinc-800/5 */
}