/* Amber Light scheme (Default) */
/* Can be forced with data-theme="light" */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Arabic:wght@100..900&family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap');

[data-theme="light"],
:root:not([data-theme="dark"]) {
    --primary: #f9f5de;
    --primary-hover: #fee285;
    --primary-focus: rgba(255, 179, 0, 0.125);
    --primary-inverse: rgba(0, 0, 0, 0.75);
    --background-color: #fff;
    --main-text-color: #475569;
    --summer-sun: #fcc50b;
    --water: #44b9da;
    --leaf: #7b990a;
    --flower: #d1684e;
}

/* Amber Dark scheme (Auto) */
/* Automatically enabled if user has Dark mode enabled */
@media only screen and (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        --primary: #f9f5de;
        --primary-hover: #fee285;
        --primary-focus: rgba(255, 179, 0, 0.25);
        --primary-inverse: rgba(0, 0, 0, 0.75);
        --background-color: #fff;
        --main-text-color: #475569;
        --summer-sun: #fcc50b;
        --water: #44b9da;
        --leaf: #7b990a;
        --flower: #d1684e;
    }
}
/* Amber Dark scheme (Forced) */
/* Enabled if forced with data-theme="dark" */
[data-theme="dark"] {
    --primary: #fee285;
    --primary-hover: #fcc50b;
    --primary-focus: rgba(255, 179, 0, 0.25);
    --primary-inverse: rgba(0, 0, 0, 0.75);
    --background-color: #fff;
    --main-text-color: #475569;
    --summer-sun: #fcc50b;
    --water: #44b9da;
    --leaf: #7b990a;
    --flower: #d1684e;
}
/* Amber (Common styles) */
:root {
    --form-element-active-border-color: var(--primary);
    --form-element-focus-color: var(--primary-focus);
    --switch-color: var(--primary-inverse);
    --switch-checked-background-color: var(--primary);
    --font-family: "Noto Sans", "Noto Sans Arabic", sans-serif !important;
}

.khoj-configure {
    display: grid;
    grid-template-columns: 1fr;
    font-family: var(--font-family);
    font-weight: 300;
}

div.khoj-header {
    display: grid;
    grid-auto-flow: column;
    gap: 20px;
    padding: 24px 16px 0px 0px;
    margin: 0 0 16px 0;
    align-items: center;
    user-select: none;
    -webkit-user-select: none;
    -webkit-app-region: drag;
}

/* Keeps the navigation menu clickable */
a.khoj-nav {
    -webkit-app-region: no-drag;
}
div.khoj-nav {
    -webkit-app-region: no-drag;
}
nav.khoj-nav {
    display: grid;
    grid-auto-flow: column;
    grid-gap: 32px;
    justify-self: right;
    align-items: center;
}

.khoj-status-box {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
    background-color: #f5f5f5; /* Neutral background */
    color: #333; /* Neutral text color */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    transition: background-color 0.3s ease, color 0.3s ease;
}

.khoj-status-connected {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #4CAF50; /* Green for connected */
    margin-right: 8px;
}

.khoj-status-not-connected {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #F44336; /* Red for not connected */
    margin-right: 8px;
}

.khoj-status-text {
    color: #333; /* Neutral text color */
    font-family: inherit;
}

.khoj-status-box:hover {
    background-color: #e0e0e0; /* Slightly darker background on hover */
    color: #000; /* Darker text on hover */
}

a.khoj-nav {
    display: flex;
    align-items: center;
}

a.khoj-logo {
    justify-self: left;
}

.khoj-nav a {
    color: var(--main-text-color);
    text-decoration: none;
    font-size: small;
    font-weight: normal;
    padding: 0 4px;
    border-radius: 4px;
    justify-self: center;
    margin: 0;
}
.khoj-nav a:hover {
    background-color: var(--primary-hover);
    color: var(--main-text-color);
}
a.khoj-nav-selected {
    background-color: var(--primary);
}
.nav-icon {
    width: 24px;
    height: 24px;
}
#agents-icon {
    width: 30px;
    height: 30px;
}
span.khoj-nav-item-text {
    padding-top: 6px;
    padding-left: 8px;
}
img.khoj-logo {
    width: min(60vw, 90px);
    max-width: 100%;
    justify-self: center;
}

/* Dropdown in navigation menu*/
#khoj-nav-menu-container {
    display: flex;
    align-items: center;
}
.khoj-nav-dropdown-content {
    display: block;
    grid-auto-flow: row;
    position: absolute;
    background-color: var(--background-color);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    right: 5vw;
    top: 64px;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.1s ease-in-out;
    pointer-events: none;
    text-align: left;
}
.khoj-nav-dropdown-content.show {
    opacity: 1;
    pointer-events: auto;
    border-radius: 8px;
}
.khoj-nav-dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}
.khoj-nav-dropdown-content a:hover {
    background-color: hsla(24.6 95% 53.1% / 0.125);
}

.khoj-nav-username {
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-weight: bold;
}
.circle {
    border-radius: 50%;
    border: 3px dotted var(--main-text-color);
    width: 32px;
    height: 32px;
    padding: 3px;
    cursor: pointer;
}
.circle:hover {
    background-color: var(--primary-hover);
}
.user-initial {
    background-color: var(--background-color);
    color: black;
    display: grid;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    box-sizing: unset;
    width: 40px;
    height: 35px;
    padding-top: 8px;
}
.subscribed {
    border: 3px solid var(--primary-hover);
}

.khoj-nav-icon {
    width: 20px;
    height: 20px;
}

a.khoj-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
}

@media screen and (max-width: 600px) {
    .khoj-nav-dropdown-content {
        display: block;
        grid-auto-flow: row;
        position: absolute;
        background-color: var(--background-color);
        min-width: 160px;
        box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
        right: 10px;
        z-index: 1;
        opacity: 0;
        transition: opacity 0.1s ease-in-out;
        pointer-events: none;
    }
}

@media only screen and (max-width: 600px) {
    div.khoj-header {
        display: grid;
        grid-auto-flow: column;
        gap: 20px;
        padding: 24px 10px 10px 10px;
        margin: 0 0 16px 0;
    }

    nav.khoj-nav {
        grid-gap: 0px;
        justify-content: space-between;
    }
    a.khoj-nav {
        padding: 0 16px;
    }
    span.khoj-nav-item-text {
        display: none;
    }
}
