/* ================================================
   Conference Deadlines Page Styles
   ================================================ */

/* Navigation Buttons (matching main page style) */
.nav-btn.deadlines-btn,
.nav-btn.wiki-btn,
.nav-btn.discussion-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);
    color: var(--primary);
    border: 1px solid var(--primary-light);
}

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

/* Help Button (Guide link) */
.nav-btn.help-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: var(--bg-gray);
    color: var(--text-muted);
    border: 1px solid var(--border-light, var(--border));
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.nav-btn.help-btn:hover {
    background: var(--primary-bg);
    color: var(--primary);
    border-color: var(--primary-light);
}

/* Back Link */
.back-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.back-link:hover {
    color: var(--primary);
    background: var(--primary-bg);
}

.last-updated {
    font-size: 12px;
    color: var(--text-muted);
}

/* Main Content */
.deadlines-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px;
}

/* Header Section */
.deadlines-header {
    text-align: center;
    margin-bottom: 32px;
}

.deadlines-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.title-icon {
    font-size: 1.5rem;
}

.deadlines-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
}

.deadlines-source {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
}

.deadlines-source a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.deadlines-source a:hover {
    text-decoration: underline;
}

/* Controls Section */
.deadlines-controls {
    margin-bottom: 24px;
}

/* Search Bar */
.search-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-white);
    border: 2px solid var(--border);
    border-radius: var(--radius-full);
    padding: 8px 16px;
    margin-bottom: 16px;
    transition: all 0.2s;
}

.search-filter-bar:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.search-filter-bar .search-icon {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.deadline-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    background: transparent;
    color: var(--text-primary);
}

.deadline-search-input::placeholder {
    color: var(--text-muted);
}

.clear-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    background: var(--bg-gray);
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
}

.clear-search-btn:hover {
    background: var(--text-muted);
    color: white;
}

/* Area Filter Pills */
.area-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

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

.area-pill:hover {
    border-color: var(--primary-light);
    color: var(--primary);
    background: var(--primary-bg);
}

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

/* View Controls */
.view-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-summary {
    font-size: 14px;
    color: var(--text-secondary);
}

.view-toggle {
    display: flex;
    background: var(--bg-gray);
    border-radius: var(--radius-sm);
    padding: 4px;
}

.view-btn {
    padding: 6px 16px;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.view-btn:hover {
    color: var(--primary);
}

.view-btn.active {
    background: var(--bg-white);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* Deadlines List */
.deadlines-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Deadline Card */
.deadline-card {
    background: var(--bg-white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.deadline-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

/* Urgency States */
.deadline-card.urgent {
    border-left: 4px solid #EF4444;
    background: linear-gradient(to right, rgba(239, 68, 68, 0.03), transparent);
}

.deadline-card.urgent .countdown {
    color: #EF4444;
}

.deadline-card.soon {
    border-left: 4px solid #F59E0B;
    background: linear-gradient(to right, rgba(245, 158, 11, 0.03), transparent);
}

.deadline-card.soon .countdown {
    color: #F59E0B;
}

.deadline-card.upcoming {
    border-left: 4px solid #10B981;
}

.deadline-card.past {
    opacity: 0.6;
    border-left: 4px solid var(--text-muted);
}

/* Card Header */
.deadline-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 16px;
}

.conference-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.conference-badge {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    color: white;
}

/* Area Colors - 7 tracked research areas */
.area-general { background: #7C3AED; }
.area-ml { background: #2563EB; }
.area-dm { background: #059669; }
.area-nlp { background: #DC2626; }
.area-cv { background: #7C2D12; }
.area-robotics { background: #4338CA; }
.area-mas { background: #0D9488; }
.area-default { background: var(--text-secondary); }

.year-badge {
    padding: 4px 10px;
    background: var(--text-muted);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
    color: white;
}

.area-tag {
    font-size: 12px;
    color: var(--text-muted);
    padding: 4px 8px;
    background: var(--bg-gray);
    border-radius: var(--radius-sm);
}

/* Countdown */
.countdown {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
    text-align: right;
}

.countdown .time-value {
    font-size: 18px;
    font-weight: 700;
}

.countdown .time-unit {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.8;
    margin-right: 4px;
}

.countdown.past {
    color: var(--text-muted);
}

.past-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* Conference Name */
.conference-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 16px;
}

/* Deadline Details */
.deadline-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.deadline-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-gray);
    border-radius: var(--radius-sm);
}

.deadline-row.primary {
    background: var(--primary-bg);
    border: 1px solid var(--primary-light);
}

.deadline-type {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.deadline-row.primary .deadline-type {
    color: var(--primary-dark);
}

.deadline-date {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.deadline-date.past {
    color: var(--text-muted);
    text-decoration: line-through;
}

.deadline-row.primary .deadline-date {
    color: var(--primary-dark);
}

.deadline-location {
    font-size: 13px;
    color: var(--text-primary);
}

/* Deadline Note */
.deadline-note {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 10px 12px;
    background: #FEF3C7;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    border-left: 3px solid #F59E0B;
}

/* Actions */
.deadline-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg);
}

.action-btn.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.action-btn.primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.loading-state p {
    margin-top: 16px;
    font-size: 14px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-muted);
}

/* Error State */
.error-state {
    text-align: center;
    padding: 60px 20px;
}

.error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.error-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.error-state p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.retry-btn {
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.retry-btn:hover {
    background: var(--primary-dark);
}

/* Initial State - Before loading data */
.initial-state {
    text-align: center;
    padding: 80px 20px;
    background: var(--bg-white);
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
}

.initial-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.8;
}

.initial-state h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.initial-state p {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.load-deadlines-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
}

.load-deadlines-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.load-deadlines-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

/* Responsive - Tablet */
@media (max-width: 768px) {
    .deadlines-content {
        padding: 16px;
    }

    .deadlines-title {
        font-size: 1.5rem;
    }

    .deadline-card-header {
        flex-direction: column;
        gap: 12px;
    }

    .countdown {
        text-align: left;
    }

    .view-controls {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .view-toggle {
        justify-content: center;
    }

    .area-filter-pills {
        justify-content: center;
    }

    .deadline-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .deadline-actions {
        flex-direction: column;
    }

    .action-btn {
        justify-content: center;
    }
}

/* Small screens */
@media (max-width: 600px) {
    .deadlines-content {
        padding: 12px;
    }

    .deadlines-header {
        margin-bottom: 20px;
    }

    .deadlines-title {
        font-size: 1.3rem;
        gap: 8px;
    }

    .title-icon {
        font-size: 1.2rem;
    }

    .deadlines-subtitle {
        font-size: 14px;
    }

    .deadlines-source {
        font-size: 12px;
    }

    .search-filter-bar {
        padding: 6px 12px;
    }

    .deadline-search-input {
        font-size: 14px;
    }

    /* Area pills scrollable on small screens */
    .area-filter-pills {
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

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

    .area-pill {
        flex-shrink: 0;
        font-size: 12px;
        padding: 5px 12px;
    }

    .view-btn {
        font-size: 12px;
        padding: 5px 12px;
    }

    .results-summary {
        font-size: 13px;
        text-align: center;
    }

    .deadline-card {
        padding: 14px;
    }

    .conference-badge {
        font-size: 12px;
        padding: 3px 10px;
    }

    .year-badge {
        font-size: 11px;
        padding: 3px 8px;
    }

    .area-tag {
        font-size: 11px;
    }

    .countdown {
        font-size: 13px;
    }

    .countdown .time-value {
        font-size: 16px;
    }

    .countdown .time-unit {
        font-size: 11px;
    }

    .conference-name {
        font-size: 14px;
    }

    .deadline-type,
    .deadline-date,
    .deadline-location {
        font-size: 12px;
    }

    .deadline-note {
        font-size: 12px;
        padding: 8px 10px;
    }

    .action-btn {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* Very small screens (phones) */
@media (max-width: 480px) {
    .deadlines-content {
        padding: 10px;
    }

    .deadlines-title {
        font-size: 1.15rem;
        flex-direction: column;
        gap: 4px;
    }

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

    .search-filter-bar {
        border-radius: var(--radius-md);
    }

    .conference-info {
        gap: 6px;
    }

    .conference-badge {
        font-size: 11px;
    }

    .conference-name {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .deadline-row {
        padding: 6px 10px;
    }

    .initial-state {
        padding: 40px 16px;
    }

    .initial-icon {
        font-size: 48px;
    }

    .initial-state h3 {
        font-size: 17px;
    }

    .initial-state p {
        font-size: 13px;
    }

    .load-deadlines-btn {
        padding: 12px 24px;
        font-size: 14px;
    }

    .back-link {
        font-size: 13px;
        padding: 6px 10px;
    }

    .last-updated {
        font-size: 11px;
    }
}
