/**
 * 核電廠再運轉審查管制專區 - 專用樣式
 * 
 * 顏色規範 (來自 PDF):
 * - 藍色區塊: #5a7cc7 (管制說明)
 * - 金色區塊: #c9a227 (管制動態、運轉執照換發申請文件、運轉執照換發申請審查)
 * - 淺黃色區塊: #f5d78e (公眾參與、焦點關注議題)
 */

/* ============================================================
   Index Page - Section Styles
   ============================================================ */

.restart-section {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.restart-section-header {
    padding: 12px 16px;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.restart-section-header.section-blue {
    background: linear-gradient(135deg, #5a7cc7 0%, #4a6cb7 100%);
    color: #fff;
}

.restart-section-header.section-gold {
    background: linear-gradient(135deg, #c9a227 0%, #b99217 100%);
    color: #fff;
}

.restart-section-header.section-lightyellow {
    background: linear-gradient(135deg, #f5d78e 0%, #e5c77e 100%);
    color: #333;
}

/* Section Header Links */
.section-header-link {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    transition: opacity 0.2s ease;
}

.section-header-link:hover {
    color: inherit;
    text-decoration: none;
    opacity: 0.85;
}

.section-blue .section-header-link,
.section-gold .section-header-link {
    color: #fff;
}

.section-lightyellow .section-header-link {
    color: #333;
}

.restart-icon {
    width: 24px;
    height: 24px;
}

.restart-icon-fa {
    font-size: 1.3rem;
    width: 28px;
    text-align: center;
}

.restart-items {
    padding: 0;
    margin: 0;
}

.restart-items li {
    padding: 10px 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 5px;
}

.restart-items li:last-child {
    border-bottom: none;
}

.restart-items li .fa-chevron-circle-right {
    color: var(--GlobalStyle-Color, #0066cc);
    margin-top: 3px;
}

.restart-items li a {
    color: var(--GlobalStyle-Color, #0066cc);
    text-decoration: none;
}

.restart-items li a:hover {
    text-decoration: underline;
}

.plant-links {
    margin-left: auto;
}

.plant-links a {
    display: inline-block;
    padding: 2px 10px;
    margin-left: 5px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 0.9rem;
}

.plant-links a:hover {
    background: #e0e0e0;
}

/* ============================================================
   FAQ Accordion Styles
   ============================================================ */

.faq-accordion .accordion-item {
    border: 1px solid #ddd;
    margin-bottom: 8px;
    border-radius: 6px !important;
    overflow: hidden;
}

.faq-accordion .accordion-button {
    font-weight: 500;
    font-size: 1.2rem;
    padding: 15px 20px;
    background: #f8f9fa;
}

.faq-accordion .accordion-button:not(.collapsed) {
    background: #e9f0ff;
    color: #0056b3;
}

.faq-accordion .accordion-button:focus {
    box-shadow: none;
    border-color: #ddd;
}

.faq-accordion .faq-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #0066cc;
    color: #fff;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0;
}

.faq-accordion .accordion-body {
    padding: 20px;
    background: #fff;
    line-height: 1.8;
}

.faq-accordion .accordion-body ol,
.faq-accordion .accordion-body ul {
    padding-left: 20px;
}

.faq-accordion .accordion-body li {
    margin-bottom: 8px;
}

/* ============================================================
   Monthly Info Tab Styles
   ============================================================ */

.monthly-tabs-wrapper {
    border-bottom: 2px solid #dee2e6;
}

.monthly-nav-tabs {
    border-bottom: none;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.monthly-nav-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: #666;
    padding: 10px 20px;
    white-space: nowrap;
    font-weight: 500;
}

.monthly-nav-tabs .nav-link:hover {
    border-color: #ccc;
    color: #333;
}

.monthly-nav-tabs .nav-link.active {
    border-color: #0066cc;
    color: #0066cc;
    background: transparent;
}

.monthly-title {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.monthly-content {
    line-height: 1.8;
}

.monthly-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.monthly-item-header {
    background: #f5f5f5;
    padding: 12px 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.monthly-item-header .item-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #c9a227;
    color: #fff;
    border-radius: 50%;
    font-size: 0.9rem;
}

.monthly-item-body {
    padding: 16px;
    line-height: 1.7;
}

/* ============================================================
   Query Form & Table Styles
   ============================================================ */

.query-form-wrapper {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.query-table {
    font-size: 0.95rem;
}

.query-table th {
    font-weight: 600;
    white-space: nowrap;
}

.query-table td {
    vertical-align: middle;
}

.query-note .card-header {
    background: #f5f5f5;
    font-weight: 600;
}

/* ============================================================
   Opinion Form Styles
   ============================================================ */

.opinion-intro {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #0066cc;
}

/* Step Indicator */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

.step-indicator .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.step-indicator .step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.step-indicator .step.active .step-number {
    background: #0066cc;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
}

.step-indicator .step.completed .step-number {
    background: #28a745;
    color: #fff;
}

.step-indicator .step-label {
    font-size: 0.85rem;
    color: #666;
}

.step-indicator .step.active .step-label {
    color: #0066cc;
    font-weight: 600;
}

.step-indicator .step.completed .step-label {
    color: #28a745;
}

.step-indicator .step-line {
    width: 60px;
    height: 3px;
    background: #e0e0e0;
    margin: 0 10px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.step-indicator .step-line.completed {
    background: #28a745;
}

/* Verification Code Input */
.verification-code-input {
    font-size: 1.8rem;
    letter-spacing: 8px;
    font-family: monospace;
}

/* ============================================================
   Events Timeline Styles
   ============================================================ */

.events-timeline {
    position: relative;
    padding-left: 30px;
}

.events-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #0066cc;
}

.event-item {
    position: relative;
    padding: 15px 0;
    padding-left: 20px;
}

.event-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 20px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #0066cc;
}

.event-date {
    font-weight: 600;
    color: #0066cc;
    margin-bottom: 5px;
}

.event-title {
    font-size: 1rem;
    color: #333;
}

.event-desc {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

/* ============================================================
   Meeting Table Styles
   ============================================================ */

.meeting-section-title {
    font-size: 1.2rem;
    color: #333;
    padding: 10px 15px;
    background: #f5f5f5;
    border-left: 4px solid #c9a227;
    margin-bottom: 15px;
}

.meeting-table {
    font-size: 0.95rem;
}

.meeting-links {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.meeting-links a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #0066cc;
    text-decoration: none;
    white-space: nowrap;
}

.meeting-links a:hover {
    background: #e0e0e0;
}

/* ============================================================
   Responsive Styles
   ============================================================ */

@media (max-width: 576px) {
    .restart-section-header {
        font-size: 1rem;
        padding: 10px 12px;
    }
    
    .restart-items li {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .plant-links {
        width: 100%;
        margin-top: 5px;
        margin-left: 20px;
    }
    
    .step-indicator {
        padding: 15px 0;
    }
    
    .step-indicator .step-number {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .step-indicator .step-label {
        font-size: 0.75rem;
    }
    
    .step-indicator .step-line {
        width: 30px;
    }
    
    .verification-code-input {
        font-size: 1.4rem;
        letter-spacing: 5px;
    }
    
    .events-timeline {
        padding-left: 25px;
    }
    
    .events-timeline::before {
        left: 8px;
    }
    
    .event-item::before {
        left: -21px;
        width: 10px;
        height: 10px;
    }
    
    .faq-accordion .accordion-button {
        padding: 12px 15px;
        font-size: 1.1rem;
    }
    
    .faq-accordion .faq-number {
        width: 26px;
        height: 26px;
        font-size: 0.8rem;
        margin-right: 8px;
    }
    
    .monthly-nav-tabs .nav-link {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 991px) {
    .query-form-wrapper {
        padding: 15px;
    }
}

@media (min-width: 992px) {
    .restart-items li {
        padding: 12px 20px;
    }
}

/* ============================================================
   Print Styles
   ============================================================ */

/* ============================================================
   Article Content Typography Styles (for static content pages)
   Apply to .restart-article-content class or #page-html in restart pages
   ============================================================ */

.restart-article-content,
body.restart-page #page-html,
.restart-content-wrapper #page-html {
    font-size: 1.05rem;
    color: #333;
    line-height: 2;
}

/* Paragraph Spacing */
.restart-article-content p {
    margin-bottom: 1.5em;
    text-align: justify;
    text-indent: 2em;
}

/* First paragraph after heading - no indent */
.restart-article-content h2 + p,
.restart-article-content h3 + p,
.restart-article-content h4 + p {
    text-indent: 0;
}

/* Headings */
.restart-article-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a365d;
    margin-top: 2em;
    margin-bottom: 1em;
    padding-bottom: 0.5em;
    border-bottom: 2px solid #5a7cc7;
}

.restart-article-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c5282;
    margin-top: 1.8em;
    margin-bottom: 0.8em;
    padding-left: 12px;
    border-left: 4px solid #5a7cc7;
    background: linear-gradient(90deg, #f0f4ff 0%, transparent 100%);
    padding-top: 8px;
    padding-bottom: 8px;
}

.restart-article-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-top: 1.5em;
    margin-bottom: 0.6em;
}

/* Lists */
.restart-article-content ol,
.restart-article-content ul {
    margin-bottom: 1.5em;
    padding-left: 2em;
    line-height: 2;
}

.restart-article-content li {
    margin-bottom: 0.5em;
    text-align: justify;
}

.restart-article-content ol {
    list-style-type: decimal;
}

.restart-article-content ul {
    list-style-type: disc;
}

/* Nested lists */
.restart-article-content ol ol,
.restart-article-content ul ul,
.restart-article-content ol ul,
.restart-article-content ul ol {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

/* Tables */
.restart-article-content table {
    width: 100%;
    margin-bottom: 1.5em;
    border-collapse: collapse;
}

.restart-article-content table th,
.restart-article-content table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    text-align: left;
    vertical-align: top;
}

.restart-article-content table th {
    background: #f5f7fa;
    font-weight: 600;
    color: #2c5282;
}

.restart-article-content table tr:nth-child(even) {
    background: #fafbfc;
}

/* Blockquotes */
.restart-article-content blockquote {
    margin: 1.5em 0;
    padding: 1em 1.5em;
    background: #f8f9fa;
    border-left: 4px solid #c9a227;
    font-style: italic;
    color: #555;
}

/* Links */
.restart-article-content a {
    color: #0066cc;
    text-decoration: none;
}

.restart-article-content a:hover {
    text-decoration: underline;
    color: #004499;
}

/* Images */
.restart-article-content img {
    max-width: 100%;
    height: auto;
    margin: 1em 0;
}

/* Emphasis */
.restart-article-content strong,
.restart-article-content b {
    font-weight: 600;
    color: #1a202c;
}

/* First letter styling (optional - for emphasis) */
.restart-article-content > p:first-of-type::first-letter {
    font-size: 1.5em;
    font-weight: 600;
    color: #5a7cc7;
}

/* Section dividers */
.restart-article-content hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 2em 0;
}

/* Note/Info boxes */
.restart-article-content .note,
.restart-article-content .info-box {
    background: #e8f4fd;
    border: 1px solid #b8d4ea;
    border-radius: 6px;
    padding: 1em 1.5em;
    margin: 1.5em 0;
}

.restart-article-content .warning-box {
    background: #fff8e6;
    border: 1px solid #f0d78e;
    border-radius: 6px;
    padding: 1em 1.5em;
    margin: 1.5em 0;
}

/* ============================================================
   Print Styles
   ============================================================ */

@media print {
    .restart-section {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .restart-section-header {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .faq-accordion .accordion-collapse {
        display: block !important;
    }
    
    .step-indicator,
    .btn,
    .sharelink {
        display: none !important;
    }
    
    .restart-article-content {
        font-size: 11pt;
        line-height: 1.6;
    }
    
    .restart-article-content h2,
    .restart-article-content h3,
    .restart-article-content h4 {
        page-break-after: avoid;
    }
    
    .restart-article-content p,
    .restart-article-content li {
        orphans: 3;
        widows: 3;
    }
}
