/* =========================================================
   World Clock Dashboard - Styles
   Matches site theme from styles.css
   ========================================================= */

/* =========================================================
   THREE.JS CANVAS BACKGROUND
   ========================================================= */
#heroCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -10;
    pointer-events: none;
}

/* =========================================================
   MAIN TOOL WRAPPER
   ========================================================= */
.tool-world-clock {
    min-height: 100vh;
    position: relative;
}

/* =========================================================
   TOOL HEADER (BREADCRUMB)
   ========================================================= */
.tool-header {
    padding: 16px 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.9);
    position: sticky;
    top: 0;
    z-index: 30;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
}

.breadcrumb a {
    color: var(--text-muted, rgba(4, 19, 23, 0.78));
    text-decoration: none;
    transition: color var(--transition-fast, 200ms);
}

.breadcrumb a:hover {
    color: var(--text-main, #041317);
}

.breadcrumb .separator {
    color: rgba(148, 163, 184, 0.6);
}

.breadcrumb .current {
    color: var(--text-main, #041317);
    font-weight: 600;
}

/* =========================================================
   HERO SECTION
   ========================================================= */
.wc-hero {
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.wc-hero-content {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
    padding: 40px 32px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg, 28px);
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-soft, 0 18px 50px rgba(15, 23, 42, 0.32));
}

.wc-hero-title {
    margin: 0 0 12px;
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-main, #041317);
    line-height: 1.1;
}

.wc-hero-subtitle {
    margin: 0 0 24px;
    font-size: 1.1rem;
    color: var(--text-muted, rgba(4, 19, 23, 0.78));
}

.wc-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.wc-trust-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--text-muted, rgba(4, 19, 23, 0.78));
    margin: 0;
}

.wc-trust-line .trust-icon {
    width: 18px;
    height: 18px;
    color: var(--accent, #22c55e);
}

/* =========================================================
   MAIN CONTENT
   ========================================================= */
.tool-main {
    padding: 40px 0 80px;
}

/* =========================================================
   SECTION STYLES
   ========================================================= */
.wc-clock-section {
    margin-bottom: 40px;
}

.wc-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.wc-section-title {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-main, #041317);
}

/* =========================================================
   CLOCK GRID
   ========================================================= */
.wc-clock-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1100px) {
    .wc-clock-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 800px) {
    .wc-clock-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .wc-clock-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   CLOCK CARD
   ========================================================= */
.wc-clock-card {
    background: rgba(255, 255, 255, 0.97);
    border-radius: var(--radius-lg, 28px);
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-small, 0 12px 28px rgba(15, 23, 42, 0.18));
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-fast, 200ms), box-shadow var(--transition-fast, 200ms);
}

.wc-clock-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft, 0 18px 50px rgba(15, 23, 42, 0.32));
}

.wc-clock-card.primary {
    border: 2px solid var(--accent, #22c55e);
    background: linear-gradient(135deg, rgba(187, 247, 208, 0.15), rgba(255, 255, 255, 0.97));
}

.wc-clock-card.primary::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--bg-1, #8ef3c0), var(--accent, #22c55e));
}

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

.wc-city-info {
    flex: 1;
    min-width: 0;
}

.wc-city-label {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main, #041317);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wc-zone-name {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-muted, rgba(4, 19, 23, 0.78));
    font-family: "Monaco", "Consolas", monospace;
}

.wc-day-night-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.wc-day-night-icon.day {
    color: #f59e0b;
}

.wc-day-night-icon.night {
    color: #6366f1;
}

/* Time Display */
.wc-time-display {
    text-align: center;
    margin-bottom: 16px;
}

.wc-time {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main, #041317);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.wc-date {
    margin: 6px 0 0;
    font-size: 0.9rem;
    color: var(--text-muted, rgba(4, 19, 23, 0.78));
}

/* Card Footer */
.wc-card-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.wc-offset {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main, #041317);
    background: rgba(148, 163, 184, 0.15);
    padding: 4px 10px;
    border-radius: var(--radius-pill, 999px);
}

.wc-dst-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-pill, 999px);
}

.wc-dst-badge.dst-yes {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

.wc-dst-badge.dst-no {
    background: rgba(148, 163, 184, 0.15);
    color: rgba(4, 19, 23, 0.7);
}

.wc-dst-badge.dst-na {
    background: rgba(148, 163, 184, 0.1);
    color: rgba(4, 19, 23, 0.5);
}

/* Primary Badge */
.wc-primary-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    background: var(--accent, #22c55e);
    color: var(--accent-dark, #022c22);
    border-radius: var(--radius-pill, 999px);
}

/* Remove Button */
.wc-remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--transition-fast, 200ms);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wc-clock-card:hover .wc-remove-btn {
    opacity: 1;
}

.wc-remove-btn:hover {
    background: rgba(239, 68, 68, 0.2);
}

.wc-remove-btn svg {
    width: 14px;
    height: 14px;
}

/* =========================================================
   CARD STYLES (REUSABLE)
   ========================================================= */
.wc-card {
    background: rgba(255, 255, 255, 0.97);
    border-radius: var(--radius-lg, 28px);
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-small, 0 12px 28px rgba(15, 23, 42, 0.18));
    overflow: hidden;
}

.wc-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    background: linear-gradient(to right, rgba(15, 23, 42, 0.03), transparent);
}

.wc-card-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.wc-card-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
    border-radius: var(--radius-pill, 999px);
}

.wc-card-body {
    padding: 22px;
}

/* =========================================================
   MEETING PLANNER
   ========================================================= */
.wc-meeting-planner {
    margin-bottom: 40px;
}

.wc-planner-controls {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 20px;
    align-items: end;
    margin-bottom: 24px;
}

@media (max-width: 700px) {
    .wc-planner-controls {
        grid-template-columns: 1fr;
    }
}

.wc-control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wc-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main, #041317);
}

.wc-input,
.wc-select {
    padding: 10px 14px;
    font-family: inherit;
    font-size: 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.5);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color var(--transition-fast, 200ms);
}

.wc-input:hover,
.wc-input:focus,
.wc-select:hover,
.wc-select:focus {
    border-color: var(--accent, #22c55e);
    outline: none;
}

.wc-time-input-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.wc-time-separator {
    font-size: 1.2rem;
    font-weight: 600;
}

.wc-quick-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wc-chip {
    padding: 8px 14px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: #fff;
    border-radius: var(--radius-pill, 999px);
    cursor: pointer;
    transition: all var(--transition-fast, 200ms);
}

.wc-chip:hover {
    border-color: var(--accent, #22c55e);
    background: rgba(34, 197, 94, 0.1);
}

.wc-chip.active {
    background: var(--accent, #22c55e);
    color: var(--accent-dark, #022c22);
    border-color: var(--accent, #22c55e);
}

/* Planner Results */
.wc-planner-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.wc-planner-result {
    padding: 14px 16px;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.wc-planner-result.outside-hours {
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(254, 243, 199, 0.3);
}

.wc-result-city {
    margin: 0 0 6px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main, #041317);
}

.wc-result-time {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main, #041317);
}

.wc-result-date {
    margin: 4px 0 0;
    font-size: 0.8rem;
    color: var(--text-muted, rgba(4, 19, 23, 0.78));
}

.wc-planner-actions {
    display: flex;
    justify-content: flex-end;
}

.wc-planner-actions .btn svg {
    width: 18px;
    height: 18px;
}

/* =========================================================
   FAQ SECTION
   ========================================================= */
.wc-faq {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.wc-faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.wc-faq-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    margin-bottom: 12px;
    overflow: hidden;
}

.wc-faq-item summary {
    padding: 18px 22px;
    font-size: 1rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wc-faq-item summary::-webkit-details-marker {
    display: none;
}

.wc-faq-item summary::after {
    content: "+";
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--accent, #22c55e);
    transition: transform var(--transition-fast, 200ms);
}

.wc-faq-item[open] summary::after {
    transform: rotate(45deg);
}

.wc-faq-item p {
    margin: 0;
    padding: 0 22px 18px;
    font-size: 0.92rem;
    color: var(--text-muted, rgba(4, 19, 23, 0.78));
    line-height: 1.6;
}

/* =========================================================
   MODAL
   ========================================================= */
.wc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wc-modal-overlay.visible {
    display: flex;
}

.wc-modal {
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    background: rgba(255, 255, 255, 0.98);
    border-radius: var(--radius-lg, 28px);
    box-shadow: 0 25px 80px rgba(15, 23, 42, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.wc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.wc-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.wc-modal-close {
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    background: rgba(148, 163, 184, 0.15);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast, 200ms);
}

.wc-modal-close:hover {
    background: rgba(148, 163, 184, 0.3);
}

.wc-modal-close svg {
    width: 20px;
    height: 20px;
    color: var(--text-main, #041317);
}

.wc-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

.wc-modal-body .wc-input {
    width: 100%;
    margin-bottom: 16px;
}

.wc-city-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.wc-city-option {
    padding: 12px 16px;
    background: rgba(248, 250, 252, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-fast, 200ms);
}

.wc-city-option:hover {
    background: rgba(34, 197, 94, 0.1);
    border-color: var(--accent, #22c55e);
}

.wc-city-option.added {
    background: rgba(34, 197, 94, 0.15);
    border-color: var(--accent, #22c55e);
}

.wc-city-option-name {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.wc-city-option-zone {
    margin: 4px 0 0;
    font-size: 0.8rem;
    color: var(--text-muted, rgba(4, 19, 23, 0.78));
    font-family: "Monaco", "Consolas", monospace;
}

/* =========================================================
   FOOTER
   ========================================================= */
.tool-footer {
    padding: 32px 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-content p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-muted, rgba(4, 19, 23, 0.78));
}

.footer-content a {
    color: var(--text-main, #041317);
    text-decoration: none;
}

.footer-content a:hover {
    text-decoration: underline;
}

.footer-nav {
    display: flex;
    gap: 20px;
    font-size: 0.88rem;
}

.footer-nav a {
    color: var(--text-muted, rgba(4, 19, 23, 0.78));
    text-decoration: none;
    transition: color var(--transition-fast, 200ms);
}

.footer-nav a:hover {
    color: var(--text-main, #041317);
}

/* =========================================================
   TOAST NOTIFICATIONS
   ========================================================= */
.wc-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wc-toast {
    padding: 14px 20px;
    background: rgba(15, 23, 42, 0.95);
    color: #f8fafc;
    border-radius: 12px;
    font-size: 0.9rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    animation: slideInRight 300ms ease-out;
}

.wc-toast.success {
    background: linear-gradient(135deg, #166534, #22c55e);
}

.wc-toast.error {
    background: linear-gradient(135deg, #7f1d1d, #ef4444);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* =========================================================
   BUTTON OVERRIDES
   ========================================================= */
.btn.small {
    padding: 8px 14px;
    font-size: 0.85rem;
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.97);
    color: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.5);
}

.btn.secondary:hover {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.7);
}

/* =========================================================
   REDUCED MOTION SUPPORT
   ========================================================= */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =========================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================= */
@media (max-width: 600px) {
    .wc-hero {
        padding: 60px 0 40px;
    }

    .wc-hero-content {
        padding: 28px 20px;
    }

    .wc-hero-title {
        font-size: 1.8rem;
    }

    .wc-hero-subtitle {
        font-size: 1rem;
    }

    .wc-hero-actions {
        flex-direction: column;
    }

    .wc-hero-actions .btn {
        width: 100%;
    }

    .wc-section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .wc-time {
        font-size: 1.8rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}