@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap');

/* ── Plugin container: inline inside navbar, NOT fixed ── */
.bhashini-plugin-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    font-family: 'Noto Sans', Arial, sans-serif;
    z-index: 9999;
}

/* Hide the duplicate button the JS sometimes injects */
.bhashini-plugin-container > div:nth-child(2) {
    display: none !important;
}

/* ── Dropdown wrapper ── */
.bhashini-dropdown {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    z-index: 9999;
}

/* ── The circular icon button ── */
.bhashini-dropdown-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: none;
    /* border-radius: 50%; */
    width: 36px;
    height: 36px;
    cursor: pointer;
    padding: 0;
    outline: none;
}

.bhashini-dropdown-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.bhashini-dropdown-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.bhashini-dropdown-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.bhashini-dropdown-btn-icon svg {
    width: 28px;
    height: 28px;
    display: block;
}

/* ── Dropdown list: opens BELOW the button ── */
.bhashini-dropdown-content {
    padding: 0 !important;
    margin: 0;
    display: none !important;
    position: absolute;
    top: calc(100% + 8px);      /* opens downward from button */
    right: 0;
    left: auto;
    max-height: 25rem;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 99999;
    border-radius: 0.5rem;
    width: 13rem;
    border: 1px solid #737373;
    background: rgba(255, 255, 255, 0.98);
    list-style: none;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.bhashini-dropdown-content::-webkit-scrollbar { width: 4px; }
.bhashini-dropdown-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

/* JS sets display:block — this makes it show */
.bhashini-dropdown-content[style*="display: block"],
.bhashini-dropdown-content.show {
    display: block !important;
    animation: bhashiniSlideDown 0.2s ease forwards;
}

@keyframes bhashiniSlideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.bhashini-dropdown-content > div {
    color: black;
    text-decoration: none;
    list-style: none;
    padding: 0;
    display: inline-flex;
    width: 100%;
}

/* ── Language list items ── */
.bhashini-dropdown-content li {
    color: black !important;
    padding: .62rem 1rem !important;
    cursor: pointer;
    list-style: none;
    text-align: left !important;
    font-size: 14px;
    font-family: 'Noto Sans', Arial, sans-serif;
}

.bhashini-dropdown-content li:hover {
    background-color: #f1f1f1;
}

.bhashini-dropdown-content li:focus,
.bhashini-dropdown-content li:focus-visible {
    outline: 2px solid #1D0A69;
    outline-offset: -2px;
    background-color: #e8e8ff;
}

.bhashini-dropdown-content li[aria-selected="true"] {
    background-color: #ede9ff;
    color: #1D0A69;
    font-weight: 600;
}

/* ── "Powered by Bhashini" sticky footer inside dropdown ── */
.bhashini-branding {
    background-color: #fff;
    color: #555;
    text-align: center;
    padding: 8px !important;
    font-size: .625rem;
    font-weight: 600;
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: .5rem;
    border-top: 1px solid #eee;
}

.bhashini-branding img { height: 18px; width: auto; display: block; }
.bhashini-branding a  { display: flex; align-items: center; }

.bhashini-feedback-div {
    margin-right: auto;
    width: max-content;
}

.bhashini-feedback-button {
    display: flex;
    gap: .5rem;
    background: transparent;
    border: none;
    cursor: pointer;
}

.bhashini-feedback-button img { width: 18px; height: 18px; }

.bhashini-dropdown-btn-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

/* ── Feedback modal ── */
.bhashini-feedback-modal {
    display: none;
    position: fixed;
    z-index: 10000001;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    max-width: 95vw;
    background: #fff;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    padding: 1rem;
}

.bhashini-feedback-modal[style*="display: block"] {
    display: block;
}

.bhashini-feedback-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.close-modal-container { display: flex; justify-content: flex-end; }

.close-modal {
    cursor: pointer;
    color: #555;
    display: flex;
    align-items: center;
}

.close-modal:hover { color: #111; }

.bhashini-feedback-star-container {
    display: flex;
    gap: .75rem;
    flex-direction: column;
}

.bhashini-feedback-heading {
    font-size: 1.12rem;
    font-weight: 600;
}

.star-rating { display: flex; gap: .75rem; margin-bottom: 25px; }

.star {
    width: 30px;
    height: 29px;
    cursor: pointer;
    transition: fill 0.3s ease;
}

.star svg path            { fill: #D9D9D9; }
.star.hovered svg path,
.star.selected svg path   { fill: #FBBC04; }

.feedback-textarea,
.feedback-suggested-feedback {
    margin-top: 1.12rem;
    padding: 1rem;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Noto Sans', Arial, sans-serif;
    font-size: 14px;
    resize: vertical;
}

.feedback-textarea:focus,
.feedback-suggested-feedback:focus {
    outline: 2px solid #1D0A69;
}

.suggested-feedback-container { margin-top: 0.5rem; }

.submit-feedback {
    margin-top: 10px;
    background-color: #2743A3;
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    float: right;
    font-size: 14px;
}

.submit-feedback:hover    { background-color: #1D0A69; }
.submit-feedback:disabled { background-color: #999; cursor: not-allowed; }

/* ── Toast ── */
.bhashini-toast {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    opacity: 0;
    transition: opacity 0.3s ease, bottom 0.3s ease;
    z-index: 10000002;
    font-size: 13px;
    max-width: 90vw;
    text-align: center;
}

.bhashini-toast.visible { opacity: 1; bottom: 40px; }

#bhashiniLanguageDropdown .language-option { list-style: none; }

/* ── Mobile: keep dropdown within viewport ── */
@media (max-width: 768px) {
    .bhashini-dropdown-content {
        right: 0;
        left: auto;
    }
}