/* ===================================
   Dial Code Explorer - Custom Styles
   =================================== */

/* General */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Cards */
.country-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.country-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15)!important;
}

/* Badges */
.badge {
    font-weight: 500;
}

/* Navigation */
.navbar-brand {
    font-weight: 600;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 50%, #0a58ca 100%);
}

/* Dial Format Display */
.dial-format {
    font-family: 'Consolas', 'Monaco', monospace;
    letter-spacing: 0.5px;
}

/* Country Select (Select2 customization) */
.select2-container--bootstrap-5 .select2-selection {
    height: calc(2.5rem + 2px);
    padding: 0.5rem 1rem;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    line-height: 1.5;
}

/* Table Styles */
.table th {
    font-weight: 600;
    white-space: nowrap;
}

/* Info Cards */
.info-card {
    border-left: 4px solid #0d6efd;
}

.info-card.warning {
    border-left-color: #ffc107;
}

.info-card.success {
    border-left-color: #198754;
}

/* Time Display */
.time-display {
    font-family: 'Consolas', monospace;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Flag Images */
.flag-img {
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    border-radius: 3px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .display-5 {
        font-size: 1.75rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .dial-format .badge {
        font-size: 0.875rem;
        padding: 0.35em 0.5em;
    }
}

/* Sticky sidebar */
.sticky-sidebar {
    position: sticky;
    top: 80px;
}

/* Footer */
footer a:hover {
    color: #fff !important;
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 0;
    background: transparent;
    padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Animation for cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.3s ease-out;
}

/* Print styles */
@media print {
    .navbar, footer, .btn, .no-print {
        display: none !important;
    }
    
    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
}
