/* ========================================================================
   NordicWeather - base.css
   Grundl�ggande stilar, variabler, typografi och animationer
   ======================================================================== */

/* ========================================================================
   F�RGVARIABLER & GRUNDL�GGANDE FORMATERING
   ======================================================================== */

:root {
    /* Prim�rt f�rgschema - mer sofistikerat */
    --primary-color: #1e88e5;
    --primary-dark: #0d47a1;
    --primary-light: #64b5f6;
    --primary-gradient: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    /* Accentf�rger */
    --accent-color: #ff6e40;
    --accent-dark: #f4511e;
    --accent-light: #ffab91;
    /* Textf�rger - mer distinkt hierarki */
    --dark-text: #1a237e;
    --medium-text: #455a64;
    --light-text: #90a4ae;
    /* Bakgrundsf�rger - mer subtila */
    --background-light: #f5f7fa;
    --background-white: #ffffff;
    --background-card: #ffffff;
    --background-hover: #f0f4f8;
    /* Statusf�rger - mer konsekventa */
    --danger-color: #e53935;
    --success-color: #43a047;
    --warning-color: #ffb300;
    --info-color: #29b6f6;
    /* UI-element - mer sofistikerade */
    --box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
    --subtle-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    --card-shadow: 0 8px 24px rgba(149, 157, 165, 0.12);
    --hover-shadow: 0 12px 30px rgba(149, 157, 165, 0.18);
    --border-radius: 16px;
    --card-radius: 16px;
    --button-radius: 10px;
    --input-radius: 10px;
    --transition-standard: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease-in-out;
}

/* Grundl�ggande formatering */
html {
    font-size: 16px;
    position: relative;
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    color: var(--dark-text);
    background-color: var(--background-light);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========================================================================
   TYPOGRAFI - F�RB�TTRAD HIERARKI
   ======================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1.25rem;
    color: var(--dark-text);
    letter-spacing: -0.01em;
}

h1 {
    font-size: 2.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1.25rem;
    color: var(--medium-text);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-standard);
}

    a:hover {
        color: var(--primary-dark);
        text-decoration: none;
    }

/* ========================================================================
   ANIMATIONER
   ======================================================================== */

.animate-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

.delay-4 {
    animation-delay: 0.8s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.fade-in-bottom {
    animation: fadeInBottom 0.5s ease forwards;
}

@keyframes fadeInBottom {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.tab-selected {
    animation: pulse 0.3s ease;
}


/* Weather data specific styling */
.site-header .brand-weather {
    color: #263238; /* M�rk text f�r header */
}

.site-footer .brand-weather {
    color: #ffffff; /* Vit text f�r footer */
}

.site-footer .brand-nordic {
    color: var(--primary-dark); /* M�rkbl� f�r b�ttre l�sbarhet */
}

/* PWA specifika stilar */
.offline-mode {
    position: relative;
}

    .offline-mode::after {
        content: "Offline l�ge";
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        background-color: rgba(0, 0, 0, 0.7);
        color: white;
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 14px;
        z-index: 9999;
    }

#pwaInstallContainer {
    display: none;
}

/* Skriv upp detta f�r att f�rb�ttra interaktionsomr�de p� touch-enheter */
.nav-item, .nav-link, .btn {
    padding: 0.5rem 1rem;
    touch-action: manipulation;
}

/* F�rb�ttra responsivitet */
@media (max-width: 576px) {
    #pwaInstallContainer .btn {
        width: 100%;
        margin-top: 10px;
    }
}
/* ========================================================================
   F�RB�TTRADE ANIMATIONER F�R MOBILVY
   ======================================================================== */

/* F�rb�ttra animeringar med j�mnare �verg�ngar */
.animate-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    will-change: opacity, transform;
}

/* Anpassa �verg�ngar f�r mobilvy */
@media (max-width: 767.98px) {
    .animate-in {
        animation-duration: 1s;
        animation-timing-function: ease-out;
        transform: translateY(10px); /* Mindre f�rflyttning p� mobil */
    }

    .delay-1 {
        animation-delay: 0.3s;
    }

    .delay-2 {
        animation-delay: 0.5s;
    }

    .delay-3 {
        animation-delay: 0.7s;
    }

    .delay-4 {
        animation-delay: 0.9s;
    }

    

    /* F�rb�ttra laddnings�verl�ggets utseende */
    #loadingOverlay p {
        font-size: 0.95rem !important;
        max-width: 90% !important;
        line-height: 1.4 !important;
    }
}

/* F�rb�ttra prestanda f�r animationer */
.weather-data,
.weather-icon-large,
.weather-metric,
.provider-card {
    will-change: opacity, transform;
    backface-visibility: hidden;
    perspective: 1000px;
}
/* ========================================================================
   DYNAMISKA STIL�VERG�NGAR
   ======================================================================== */

/* Specialeffekter f�r �verg�ngar */
#weatherDataContainer {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

    #weatherDataContainer.loading-data {
        opacity: 0.7;
        transform: translateY(10px);
    }

tr.collapse {
    transition: height 0.3s ease, opacity 0.3s ease;
}

/* F�rb�ttrad inputstyling */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 136, 229, 0.15);
}

/* Mjukare animeringar f�r mobilvy */
@media (max-width: 767.98px) {
    .animate-in {
        animation-duration: 1s;
        transition-duration: 1s;
    }

    .weather-metric {
        animation-duration: 0.8s;
    }
}