.setting-card {

    background: white;

    border-radius: 15px;

    padding: 25px;

    margin-bottom: 20px;

    box-shadow:
        0 3px 10px
        rgba(0,0,0,.06);

    box-sizing: border-box;
}


.setting-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;
}


.setting-card p {

    color: #6b7280;
}


.setting-card input[type="number"] {

    display: block;

    width: 100%;

    max-width: 300px;

    padding: 12px;

    margin:
        8px 0 20px;

    border:
        1px solid #d1d5db;

    border-radius: 8px;

    box-sizing: border-box;
}


.switch {

    position: relative;

    width: 54px;

    height: 30px;

    flex-shrink: 0;
}


.switch input {

    display: none;
}


.slider {

    position: absolute;

    inset: 0;

    background: #d1d5db;

    border-radius: 30px;

    cursor: pointer;

    transition: .2s;
}


.slider:before {

    content: "";

    position: absolute;

    width: 22px;

    height: 22px;

    left: 4px;

    top: 4px;

    background: white;

    border-radius: 50%;

    transition: .2s;
}


.switch input:checked
+ .slider {

    background: #16a34a;
}


.switch input:checked
+ .slider:before {

    transform:
        translateX(24px);
}


.save-button {

    border: 0;

    background: #2563eb;

    color: white;

    padding: 13px 25px;

    border-radius: 8px;

    font-weight: bold;

    cursor: pointer;
}


.logout-button {

    border: 0;

    background: #dc2626;

    color: white;

    padding: 11px 18px;

    border-radius: 8px;

    cursor: pointer;

    margin-left: 8px;
}


.message-box {

    background: #fef3c7;

    padding: 20px;

    border-radius: 10px;
}


#settings {

    display: none;
}


/* ==========================================
   ALERT SETTINGS MOBILE NAVBAR FIX
   ========================================== */

@media (max-width: 600px) {

    /*
       Keep the header contents separated.
    */

    header {

        display: block !important;

        width: 100%;

        position: relative;

        z-index: 20;

    }


    /*
       Title + email
    */

    header > div:first-child {

        width: 100%;

        margin-bottom: 15px;

    }


    /*
       Navigation buttons
    */

    header > div:last-child {

        display: flex !important;

        flex-wrap: nowrap !important;

        align-items: center;

        gap: 6px;

        width: 100%;

        max-width: 100%;

        overflow-x: auto;

        overflow-y: hidden;

        padding-bottom: 6px;

        box-sizing: border-box;

        position: relative;

        z-index: 30;

        /*
           Prevent buttons from wrapping
        */

        white-space: nowrap;

        /*
           Hide scrollbar
        */

        scrollbar-width: none;

    }


    header > div:last-child::-webkit-scrollbar {

        display: none;

    }


    /*
       Every navigation button stays
       on the same horizontal line.
    */

    header > div:last-child a,
    header > div:last-child button {

        flex: 0 0 auto;

        white-space: nowrap;

        margin-top: 0;

    }


    /*
       Remove excessive logout margin
    */

    .logout-button {

        margin-left: 0;

    }


    /*
       Keep the settings content below
       the navigation.
    */

    #settings {

        position: relative;

        z-index: 1;

        margin-top: 20px;

    }


    /*
       Alert cards should never overflow
       the phone screen.
    */

    .setting-card {

        width: 100%;

        max-width: 100%;

        padding: 25px;

    }


    /*
       Prevent heading/switch from
       overlapping each other.
    */

    .setting-header {

        gap: 15px;

        align-items: flex-start;

    }


    .setting-header h2 {

        margin-top: 0;

    }

}


/* ==========================================
   VERY SMALL PHONES
   ========================================== */

@media (max-width: 380px) {

    .setting-card {

        padding: 20px;

    }


    .setting-header {

        gap: 10px;

    }


    .setting-header h2 {

        font-size: 22px;

    }


    .switch {

        width: 50px;

        height: 28px;

    }


    .slider:before {

        width: 20px;

        height: 20px;

    }


    .switch input:checked
    + .slider:before {

        transform:
            translateX(22px);

    }

}