/* ==========================================================================
   Codejaka List Board Skin - Custom Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   Wrapper
   -------------------------------------------------------------------------- */
.board-codejaka-list {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* --------------------------------------------------------------------------
   Category Nav
   -------------------------------------------------------------------------- */
.cjl-category-nav {
    gap: 0.25rem;
}

.cjl-category-nav .nav-link {
    border-radius: 2rem;
    padding: 0.3rem 0.85rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #677788;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.cjl-category-nav .nav-link:hover {
    color: #377dff;
    background-color: rgba(55, 125, 255, 0.06);
    border-color: rgba(55, 125, 255, 0.15);
}

.cjl-category-nav .nav-link.active {
    color: #fff;
    background-color: #377dff;
    border-color: #377dff;
}

/* --------------------------------------------------------------------------
   Read Below: List Section
   -------------------------------------------------------------------------- */
.cjl-list-below-read {
    margin-top: 2rem;
    padding: 1.25rem 1.25rem 1.5rem;
    background: #f8fafd;
    border: 1px solid #e7eaf3;
    border-radius: 0.75rem;
}

.cjl-list-section-head {
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e7eaf3;
}

.cjl-list-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e2022;
    margin: 0;
    letter-spacing: -0.02em;
}

.cjl-list-section-desc {
    font-size: 0.8125rem;
    color: #8c98a4;
    margin: 0.35rem 0 0;
    line-height: 1.4;
}

@media (max-width: 575.98px) {
    .cjl-list-below-read {
        margin-top: 1.5rem;
        padding: 1rem 0.875rem 1.25rem;
    }
}

/* --------------------------------------------------------------------------
   Table List
   -------------------------------------------------------------------------- */
.cjl-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    color: #1e2022;
}

.cjl-table thead th {
    padding: 0.625rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #8c98a4;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 2px solid #e7eaf3;
    background: #f8fafd;
    white-space: nowrap;
}

.cjl-table thead th a {
    color: inherit;
    text-decoration: none;
}

.cjl-table thead th a:hover {
    color: #377dff;
}

.cjl-table tbody tr {
    border-bottom: 1px solid #f0f2f5;
    transition: background 0.15s ease;
}

.cjl-table tbody tr:last-child {
    border-bottom: none;
}

.cjl-table tbody tr:hover {
    background: #f8fafd;
}

.cjl-table td {
    padding: 0.625rem 0.75rem;
    vertical-align: middle;
}

/* Column widths */
.cjl-th-no { width: 60px; text-align: center; }
.cjl-th-title { min-width: 200px; }
.cjl-th-author { width: 100px; }
.cjl-th-date { width: 100px; text-align: center; }
.cjl-th-num { width: 70px; text-align: center; }
.cjl-th-extra { width: 120px; text-align: center; }

.cjl-td-no { text-align: center; color: #8c98a4; font-size: 0.8125rem; }
.cjl-td-author { font-size: 0.8125rem; color: #677788; }
.cjl-td-author a { color: inherit; text-decoration: none; }
.cjl-td-author a:hover { color: #377dff; }
.cjl-td-date { text-align: center; font-size: 0.8125rem; color: #8c98a4; }
.cjl-td-num { text-align: center; font-size: 0.8125rem; color: #8c98a4; }
.cjl-td-extra { text-align: center; font-size: 0.8125rem; color: #677788; }

/* Title cell */
.cjl-td-title {
    font-weight: 500;
}

.cjl-row-title-link {
    color: #1e2022;
    text-decoration: none;
}

.cjl-row-title-link:hover {
    color: #377dff;
}

.cjl-row-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    color: #377dff;
    background: rgba(55, 125, 255, 0.08);
    padding: 0.1rem 0.4rem;
    border-radius: 0.25rem;
    margin-right: 0.35rem;
    text-decoration: none;
    vertical-align: middle;
}

.cjl-row-category:hover {
    background: rgba(55, 125, 255, 0.15);
    color: #377dff;
}

.cjl-comment-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: #377dff;
    margin-left: 0.25rem;
}

.cjl-secret-icon {
    color: #8c98a4;
    font-size: 0.8125rem;
    margin-right: 0.15rem;
}

.cjl-cart-check {
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* Notice row */
.cjl-row-notice {
    background: #fffdf6;
}

.cjl-row-notice:hover {
    background: #fefbee;
}

.cjl-row-notice .cjl-td-no .badge {
    font-size: 0.65rem;
    font-weight: 600;
}

/* Secret row */
.cjl-row-secret {
    opacity: 0.7;
}

/* New badge */
.cjl-td-title .icon_new_article {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #de4437;
    border-radius: 50%;
    margin-left: 0.25rem;
    vertical-align: middle;
}

/* --------------------------------------------------------------------------
   Empty State
   -------------------------------------------------------------------------- */
.cjl-empty {
    padding: 3rem 1rem;
}

.cjl-empty-icon {
    font-size: 3rem;
    color: #d0d5e0;
}

/* --------------------------------------------------------------------------
   Read (Detail View)
   -------------------------------------------------------------------------- */
.cjl-read {
    background: #fff;
    border-radius: 0.75rem;
    padding: 2rem;
    border: 1px solid #e7eaf3;
}

.cjl-read-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e2022;
    line-height: 1.4;
}

.cjl-read-title a {
    color: inherit;
    text-decoration: none;
}

.cjl-read-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: #8c98a4;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e7eaf3;
}

.cjl-read-info a {
    color: inherit;
    text-decoration: none;
}

.cjl-read-extra {
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: #f8fafd;
    border-radius: 0.5rem;
    border: 1px solid #eef2f7;
}

.cjl-read-extra-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
    margin: 0;
}

.cjl-read-extra-item {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    min-width: 0;
}

.cjl-read-extra-item dt {
    flex-shrink: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #8c98a4;
    white-space: nowrap;
}

.cjl-read-extra-item dd {
    margin: 0;
    font-size: 0.875rem;
    color: #1e2022;
    word-break: break-word;
}

.cjl-read-content {
    line-height: 1.8;
    color: #1e2022;
}

.cjl-read-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

.cjl-read-footer {
    padding-top: 1.5rem;
    border-top: 1px solid #e7eaf3;
    margin-top: 1.5rem;
}

.cjl-read-footer .btn-sm {
    font-size: 0.8125rem;
}

.cjl-secret-form p {
    color: #677788;
}

.cjl-password-input {
    max-width: 200px;
}

/* --------------------------------------------------------------------------
   File List
   -------------------------------------------------------------------------- */
.cjl-file-list a {
    color: #377dff;
    text-decoration: none;
}

.cjl-file-list a:hover {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Comments
   -------------------------------------------------------------------------- */
.cjl-comments-section {
    margin-top: 1.5rem;
}

.cjl-comments-card {
    background: #fff;
    border: 1px solid #e7eaf3;
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
}

.cjl-comments-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1e2022;
    margin: 0 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f0f2f5;
}

.cjl-comments-count {
    font-weight: 700;
    color: #377dff;
}

.cjl-comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cjl-comment-item {
    padding: 0.875rem 0;
    border-bottom: 1px solid #f0f2f5;
}

.cjl-comment-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.cjl-comment-inner {
    padding-inline-start: calc(var(--comment-depth, 0) * 1.25rem);
}

.cjl-comment-inner[data-depth]:not([data-depth="0"]) {
    border-inline-start: 2px solid #e2e5ec;
    padding-inline-start: calc(var(--comment-depth, 0) * 1.25rem + 0.75rem);
}

.cjl-comment-head {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.5rem;
}

.cjl-comment-avatar-wrap {
    flex-shrink: 0;
}

.cjl-comment-avatar,
.cjl-comment-avatar-fallback {
    width: 2rem;
    height: 2rem;
    object-fit: cover;
}

.cjl-comment-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(55, 125, 255, 0.1);
    color: #377dff;
    font-weight: 600;
    font-size: 0.8125rem;
}

.cjl-comment-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    min-width: 0;
}

.cjl-comment-author {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1e2022;
}

.cjl-comment-author a {
    color: inherit;
    text-decoration: none;
}

.cjl-comment-author a:hover {
    color: #377dff;
}

.cjl-comment-date {
    font-size: 0.75rem;
    color: #97a4af;
}

.cjl-comment-secret-badge {
    font-size: 0.6875rem;
    padding: 0.15em 0.4em;
}

.cjl-comment-body {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #1e2022;
}

.cjl-comment-body p:first-child { margin-top: 0; }
.cjl-comment-body p:last-child { margin-bottom: 0; }

.cjl-comment-actions {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    margin-top: 0.375rem;
}

.cjl-comment-act {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.75rem;
    color: #97a4af;
    text-decoration: none;
    padding: 0.15rem 0.35rem;
    border-radius: 0.25rem;
    transition: color 0.15s, background 0.15s;
}

.cjl-comment-act:hover {
    color: #377dff;
    background: rgba(55, 125, 255, 0.06);
}

.cjl-comment-act--active {
    color: #377dff;
}

.cjl-comment-act--active-danger {
    color: #de4437;
}

.cjl-comment-pagination .pagination {
    gap: 0.2rem;
}

.cjl-comment-pagination .page-link {
    border: none;
    border-radius: 0.375rem;
    padding: 0.25rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #677788;
    background: transparent;
    min-width: 1.6rem;
    text-align: center;
}

.cjl-comment-pagination .page-link:hover {
    color: #377dff;
    background-color: rgba(55, 125, 255, 0.06);
}

.cjl-comment-pagination .page-item.active .page-link {
    color: #fff;
    background-color: #377dff;
    border-radius: 0.375rem;
}

.cjl-comment-pagination .page-item.disabled .page-link {
    color: #c1c7d0;
}

/* Comment Write Form */
.cjl-comment-write {
    border-top: 1px solid #f0f2f5;
    padding-top: 1rem;
}

.cjl-comment-write-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1e2022;
    margin: 0 0 0.625rem;
}

.cjl-comment-editor-wrap {
    margin-bottom: 0.75rem;
}

.cjl-comment-write-options {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.cjl-comment-write-options .form-label {
    font-size: 0.75rem;
    color: #677788;
    margin-bottom: 0.2rem;
}

.cjl-comment-write-options .form-control {
    max-width: 140px;
}

.cjl-comment-write-options .form-check-label {
    font-size: 0.8125rem;
}

.cjl-comment-write-submit {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.cjl-comment-write-submit .btn {
    font-size: 0.8125rem;
    padding: 0.375rem 1rem;
}

/* --------------------------------------------------------------------------
   Footer: toolbar (search + actions) + pagination
   -------------------------------------------------------------------------- */
.cjl-footer {
    padding-bottom: 1rem;
}

.cjl-footer-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.cjl-search-form {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem;
}

.cjl-search-select {
    width: auto;
    min-width: 100px;
    flex-shrink: 0;
}

.cjl-search-input-group {
    min-width: 0;
    flex: 1 1 auto;
    max-width: 240px;
}

.cjl-search-input-group .form-control {
    min-width: 0;
}

.cjl-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.cjl-footer .btn-outline-secondary {
    border-color: #d0d5e0;
    color: #677788;
}

.cjl-footer .btn-outline-secondary:hover {
    border-color: #377dff;
    color: #377dff;
    background-color: rgba(55, 125, 255, 0.04);
}

/* Pagination */
.cjl-pagination {
    display: flex;
    justify-content: center;
    margin-top: 1.25rem;
}

.cjl-pagination .pagination {
    gap: 0.25rem;
}

.cjl-pagination .page-link {
    border: none;
    border-radius: 0.375rem;
    padding: 0.35rem 0.7rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #677788;
    background: transparent;
    transition: all 0.15s ease;
    min-width: 2rem;
    text-align: center;
}

.cjl-pagination .page-link:hover {
    color: #377dff;
    background-color: rgba(55, 125, 255, 0.06);
}

.cjl-pagination .page-item.active .page-link {
    color: #fff;
    background-color: #377dff;
    border-radius: 0.375rem;
    min-width: 2rem;
}

.cjl-pagination .page-item.disabled .page-link {
    color: #c1c7d0;
    background: transparent;
}

/* --------------------------------------------------------------------------
   Write Form
   -------------------------------------------------------------------------- */
.cjl-write {
    background: #fff;
    border: 1px solid #e7eaf3;
    border-radius: 0.75rem;
    padding: 1.75rem;
}

@media (max-width: 767.98px) {
    .cjl-write {
        padding: 1.25rem 1rem;
    }
}

.cjl-write-header {
    margin-bottom: 1.25rem;
}

.cjl-write-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
}

.cjl-write-selects {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex: 0 0 auto;
    align-items: center;
}

.cjl-write-selects:empty {
    display: none;
}

.cjl-write-title-wrap {
    flex: 1 1 12rem;
    min-width: 0;
}

.cjl-write-title-row .cjl-write-category,
.cjl-write-title-row .cjl-write-notice-select,
.cjl-write-title-row .cjl-write-title {
    min-height: 2.875rem;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.5rem;
    box-sizing: border-box;
}

.cjl-write-title-row .cjl-write-category,
.cjl-write-title-row .cjl-write-notice-select {
    width: auto;
    min-width: 7rem;
    max-width: 11rem;
    padding-right: 2.25rem;
}

.cjl-write-title-row .cjl-write-title {
    font-weight: 600;
    width: 100%;
}

.cjl-write-title:focus {
    border-color: #377dff;
    box-shadow: 0 0 0 0.2rem rgba(55, 125, 255, 0.15);
}

@media (max-width: 575.98px) {
    .cjl-write-title-row {
        flex-direction: column;
        align-items: stretch;
    }

    .cjl-write-selects {
        max-width: 100%;
    }

    .cjl-write-category,
    .cjl-write-notice-select {
        max-width: none;
        flex: 1 1 auto;
    }
}

.cjl-write-extra {
    margin-bottom: 1.25rem;
}

.cjl-write-extra .table {
    font-size: 0.8125rem;
}

.cjl-write-extra .table th {
    background: #f8fafd;
    font-weight: 600;
    white-space: nowrap;
    width: 1%;
    vertical-align: middle;
}

.cjl-write-caption {
    font-size: 0.75rem;
    color: #8c98a4;
}

.cjl-write-caption em {
    color: #de4437;
    font-style: normal;
}

.cjl-write-editor {
    margin-bottom: 1.25rem;
}

.cjl-write-options {
    padding: 0.75rem 0;
    border-top: 1px solid #f0f0f0;
    margin-bottom: 1rem;
}

.cjl-write-checks {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.75rem;
}

.cjl-write-checks .form-check-label {
    font-size: 0.8125rem;
    color: #677788;
}

.cjl-write-fields {
    margin-bottom: 1rem;
}

.cjl-write-fields .form-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #677788;
    margin-bottom: 0.25rem;
}

.cjl-write-fields .form-control-sm {
    min-width: 120px;
}

.cjl-write-tag-inline {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
}

.cjl-write-tag-inline .form-label {
    flex-shrink: 0;
    margin-bottom: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #677788;
}

.cjl-write-tag-inline .form-control {
    flex: 1 1 auto;
    min-width: 0;
}

@media (max-width: 575.98px) {
    .cjl-write-tag-inline {
        flex-wrap: wrap;
    }

    .cjl-write-tag-inline .form-control {
        width: 100%;
    }
}

.cjl-write-captcha {
    margin-bottom: 1rem;
}

.cjl-write-submit {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.cjl-write-submit .btn-primary {
    min-width: 6rem;
}

/* --------------------------------------------------------------------------
   Delete Confirm
   -------------------------------------------------------------------------- */
.cjl-delete {
    max-width: 32rem;
    margin: 0 auto;
}

.cjl-delete-preview {
    background: #fff;
    border: 1px solid #e7eaf3;
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

.cjl-delete-preview-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: #1e2022;
    line-height: 1.4;
}

.cjl-delete-preview-meta {
    margin: 0;
    font-size: 0.875rem;
    color: #8c98a4;
}

.cjl-delete-preview-author {
    font-size: 0.875rem;
    font-weight: 600;
    color: #677788;
    margin: 0;
}

.cjl-delete-preview--comment .cjl-delete-comment-body {
    font-size: 0.9375rem;
    line-height: 1.55;
    color: #1e2022;
    max-height: 14rem;
    overflow: auto;
    padding: 0.75rem;
    background: #f8fafd;
    border-radius: 0.5rem;
    border: 1px solid #eef2f7;
}

.cjl-delete-preview--comment .cjl-delete-comment-body p:first-child { margin-top: 0; }
.cjl-delete-preview--comment .cjl-delete-comment-body p:last-child { margin-bottom: 0; }

.cjl-delete-form {
    background: #fff;
    border: 1px solid #e7eaf3;
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.cjl-delete-lead {
    font-size: 1rem;
    font-weight: 600;
    color: #1e2022;
    margin: 0 0 1.25rem;
    line-height: 1.55;
}

.cjl-delete-options {
    margin: -0.25rem 0 1.25rem;
}

.cjl-delete-options .form-check-label {
    font-size: 0.8125rem;
    color: #677788;
}

.cjl-delete-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
}

.cjl-delete-actions .btn-danger {
    min-width: 4.5rem;
}

.cjl-delete-actions .btn-outline-secondary {
    border-color: #d0d5e0;
    color: #677788;
}

.cjl-delete-actions .btn-outline-secondary:hover {
    border-color: #377dff;
    color: #377dff;
    background-color: rgba(55, 125, 255, 0.04);
}

/* --------------------------------------------------------------------------
   Tag List
   -------------------------------------------------------------------------- */
.board-codejaka-list .tagList .rank1 { font-size: 1.5rem; font-weight: 700; }
.board-codejaka-list .tagList .rank2 { font-size: 1.25rem; font-weight: 600; }
.board-codejaka-list .tagList .rank3 { font-size: 1.125rem; font-weight: 500; }
.board-codejaka-list .tagList .rank4 { font-size: 1rem; }
.board-codejaka-list .tagList .rank5 { font-size: 0.875rem; color: #8c98a4; }

.board-codejaka-list .tagList a {
    display: inline-block;
    margin: 0.25rem 0.5rem;
    text-decoration: none;
    color: #1e2022;
    transition: color 0.2s ease;
}

.board-codejaka-list .tagList a:hover {
    color: #377dff;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    .cjl-read {
        padding: 1.25rem;
    }

    .cjl-read-title {
        font-size: 1.25rem;
    }

    .cjl-footer-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .cjl-actions {
        justify-content: flex-end;
    }

    .cjl-search-input-group {
        max-width: 100%;
    }

    /* Mobile: make table responsive */
    .cjl-board-list {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .cjl-table {
        min-width: 600px;
    }
}
