/* ============================================================
   Conference Submission Strategy - strategy.css
   ============================================================ */

/* Nav button overrides for strategy page */
.nav-btn.deadlines-btn,
.nav-btn.wiki-btn,
.nav-btn.discussion-btn,
.nav-btn.strategy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 100px;
    height: 36px;
    padding: 0 14px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    background: var(--primary-bg, #F5F3FF);
    color: var(--primary, #7C3AED);
    border: 1px solid var(--primary-light, #A78BFA);
    border-radius: var(--radius-sm, 6px);
}

.nav-btn.deadlines-btn:hover,
.nav-btn.wiki-btn:hover,
.nav-btn.discussion-btn:hover,
.nav-btn.strategy-btn:hover {
    background: var(--primary, #7C3AED);
    color: white;
    border-color: var(--primary, #7C3AED);
}

/* ============================================================
   LAYOUT
   ============================================================ */
.strategy-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px;
}

.strategy-header {
    text-align: center;
    margin-bottom: 24px;
}

.strategy-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary, #1F2937);
    margin: 0 0 8px 0;
}

.strategy-subtitle {
    font-size: 15px;
    color: var(--text-secondary, #6B7280);
    margin: 0;
}

/* ============================================================
   AREA FILTER PILLS
   ============================================================ */
.strategy-controls {
    margin-bottom: 20px;
}

.area-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.area-pill {
    padding: 6px 14px;
    border-radius: var(--radius-full, 9999px);
    border: 1.5px solid var(--border, #D1D5DB);
    background: white;
    color: var(--text-secondary, #6B7280);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.area-pill:hover {
    border-color: var(--pill-color, var(--primary, #7C3AED));
    color: var(--pill-color, var(--primary, #7C3AED));
    background: var(--pill-bg, var(--primary-bg, #F5F3FF));
}

.area-pill.active {
    border-color: var(--pill-color, var(--primary, #7C3AED));
    background: var(--pill-color, var(--primary, #7C3AED));
    color: white;
}

/* ============================================================
   TABS
   ============================================================ */
.strategy-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: var(--bg-gray, #F9FAFB);
    border-radius: var(--radius-md, 12px);
    padding: 4px;
    border: 1px solid var(--border-light, #E5E7EB);
}

.strategy-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm, 6px);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary, #6B7280);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.strategy-tab:hover {
    color: var(--text-primary, #1F2937);
    background: white;
}

.strategy-tab.active {
    background: white;
    color: var(--primary, #7C3AED);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab-panel {
    display: none;
    min-height: 200px;
}

.tab-panel.active {
    display: block;
}

/* ============================================================
   SHARED UI ELEMENTS
   ============================================================ */
.section-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #1F2937);
    margin: 0 0 16px 0;
}

.past-label {
    margin-top: 32px;
    color: var(--text-muted, #9CA3AF);
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted, #9CA3AF);
    font-size: 15px;
}

.loading-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted, #9CA3AF);
}

.area-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: var(--radius-full, 9999px);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.estimated-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    border: 1.5px dotted #F59E0B;
    border-radius: var(--radius-full, 9999px);
    font-size: 10px;
    font-weight: 600;
    color: #92400E;
    background: #FEF3C7;
    cursor: help;
    vertical-align: middle;
    margin-left: 4px;
}

.tba-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--primary, #7C3AED);
    text-decoration: underline;
}

.past-tag {
    display: inline-block;
    padding: 1px 8px;
    border-radius: var(--radius-full, 9999px);
    font-size: 11px;
    background: var(--bg-gray, #F9FAFB);
    color: var(--text-muted, #9CA3AF);
    margin-left: 6px;
}

/* ============================================================
   FEATURE 1: SUBMISSION PLANNER
   ============================================================ */
.planner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.past-grid .plan-card {
    opacity: 0.6;
}

.plan-card {
    background: white;
    border: 1.5px solid var(--border-light, #E5E7EB);
    border-radius: var(--radius-md, 12px);
    padding: 20px;
    transition: box-shadow 0.2s ease;
    position: relative;
}

.plan-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.plan-card.tba-card {
    border-style: dashed;
    background: var(--bg-gray, #F9FAFB);
}

.plan-card.past-card {
    border-color: var(--border, #D1D5DB);
}

.plan-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 16px;
    border-radius: var(--radius-sm, 6px);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
}

.plan-rank {
    font-size: 10px;
    font-weight: 500;
    opacity: 0.8;
    margin-top: 2px;
}

.plan-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.plan-conf-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary, #1F2937);
}

.plan-fullname {
    font-size: 12px;
    color: var(--text-muted, #9CA3AF);
    margin-bottom: 12px;
}

.plan-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.plan-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 13px;
}

.plan-row.primary-row {
    background: #EFF6FF;
    padding: 6px 10px;
    border-radius: var(--radius-sm, 6px);
    font-weight: 600;
}

.plan-row.countdown-row {
    padding: 6px 10px;
}

.plan-label {
    color: var(--text-secondary, #6B7280);
    font-weight: 500;
}

.plan-value {
    color: var(--text-primary, #1F2937);
    font-weight: 500;
    text-align: right;
}

.countdown {
    font-weight: 700;
    font-size: 15px;
}

.countdown.urgent {
    color: #EF4444;
}

.countdown.soon {
    color: #F59E0B;
}

.plan-note {
    font-size: 12px;
    color: var(--text-secondary, #6B7280);
    background: #FEF3C7;
    padding: 6px 10px;
    border-radius: var(--radius-sm, 6px);
    margin-top: 4px;
}

.overlap-warning {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm, 6px);
    font-size: 12px;
    font-weight: 500;
}

.overlap-danger {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.overlap-tight {
    background: #FEF3C7;
    color: #92400E;
    border: 1px solid #FDE68A;
}

.plan-link {
    display: inline-block;
    margin-top: 12px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 500;
    color: var(--primary, #7C3AED);
    border: 1px solid var(--primary-light, #A78BFA);
    border-radius: var(--radius-sm, 6px);
    text-decoration: none;
    transition: all 0.2s ease;
}

.plan-link:hover {
    background: var(--primary, #7C3AED);
    color: white;
}

/* ============================================================
   FEATURE 2: FALLBACK MAP
   ============================================================ */
.fallback-chain {
    display: flex;
    align-items: flex-start;
    gap: 0;
    overflow-x: auto;
    padding: 20px 10px;
    -webkit-overflow-scrolling: touch;
}

.fallback-node {
    flex-shrink: 0;
}

.fallback-node.past-node {
    opacity: 0.55;
}

.fallback-card {
    width: 200px;
    background: white;
    border: 1.5px solid var(--border-light, #E5E7EB);
    border-radius: var(--radius-md, 12px);
    padding: 16px;
    position: relative;
}

.fallback-conf {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary, #1F2937);
    margin-bottom: 6px;
}

.fallback-info {
    font-size: 12px;
    color: var(--text-secondary, #6B7280);
    line-height: 1.6;
    margin-top: 8px;
}

.fallback-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    padding: 0 4px;
    flex-shrink: 0;
    position: relative;
}

.arrow-line {
    width: 60px;
    height: 2px;
    background: var(--border, #D1D5DB);
    margin-bottom: 4px;
}

.arrow-head {
    font-size: 10px;
    color: var(--text-muted, #9CA3AF);
    position: absolute;
    top: 0;
    right: 10px;
}

.arrow-label {
    font-size: 10px;
    color: var(--text-muted, #9CA3AF);
    white-space: nowrap;
    margin-top: 2px;
}

.gap-indicator {
    padding: 3px 10px;
    border-radius: var(--radius-full, 9999px);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    margin: 6px 0;
}

.gap-ok {
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.gap-tight {
    background: #FEF3C7;
    color: #92400E;
    border: 1px solid #FDE68A;
}

.gap-danger {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.gap-unknown {
    background: var(--bg-gray, #F9FAFB);
    color: var(--text-muted, #9CA3AF);
    border: 1px dashed var(--border, #D1D5DB);
}

.fallback-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-top: 20px;
    padding: 12px;
    background: var(--bg-gray, #F9FAFB);
    border-radius: var(--radius-sm, 6px);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary, #6B7280);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.gap-ok-dot { background: #10B981; }
.gap-tight-dot { background: #F59E0B; }
.gap-danger-dot { background: #EF4444; }

/* ============================================================
   FEATURE 3: ANNUAL CALENDAR
   ============================================================ */
.calendar-wrapper {
    border: 1.5px solid var(--border-light, #E5E7EB);
    border-radius: var(--radius-md, 12px);
    overflow: hidden;
    background: white;
}

.calendar-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.calendar-grid {
    display: grid;
    min-width: 900px;
}

.calendar-corner {
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary, #6B7280);
    background: var(--bg-gray, #F9FAFB);
    border-bottom: 1.5px solid var(--border-light, #E5E7EB);
    border-right: 1.5px solid var(--border-light, #E5E7EB);
    display: flex;
    align-items: center;
}

.calendar-month-header {
    padding: 8px 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary, #6B7280);
    text-align: center;
    background: var(--bg-gray, #F9FAFB);
    border-bottom: 1.5px solid var(--border-light, #E5E7EB);
    border-right: 1px solid var(--border-light, #E5E7EB);
}

.calendar-month-header.current-month {
    background: var(--primary-bg, #F5F3FF);
    color: var(--primary, #7C3AED);
    font-weight: 700;
}

.cal-year {
    font-size: 10px;
    font-weight: 400;
    color: var(--text-muted, #9CA3AF);
}

.calendar-area-label {
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 600;
    border-bottom: 1px solid var(--border-light, #E5E7EB);
    border-right: 1.5px solid var(--border-light, #E5E7EB);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.calendar-cell {
    padding: 6px 4px;
    border-bottom: 1px solid var(--border-light, #E5E7EB);
    border-right: 1px solid var(--border-light, #E5E7EB);
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

.cal-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: var(--radius-sm, 6px);
    font-size: 10px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.15s ease;
}

.cal-marker:hover {
    transform: scale(1.1);
    z-index: 1;
}

.cal-marker.estimated-marker {
    border: 2px dashed rgba(255, 255, 255, 0.5);
}

.cal-marker.past-marker {
    opacity: 0.45;
}

.cal-conf-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    border-radius: var(--radius-sm, 6px);
    font-size: 9px;
    font-weight: 600;
    color: var(--text-secondary, #6B7280);
    background: transparent;
    border: 1.5px solid;
    cursor: pointer;
    white-space: nowrap;
}

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-top: 16px;
    padding: 12px;
    background: var(--bg-gray, #F9FAFB);
    border-radius: var(--radius-sm, 6px);
}

.cal-marker-sample {
    display: inline-block;
    width: 28px;
    height: 14px;
    border-radius: 4px;
}

.estimated-marker-sample {
    background: var(--primary, #7C3AED) !important;
    border: 2px dashed rgba(255, 255, 255, 0.5);
}

.cal-conf-marker-sample {
    display: inline-block;
    width: 28px;
    height: 14px;
    border-radius: 4px;
    border: 1.5px solid var(--text-secondary, #6B7280);
}

.past-marker-sample {
    opacity: 0.45;
}

/* ============================================================
   DISCLAIMER
   ============================================================ */
.strategy-disclaimer {
    margin-top: 32px;
    padding: 16px 20px;
    background: var(--bg-gray, #F9FAFB);
    border: 1px solid var(--border-light, #E5E7EB);
    border-radius: var(--radius-md, 12px);
    font-size: 12px;
    color: var(--text-secondary, #6B7280);
    line-height: 1.6;
}

.strategy-disclaimer p {
    margin: 0 0 6px 0;
}

.strategy-disclaimer p:last-child {
    margin-bottom: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .strategy-content {
        padding: 16px 12px;
    }

    .strategy-title {
        font-size: 22px;
    }

    .strategy-tabs {
        flex-direction: column;
        gap: 2px;
    }

    .strategy-tab {
        padding: 10px 14px;
        font-size: 13px;
    }

    .planner-grid {
        grid-template-columns: 1fr;
    }

    /* Fallback: vertical chain */
    .fallback-chain {
        flex-direction: column;
        align-items: center;
        overflow-x: visible;
    }

    .fallback-arrow {
        min-width: auto;
        padding: 8px 0;
    }

    .arrow-line {
        width: 2px;
        height: 30px;
    }

    .arrow-head {
        position: static;
        transform: rotate(90deg);
    }

    .fallback-card {
        width: 100%;
        max-width: 360px;
    }
}

@media (max-width: 600px) {
    .area-filter-pills {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 4px;
    }

    .area-filter-pills::-webkit-scrollbar {
        display: none;
    }

    .plan-card {
        padding: 14px;
    }

    .plan-conf-name {
        font-size: 17px;
    }

    .plan-row {
        font-size: 12px;
    }

    .nav-btn {
        min-width: 0 !important;
        padding: 0 8px !important;
        font-size: 12px !important;
    }
}

@media (max-width: 480px) {
    .strategy-title {
        font-size: 20px;
    }

    .strategy-subtitle {
        font-size: 13px;
    }

    .strategy-tab svg {
        display: none;
    }
}
