@font-face {
    font-family: "sitefont";
    src: url("./assets/fonts/NotoSans-VariableFont_wdth\,wght.ttf");
}


body {
    background-color: #EEF8F9; /* Fallback/base color from light gradient */
    background-image: linear-gradient(180deg, #EBF2FC 0%, #EEF8F9 100%);
    font-family: sitefont;
    transition: background-color 0.8s, color 0.8s;
}



.topBar {
    justify-content: space-between;
    margin: 30px 150px;
    padding: 10px 16px; /*TOP BOTTOM === LEFT RIGHT*/
    border: 1px solid hsl(217, 61%, 90%);
    
    background-color: #FCFDFF;
    border-radius: 20px;
    display: flex;
    box-shadow: 0px 2px 3px 0px #D9E5F4;
    user-select: none; /*Disables highlighting of the moon*/

}

#darkMode {
    border-radius: 12px;
    border-color: white;
    background-color: #EEEEEE;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center; 
    align-items: center;
    cursor: pointer;

    user-select: none; /*Disables highlighting of the moon*/
}

#darkMode:hover {
    background-color: #bbbbbb;
    transition: 0.3s;
}

#darkMode:active {
    background-color: #535353;
    color: white;
}


.extensionList {
    padding: 5px;
    display: flex;
    user-select: none; /*Disables highlighting of the moon*/
    margin: 30px 150px;
    align-items: center;
    gap: 16px;
}

.extensionList h2 {
    margin-right: auto;
    font-weight: 700;
    font-size: 34px;
    color: hsl(227, 75%, 14%);
    transition: color 0.8s;
}

.button-ext {
    color: hsl(227, 75%, 14%);
    font-family: sitefont;
    border-radius: 999px;
    background-color: #ffffff;
    padding: 8px 23px;

    font-weight: 400;
    font-size: 20px;    
    display: flex;
    justify-content: center; 
    align-items: center;
    cursor: pointer;
    border: hsl(217, 61%, 90%) solid 1px;
    
}


.button-ext:active {
    color: white;
    background-color: #C7231A;
    
}

.button-ext:hover {
    transition: 0.3s;
    background-color: #C7231A;
    color: white;
}

.button-ext-top {
    color: hsl(227, 75%, 14%);
    font-family: sitefont;
    border-radius: 999px;
    background-color: #ffffff;
    padding: 8px 23px;
    box-shadow: 0px 2px 3px 0px #D9E5F4;
    font-weight: 400;
    font-size: 20px;    
    display: flex;
    justify-content: center; 
    align-items: center;
    cursor: pointer;


    transition: color 0.8s;
    

    border: hsl(217, 61%, 90%) solid 1px;
}


.button-ext-top:active {
    color: white;
    background-color: #C7231A;
    
    
}

.button-ext-top:hover {
    transition: 0.3s;
    background-color: #C7231A;
    color: white;
}

.active-filter {
    transition: 0.3s;
    background-color: #C7231A;
    color: white;
}


.extension-items {
    display:grid;
    gap: 30px;
    margin: 30px 150px;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.extension-card {
    background-color: #FCFDFF;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0px 2px 3px 0px #D9E5F4;
}

.toggles {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
}

.toggle-switch-checkbox {
    display: none;
}


/*Code below for switch toggles*/

.toggle-switch-label {
    display: flex;
    align-items: center;
    position: relative;
    
    
    width: 40px;
    height: 25px;
    
    background-color: #ccc;
    border-radius: 17px;
    cursor: pointer;
    transition: background-color 0.4s;
    
}



/* The sliding circle (the 'thumb') */
.toggle-switch-label::after {
    content: '';
    position: absolute;
    
    width: 18px;
    height: 18px;

    border-radius: 50%;
    background-color: white;
    
    top: 3px;
    left: 4px;
    
    transition: transform 0.4s, background-color 0.4s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Hover state for the OFF switch */
.toggle-switch-label:hover {
    background-color: #b3b3b3;
}

/* Hover state for the ON switch */
.toggle-switch-checkbox:checked + .toggle-switch-label:hover {
    background-color: hsl(3, 71%, 56%);
}
/* Styles when the switch is ON */
.toggle-switch-checkbox:checked + .toggle-switch-label {
    background-color: #C7231A; /* A bright blue */
}

.toggle-switch-checkbox:checked + .toggle-switch-label::after {
    transform: translateX(15px);
}


/*DARK MODE ACTION*/

body.dark-mode {
    background-color: #040918; /* Fallback/base color from dark gradient */
    background-image: linear-gradient(180deg, #040918 0%, #091540 100%);
    color: hsl(0, 0%, 93%); /* Neutral 100 */
}

body.dark-mode .topBar {
    background-color: hsl(226, 25%, 17%); /* Neutral 800 */
    border-color: hsl(225, 23%, 24%); /* Neutral 700 */
    box-shadow: none;
    color: hsl(0, 0%, 93%);
}

 .remove-button {
    transition: color 0.8s;

 }

/*Change the colors of the logos*/
body.dark-mode .logo {
    filter: brightness(0) invert(1);
    transition: 0.8s;
}

body.dark-mode .darkMode-icon {
    filter: brightness(0) invert(1);
    transition: 0.8s;
}



body.dark-mode #darkMode {
    background-color: hsl(225, 23%, 24%); /* Neutral 700 */
    color: hsl(0, 0%, 93%);
}

body.dark-mode #darkMode:hover {
    background-color: hsl(226, 11%, 37%); /* Neutral 600 */
    color: hsl(0, 0%, 93%);
}

body.dark-mode .extensionList h2 {
    color: hsl(0, 0%, 93%); /* Neutral 100 */
}

body.dark-mode .button-ext-top {
    background-color: hsl(226, 25%, 17%); /* Neutral 800 */
    color: hsl(0, 0%, 93%); /* Neutral 100 */
    border-color: hsl(225, 23%, 24%); /* Neutral 700 */
    box-shadow: none;
}

body.dark-mode .extension-card {
    background-color: hsl(226, 25%, 17%); /* Neutral 800 */
    box-shadow: none;
}

body.dark-mode .button-ext {
    background-color: hsl(225, 23%, 24%); /* Neutral 700 */
    color: hsl(0, 0%, 93%); /* Neutral 100 */
    border-color: hsl(226, 11%, 37%); /* Neutral 600 */
}

body.dark-mode .button-ext:hover,
body.dark-mode .button-ext-top:hover {
    background-color: hsl(3, 71%, 56%); /* Red 500 */
    color: white;
    border-color: hsl(3, 71%, 56%);
}

body.dark-mode .active-filter {
    background-color: hsl(3, 71%, 56%); /* Red 500 */
    color: white;
    border-color: hsl(3, 71%, 56%);
}



body.dark-mode .attribution a {
    color: hsl(217, 61%, 90%); /* Neutral 200 */
}












.attribution { 
    font-size: 11px; text-align: center; 
}


.attribution a {
    color: hsl(228, 45%, 44%); 
}

/* Media query for tablet and phone screens */
@media (max-width: 800px) {
    .topBar,
    .extensionList,
    .extension-items {
        margin-left: 24px;
        margin-right: 24px;
    }

    .extensionList {
        flex-wrap: wrap;
    }

    .extensionList h2 {
        width: 100%;
        margin-right: 0;
        font-size: 28px;
    }
}
