
/* ============================================================
   TRANSPARENTII WEATHER
   MAIN PAGE STYLES
   ============================================================ */

* {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 0;

    background: #f4f7f9;

    color: #222;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    line-height: 1.5;
}


/* ============================================================
   MAIN PAGE
   ============================================================ */

.weather-main {
    max-width: 1000px;

    margin: 0 auto;

    padding:
        30px 18px 60px;
}


/* ============================================================
   HEADER
   ============================================================ */

.weather-header {
    max-width: 1000px;

    margin: 0 auto;

    padding:
        30px 18px 10px;

    text-align: center;
}

.weather-header h1 {
    margin:
        0 0 8px;

    font-size: 32px;

    line-height: 1.2;
}

.weather-header p {
    margin: 0;

    color: #666;

    font-size: 16px;
}


/* ============================================================
   MAIN HEADING
   ============================================================ */

.weather-main > h2 {
    margin:
        0 0 20px;

    font-size: 24px;

    color: #222;
}


/* ============================================================
   SAVED / RECENT LOCATIONS
   ============================================================ */

.saved-location-container {
    margin:
        0 0 15px;
}

.saved-location-container label {
    display: block;

    margin-bottom: 7px;

    font-weight: 600;

    color: #333;
}


/* ============================================================
   SAVED LOCATION DROPDOWN
   ============================================================ */

#savedLocations {
    display: block;

    width: 100%;

    min-height: 46px;

    padding:
        10px 42px 10px 13px;

    border:
        1px solid #d5d5d5;

    border-radius: 10px;

    background-color: #fff;

    color: #222;

    font-family: inherit;

    font-size: 16px;

    cursor: pointer;

    appearance: auto;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

#savedLocations:hover {
    border-color: #aaa;
}

#savedLocations:focus {
    outline: none;

    border-color: #2196F3;

    box-shadow:
        0 0 0 3px rgba(33, 150, 243, 0.15);
}

#savedLocations:disabled {
    opacity: 0.65;

    cursor: not-allowed;
}


/* ============================================================
   LOCATION BUTTON
   ============================================================ */

.location-button {
    display: block;

    width: 100%;

    border: none;

    background: #2196F3;

    color: #fff;

    padding:
        13px 20px;

    border-radius: 10px;

    cursor: pointer;

    font-family: inherit;

    font-size: 16px;

    font-weight: 600;

    margin-bottom: 20px;

    transition:
        background-color 0.2s ease,
        transform 0.1s ease,
        opacity 0.2s ease;
}

.location-button:hover {
    background: #1976D2;
}

.location-button:active {
    transform: translateY(1px);
}

.location-button:focus {
    outline: none;

    box-shadow:
        0 0 0 3px rgba(33, 150, 243, 0.20);
}

.location-button:disabled {
    opacity: 0.65;

    cursor: wait;

    transform: none;
}


/* ============================================================
   SEARCH
   ============================================================ */

.weather-search {
    display: flex;

    gap: 10px;

    margin-bottom: 20px;

    width: 100%;
}

.weather-search input {
    flex: 1;

    min-width: 0;

    width: 100%;

    padding:
        13px 15px;

    border:
        1px solid #d5d5d5;

    border-radius: 10px;

    background: #fff;

    color: #222;

    font-family: inherit;

    font-size: 16px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.weather-search input::placeholder {
    color: #888;
}

.weather-search input:focus {
    outline: none;

    border-color: #4CAF50;

    box-shadow:
        0 0 0 3px rgba(76, 175, 80, 0.13);
}

.weather-search button {
    flex-shrink: 0;

    border: none;

    background: #4CAF50;

    color: #fff;

    padding:
        13px 20px;

    border-radius: 10px;

    cursor: pointer;

    font-family: inherit;

    font-size: 16px;

    font-weight: 600;

    transition:
        background-color 0.2s ease,
        transform 0.1s ease;
}

.weather-search button:hover {
    background: #388E3C;
}

.weather-search button:active {
    transform: translateY(1px);
}

.weather-search button:focus {
    outline: none;

    box-shadow:
        0 0 0 3px rgba(76, 175, 80, 0.20);
}


/* ============================================================
   WEATHER AREA
   ============================================================ */

#weather {
    min-height: 120px;

    text-align: center;
}


/* ============================================================
   LOADING
   ============================================================ */

.weather-loading {
    color: #777;

    padding:
        30px 10px;

    font-size: 16px;
}


/* ============================================================
   ERROR
   ============================================================ */

.weather-error {
    color: #c62828;

    background: #ffebee;

    padding:
        18px;

    border-radius: 12px;

    border:
        1px solid #ffcdd2;

    text-align: center;
}


/* ============================================================
   WEATHER INFORMATION
   ============================================================ */

.weather-info {
    text-align: left;
}

.weather-title {
    text-align: center;

    margin-bottom: 20px;
}

.weather-temp {
    text-align: center;

    font-size: 52px;

    font-weight: bold;

    line-height: 1.1;

    margin:
        10px 0;
}

.weather-condition {
    text-align: center;

    font-size: 20px;

    color: #555;

    margin-bottom: 25px;
}


/* ============================================================
   WEATHER DETAILS
   ============================================================ */

.weather-details {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(150px, 1fr));

    gap: 12px;
}

.weather-detail {
    background: #f7f7f7;

    border-radius: 14px;

    padding: 16px;

    text-align: center;

    border:
        1px solid #eeeeee;
}

.weather-detail strong {
    display: block;

    margin-top: 6px;

    font-size: 18px;
}

.weather-note {
    margin-top: 20px;

    color: #666;

    font-size: 14px;

    text-align: center;
}


/* ============================================================
   DEW POINT CARD
   ============================================================ */

.dewpoint-card {
    margin-top: 20px;

    padding:
        22px 18px;

    border-radius: 18px;

    background:
        linear-gradient(
            135deg,
            #e3f2fd,
            #e8f5e9
        );

    text-align: center;
}

.dewpoint-value {
    font-size: 28px;

    font-weight: bold;

    color: #1565c0;
}

.dewpoint-label {
    color: #555;

    margin-top: 6px;
}


/* ============================================================
   DEW POINT SCALE
   ============================================================ */

.dewpoint-scale-card {
    margin-top: 20px;

    padding:
        22px 18px;

    border-radius: 18px;

    background: #fff;

    border:
        1px solid #e5e5e5;
}

.dewpoint-scale-title {
    text-align: center;

    font-size: 18px;

    font-weight: bold;

    margin-bottom: 5px;
}

.dewpoint-scale-subtitle {
    text-align: center;

    color: #777;

    font-size: 14px;

    margin-bottom: 25px;
}

.dewpoint-scale {
    position: relative;

    padding:
        35px 0 45px;
}


/* ============================================================
   DEW POINT TRACK
   ============================================================ */

.dewpoint-track {
    position: relative;

    height: 18px;

    border-radius: 20px;

    background:
        linear-gradient(
            to right,

            #42a5f5 0%,
            #42a5f5 12%,

            #66bb6a 25%,

            #fdd835 40%,

            #ffb300 55%,

            #fb8c00 70%,

            #ef5350 85%,

            #d32f2f 100%
        );

    box-shadow:
        inset 0 1px 3px rgba(0, 0, 0, 0.20);
}


/* ============================================================
   DEW POINT TICKS
   ============================================================ */

.dewpoint-ticks {
    position: absolute;

    left: 0;
    right: 0;

    top: 31px;

    height: 25px;

    display: flex;

    justify-content: space-between;

    pointer-events: none;
}

.dewpoint-tick {
    width: 2px;

    height: 9px;

    background:
        rgba(0, 0, 0, 0.35);

    border-radius: 2px;
}

.dewpoint-tick:nth-child(5n + 1) {
    height: 14px;

    background:
        rgba(0, 0, 0, 0.55);
}


/* ============================================================
   DEW POINT INDICATOR
   ============================================================ */

.dewpoint-indicator {
    position: absolute;

    top: -17px;

    width: 42px;
    height: 42px;

    border-radius: 50%;

    background: #fff;

    border:
        4px solid #1565c0;

    box-shadow:
        0 3px 10px rgba(0, 0, 0, 0.25);

    transform:
        translateX(-50%);

    transition:
        left 1.2s cubic-bezier(
            .22,
            .61,
            .36,
            1
        );

    z-index: 5;
}

.dewpoint-indicator::after {
    content: "";

    position: absolute;

    left: 50%;
    bottom: -11px;

    transform:
        translateX(-50%);

    width: 0;
    height: 0;

    border-left:
        7px solid transparent;

    border-right:
        7px solid transparent;

    border-top:
        10px solid #1565c0;
}


/* ============================================================
   DEW POINT INDICATOR VALUE
   ============================================================ */

.dewpoint-indicator-value {
    position: absolute;

    left: 50%;
    bottom: 48px;

    transform:
        translateX(-50%);

    background: #1565c0;

    color: #fff;

    padding:
        7px 10px;

    border-radius: 9px;

    font-size: 14px;

    font-weight: bold;

    white-space: nowrap;

    box-shadow:
        0 2px 7px rgba(0, 0, 0, 0.20);
}


/* ============================================================
   DEW POINT SCALE LABELS
   ============================================================ */

.dewpoint-scale-labels {
    display: flex;

    justify-content: space-between;

    margin-top: 15px;

    font-size: 13px;

    color: #666;
}

.dewpoint-scale-labels strong {
    color: #333;
}


/* ============================================================
   DEW POINT ZONES
   ============================================================ */

.dewpoint-zones {
    display: grid;

    grid-template-columns:
        repeat(5, 1fr);

    gap: 6px;

    margin-top: 15px;

    font-size: 11px;

    text-align: center;
}

.dewpoint-zone {
    padding:
        7px 3px;

    border-radius: 7px;

    color: #444;
}

.zone-dry {
    background: #e3f2fd;
}

.zone-comfort {
    background: #e8f5e9;
}

.zone-humid {
    background: #fff8e1;
}

.zone-very-humid {
    background: #fff3e0;
}

.zone-extreme {
    background: #ffebee;
}


/* ============================================================
   COMFORT
   ============================================================ */

.comfort-card {
    margin-top: 15px;

    padding: 16px;

    border-radius: 14px;

    text-align: center;

    background: #f7f7f7;

    border:
        1px solid #eeeeee;
}

.comfort-good {
    color: #2e7d32;
}

.comfort-moderate {
    color: #ef6c00;
}

.comfort-humid {
    color: #d84315;
}

.comfort-extreme {
    color: #c62828;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 600px) {

    .weather-header {
        padding:
            22px 14px 8px;
    }


    .weather-header h1 {
        font-size: 27px;
    }


    .weather-main {
        padding:
            20px 12px 40px;
    }


    .weather-main > h2 {
        font-size: 21px;
    }


    .weather-search {
        flex-direction: column;
    }


    .weather-search input {
        width: 100%;
    }


    .weather-search button {
        width: 100%;
    }


    .location-button {
        width: 100%;
    }


    #savedLocations {
        min-height: 46px;

        font-size: 16px;
    }


    .weather-temp {
        font-size: 44px;
    }


    .weather-details {
        grid-template-columns:
            repeat(2, 1fr);
    }


    .dewpoint-zones {
        grid-template-columns: 1fr;

        gap: 4px;
    }


    .dewpoint-scale-card {
        padding:
            18px 12px;
    }


    .dewpoint-indicator {
        width: 38px;
        height: 38px;
    }

}


/* ============================================================
   VERY SMALL PHONES
   ============================================================ */

@media (max-width: 380px) {

    .weather-header h1 {
        font-size: 24px;
    }


    .weather-details {
        grid-template-columns: 1fr;
    }


    .weather-main {
        padding-left: 10px;
        padding-right: 10px;
    }


    .weather-temp {
        font-size: 40px;
    }

}
