/* style.css */

/* CSS Variables for Theming */
:root {
    --body-bg: hsl(0, 0%, 93%);
    /* Neutral 100 */
    --text-color: hsl(227, 75%, 14%);
    /* Neutral 900 */
    --primary-color: hsl(3, 86%, 64%);
    /* Red 400 */
    --secondary-color: hsl(226, 11%, 37%);
    /* Neutral 600 */
    --card-bg: hsl(0, 0%, 100%);
    /* White */
    --card-shadow: rgba(0, 0, 0, 0.1);
}

body.dark-theme {
    --body-bg: hsl(227, 75%, 14%);
    /* Neutral 900 */
    --text-color: hsl(0, 0%, 93%);
    /* Neutral 100 */
    --primary-color: hsl(3, 71%, 56%);
    /* Red 500 */
    --secondary-color: hsl(0, 0%, 99%);
    /* Neutral 800 */
    --card-bg: hsl(226, 25%, 17%);
    /* Neutral 800 */
    --card-shadow: rgba(255, 255, 255, 0.1);
    background-color: #1c2035;
}

body.dark-theme header {
    background-color: var(--card-bg);
}

body.dark-theme .extensions-logo {
    filter: invert(1);
}
body.dark-theme .extensions-text {
    color: white;
}

body {
    font-family: 'Noto Sans', sans-serif;
    background-color: #e9f2ff;
    /* Light blue background to match the image */
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    /* Smooth theme transition */
    padding: 0;
    margin: 0;
}

header {
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s, box-shadow 0.3s;
    border-radius: 16px;
    margin: 20px auto;
    padding: 15px 0;
    width: calc(82vw);
    max-width: 1320px;
    /* Match Bootstrap's xxl breakpoint */
}



.theme-toggle-btn {
    background-color: #f5f7fd;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

body.dark-theme .theme-toggle-btn {
    background-color: #2b3142;
}

main {
    padding-bottom: 2rem;
    /* Add some padding at the bottom */
}




.btn {
    transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
    /* General button transition */
    border-radius: 30px;
    /* More pill-shaped buttons to match the image */
    padding: 0.5rem 1.5rem;
}

.btn-primary {
    /* Overriding Bootstrap primary button */
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: hsl(3, 77%, 44%);
    /* Red 700 */
    border-color: hsl(3, 77%, 44%);
    box-shadow: 0 0 0 0.25rem rgba(3, 86%, 64%, 0.5);
    /* Red 400 with 50% opacity */
}

/* Specific styles for filter buttons */
.btn-outline-primary {
    color: var(--text-color);
    border-color: transparent;
    background-color: white;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Style for the filter buttons container */
.filter-buttons .btn {
    font-weight: 500;
    min-width: 90px;
    box-shadow: none;
    padding: 0.375rem 1.25rem;
}

/* Ensure the filter buttons have consistent styling */
.filter-buttons .btn-primary {
    background-color: #d32f2f;
    /* Exact red color from the image */
    border-color: #d32f2f;
}

.filter-buttons .btn-outline-primary {
    background-color: white;
    color: #333;
    border: 1px solid #eee;
}

.filter-buttons {
    gap: 8px;
}

#extensions-container .card {
    background-color: var(--card-bg);
    box-shadow: 0 2px 4px var(--card-shadow);
    color: var(--text-color);
    border: none;
    transition: background-color 0.3s, box-shadow 0.3s, transform 0.2s, opacity 0.2s;
}



#extensions-container .card .card-body {
    padding: 1.5rem;
    display: flex;
    /* Add flex display */
    align-items: start;
    /* Vertically center items */
    flex-direction: column;
    /* Stack items vertically */
}

.extension-logo-container {
    width: 40px;
    /* Adjust the size as needed */
    height: 40px;
    margin-right: 15px;
    /* Space between logo and text */
    background-color: #f0f0f0;
    /* Light gray background, adjust as needed */
    border-radius: 8px;
    /* Rounded corners */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* Ensure content doesn't overflow */
}

.extension-logo {
    width: 100%;
    /* Make SVG occupy full width of container */
    height: 100%;
    /* Make SVG occupy full height of container */
    margin-bottom: 0;
    /* Remove bottom margin */
    object-fit: contain;
    /* Maintain aspect ratio while filling container */
}

/* Added these to align Image and Title in a row */
.card-title-container {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    /* Original margin of card title */
}

#extensions-container .card-title {
    font-size: 1.25rem;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    height: 100%;
}

#extensions-container .card-text {
    color: var(--secondary-color);
}

.btn-danger {
    background-color: hsl(3, 86%, 64%);
    /* Red 400 */
    border: none;
}

.btn-danger:hover,
.btn-danger:focus {
    background-color: hsl(3, 77%, 44%);
    /* Red 700 */
    box-shadow: 0 0 0 0.25rem rgba(3, 86%, 64%, 0.5);
    /* Red 400 with 50% opacity */
}

.attribution {
    font-size: 0.8rem;
    text-align: center;
    color: var(--secondary-color);
}

.attribution a {
    color: var(--primary-color);
}

/* Card Appearance Animation */
.card-enter {
    opacity: 0;
    transform: translateY(-20px);
}

.card-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s, transform 0.3s;
}

/* Card Removal Animation */
.card-exit {
    opacity: 1;
}

.card-exit-active {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.2s, transform 0.2s;
}

/* Form check input styling */
.form-check-input {
    margin-left: 0;
}

.form-check.form-switch {
    margin-left: auto !important;
    /* Push the toggle switch to the far right with !important */
    padding-right: 0;
    /* Remove any right padding */
    float: right;
    /* Float to the right */
}

/* Ensure the toggle switch container is at the far right */
.d-flex.justify-content-between {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

/* Ensure the div containing the toggle is positioned at the far right */
.card-body .d-flex.justify-content-between>div:last-child {
    margin-left: auto !important;
    /* Force margin-left auto with !important */
    display: flex;
    justify-content: flex-end;
    /* Align content to the right */
}
