@charset "utf-8";

/**
 * 오공스탁 공지
 */

:root {
    --ogs-primary: var(--primary-red, #E12100);
    --ogs-text: #1A1A1A;
    --ogs-gray: #666666;
    --ogs-light-gray: #F8F9FA;
    --ogs-border: #EEEEEE;
}

.ogs-board {
    font-family: 'Pretendard', sans-serif;
    color: var(--ogs-text);
    margin: 40px 0;
}

/* Fix double scroll issue */
html, body { overflow-x: hidden; }
body.cke_auto_dark_mode { overflow: visible !important; }

/* Header */
.ogs-board-header {
    margin-bottom: 40px;
    text-align: left;
}

.ogs-board-header .title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 10px;
}

.ogs-board-header .desc {
    font-size: 16px;
    color: var(--ogs-gray);
}

/* List Table */
.ogs-list-table {
    width: 100%;
    border-collapse: collapse;
}

.ogs-list-table .no-data { padding: 100px 0; color: #999; }
.ogs-list-table .icon-secret { margin-left: 5px; opacity: 0.5; }

.ogs-list-table th {
    padding: 15px 10px;
    font-weight: 600;
    font-size: 15px;
    border-bottom: 1px solid var(--ogs-border);
    background: var(--ogs-light-gray);
}

.ogs-list-table td {
    padding: 18px 10px;
    border-bottom: 1px solid var(--ogs-border);
    text-align: center;
    font-size: 15px;
}

.ogs-list-table .title-col {
    text-align: left;
    padding-left: 20px;
}

.ogs-list-table .title-col a {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.ogs-list-table .title-col a:hover {
    color: var(--ogs-primary);
}

/* Notice Row */
.ogs-list-table tr.notice {
    background-color: rgba(225, 33, 0, 0.03);
}

.ogs-list-table tr.notice .title-col a {
    font-weight: 700;
}

.ogs-badge-notice {
    display: inline-block;
    padding: 2px 8px;
    background: var(--ogs-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 3px;
    margin-right: 8px;
    vertical-align: middle;
}

.pc-hidden { display: none; }

/* Read Page */
.ogs-read {
    border-top: 2px solid var(--ogs-text);
}

.ogs-read-header {
    padding: 30px 20px;
    border-bottom: 1px solid var(--ogs-border);
    background: var(--ogs-light-gray);
}

.ogs-read-header h1 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 15px;
}

.ogs-read-info {
    font-size: 14px;
    color: var(--ogs-gray);
}

.ogs-read-info span {
    margin-right: 20px;
}

.ogs-read-content {
    padding: 40px 20px;
    line-height: 1.8;
    font-size: 16px;
    min-height: 300px;
}

/* Buttons */
.ogs-btn-area {
    margin-top: 30px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
}

.ogs-btn-area .btns {
    display: flex;
    gap: 10px;
}

.ogs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    transition: 0.3s;
    cursor: pointer;
    border: 1px solid var(--ogs-border);
    background: #fff;
}

.ogs-btn:hover {
    background: var(--ogs-light-gray);
}

.ogs-btn-primary {
    background: var(--ogs-primary);
    color: #fff;
    border-color: var(--ogs-primary);
}

.ogs-btn-primary:hover {
    background: #c11c00;
    border-color: #c11c00;
}

/* Pagination */
.ogs-pagination {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.ogs-pagination a, .ogs-pagination strong {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 5px;
    border: 1px solid var(--ogs-border);
    font-size: 14px;
    color: var(--ogs-gray);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.ogs-pagination a:hover {
    border-color: var(--ogs-primary);
    color: var(--ogs-primary);
    background: rgba(var(--primary-red-rgb, 225, 33, 0), 0.05);
}

.ogs-pagination strong {
    background: var(--ogs-primary);
    color: #fff;
    border-color: var(--ogs-primary);
    font-weight: 700;
}

.ogs-pagination .direction {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
    padding: 0 12px;
}

/* Guest Fields */
.ogs-guest-fields-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.ogs-guest-password {
    margin-bottom: 0;
}

.ogs-guest-password .ogs-input {
    width: 200px;
}

.ogs-write-form .ogs-btn-area {
    justify-content: space-between;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .ogs-guest-fields-top {
        grid-template-columns: 1fr;
    }

    .ogs-write-form .ogs-btn-area {
        flex-direction: column;
        align-items: stretch;
    }

    .ogs-guest-password .ogs-input {
        width: 100%;
        margin-bottom: 10px;
    }

    .ogs-btn-area .btns {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .ogs-list-table thead { display: none; }
    .ogs-list-table tr { display: block; padding: 15px 5px; }
    .ogs-list-table td { display: block; text-align: left; padding: 5px 15px; border: none; }
    
    .ogs-list-table tr { 
        display: flex; 
        flex-direction: row; 
        flex-wrap: wrap; 
        border-bottom: 1px solid var(--ogs-border);
    }
    .ogs-list-table .num-col { display: none; }
    .ogs-list-table .title-col { 
        order: 1; 
        padding: 0 15px 5px 15px; 
        display: flex; 
        align-items: flex-start; 
        gap: 2px;
    }
    .ogs-list-table .title-col a { 
        font-size: 16px; 
        white-space: normal; 
        line-height: 1.4;
        margin-top: -1px; 
    }
    
    /* 모바일 정보 행 (날짜, 조회수) */
    .ogs-list-table td { display: block; width: 100%; }

    .ogs-list-table .date-col, .ogs-list-table .view-col { 
        display: inline-flex; 
        align-items: center; 
        order: 2; 
        padding: 0 15px;
        font-size: 13px; 
        color: var(--ogs-gray);
        height: 20px;
        line-height: 1;
        width: auto; 
    }
    
    .ogs-list-table .date-col { padding-right: 10px; }
    .ogs-list-table .view-col { 
        padding-left: 10px; 
        position: relative;
    }
    .ogs-list-table .view-col::before {
        content: "";
        display: block;
        width: 1px;
        height: 10px;
        background: var(--ogs-border);
        margin-right: 10px;
    }
    
    .ogs-list-table .title-col .pc-hidden { 
        display: inline-block !important; 
        margin-bottom: 0; 
        flex-shrink: 0;
        transform: translateY(1px); 
    }

    .ogs-read-header h1 { font-size: 20px; }
}

.ogs-view-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.ogs-view-item svg {
    opacity: 0.6;
}

/* NEW Icon & Comment Count */
.ogs-icon-new {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ogs-primary);
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
    line-height: 1;
    position: relative;
    top: 2px;
}

.ogs-comment-count {
    display: inline-block;
    color: var(--ogs-primary);
    font-size: 13px;
    font-weight: 700;
    margin-left: 6px;
    vertical-align: middle;
}
