/**
 * board_term/css/view.css
 * Term Detail View Page Styles
 * Mobile First + Single Breakpoint (768px)
 * 
 * Note: Common styles (share popup, media wrappers, buttons) 
 *       are defined in /css/board_common.css
 */

/* ============================================
   Term Header
   ============================================ */
.term-header {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #ddd;
}

.term-title-ko {
    font-size: 1.5rem;
    font-weight: bold;
    color: #111;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.term-title-en {
    font-size: 1.1rem;
    color: #555;
    font-weight: 500;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.term-abbreviation {
    font-size: 0.85rem;
    color: #777;
    margin-top: 0.5rem;
}

.term-abbreviation .abbr-ko,
.term-abbreviation .abbr-en {
    display: inline-block;
    background: #f0f0f0;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    margin-right: 0.5rem;
    font-size: 0.85rem;
}

/* ============================================
   Tab System
   ============================================ */
.term-tab {
    overflow: hidden;
    border: 1px solid #ddd;
    background-color: #f1f1f1;
    border-radius: 4px 4px 0 0;
    margin-top: 1.5rem;
    display: flex;
}

.term-tablinks {
    background-color: inherit;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 12px 10px;
    transition: background-color 0.3s;
    font-size: 0.9rem;
    font-weight: 500;
    flex: 1;
    text-align: center;
}

.term-tablinks:hover {
    background-color: #ddd;
}

.term-tablinks.active {
    background-color: #667eea;
    color: white;
}

.term-tabcontent {
    display: none;
    padding: 1rem;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    background: white;
    min-height: 150px;
}

.content {
    white-space: normal;
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* ============================================
   Re-search Box
   ============================================ */
.re-search-box {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.re-search-box label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #333;
}

.re-search-input-wrap {
    display: flex;
    gap: 0.5rem;
}

.re-search-input-wrap input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.re-search-input-wrap .btn {
    padding: 0.8rem 1rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* ============================================
   Action Buttons Layout
   ============================================ */
.post-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 1.5rem 0;
    position: relative;
}

.download-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.btn-group-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin: 1.5rem 0;
}

/* ============================================
   Post Image
   ============================================ */
.post-img {
    max-width: 100%;
    width: auto;
    max-height: 400px;
    height: auto;
    cursor: pointer;
    display: block;
    margin: 0 auto 1rem;
    border-radius: 5px;
}

/* ============================================
   Slider
   ============================================ */
.paper-slideshow-container,
.paper-slideshow-container * {
    box-sizing: border-box;
}

.paper-slideshow-container {
    max-width: 100%;
    width: 100%;
    position: relative;
    margin: 10px 0;
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
}

.paper-slider-track {
    display: flex;
    transition: transform 0.3s ease-out;
    cursor: grab;
}

.paper-slider-track:active {
    cursor: grabbing;
}

.paper-slide {
    min-width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
}

.paper-slide img {
    width: 100%;
    height: auto;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    cursor: pointer;
}

.paper-slide img:active {
    cursor: grabbing;
}

.paper-slide-number {
    position: absolute;
    top: 10px;
    left: 10px;
    color: #f2f2f2;
    font-size: 10px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 3px;
    z-index: 2;
}

.paper-slide-caption {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    color: #f2f2f2;
    font-size: 12px;
    padding: 6px 10px;
    text-align: center;
    background: rgba(0, 0, 0, 0.6);
}

.paper-slider-dots {
    text-align: center;
    padding: 10px 0;
}

.paper-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 0 3px;
    background-color: #bbb;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.paper-dot.active {
    background-color: #667eea;
    transform: scale(1.2);
}

.paper-dot:hover {
    background-color: #717171;
}

/* ============================================
   Desktop Styles (min-width: 768px)
   ============================================ */
@media (min-width: 768px) {
    .term-header {
        margin-top: 1.5rem;
    }

    /* Term Header */
    .term-title-ko {
        font-size: 1.8rem;
    }

    .term-title-en {
        font-size: 1.3rem;
    }

    .term-abbreviation {
        font-size: 0.9rem;
    }

    /* Tab System */
    .term-tablinks {
        font-size: 1rem;
        padding: 14px 16px;
    }

    .term-tabcontent {
        padding: 1.5rem;
        min-height: 200px;
    }

    /* Action Buttons */
    .post-actions {
        flex-direction: row;
        justify-content: center;
    }

    .btn-group-bottom {
        gap: 1rem;
    }

    /* Image */
    .post-img {
        max-height: 600px;
    }

    /* Slider */
    .paper-slideshow-container {
        max-width: 1000px;
        margin: 20px auto;
    }

    .paper-slide-number {
        font-size: 12px;
        padding: 6px 10px;
    }

    .paper-slide-caption {
        font-size: 14px;
        padding: 8px 12px;
    }

    .paper-dot {
        width: 12px;
        height: 12px;
        margin: 0 4px;
    }

    .paper-slider-dots {
        padding: 15px 0;
    }
}