.rotranslate-switcher {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    gap: 2px;
    vertical-align: middle;
}

.rotranslate-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 4px;
    border: 0;
    background: transparent;
    cursor: pointer;
    line-height: 1;
    touch-action: manipulation;
    min-height: calc(var(--rotranslate-flag-height, 16px) + 8px);
}

.rotranslate-toggle:hover,
.rotranslate-toggle:focus {
    background: transparent;
}


.rotranslate-current-flag {
    pointer-events: none;
}

.rotranslate-current-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--rotranslate-flag-width, 24px);
    height: var(--rotranslate-flag-height, 16px);
    min-width: var(--rotranslate-flag-width, 24px);
}

.rotranslate-current-flag img,
.rotranslate-flag img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
    display: block;
    max-width: none;
    max-height: none;
}

.rotranslate-flag {
    width: var(--rotranslate-flag-width, 24px);
    height: var(--rotranslate-flag-height, 16px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.rotranslate-more svg {
    display: block;
}

.rotranslate-modal[hidden] {
    display: none;
}

.rotranslate-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.rotranslate-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
}

.rotranslate-modal-panel {
    position: relative;
    /* Center the modal specifically */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    width: min(90vw, 420px);
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
    padding: 16px;
    max-height: 90vh;
    overflow-y: auto;
}

.rotranslate-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.rotranslate-modal-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0f6fbd;
    box-shadow: 0 4px 10px rgba(15, 79, 153, 0.25);
    border: 1px solid rgba(15, 79, 153, 0.25);
    flex-shrink: 0;
}

.rotranslate-modal-title {
    font-size: 16px;
    font-weight: 600;
    flex: 1;
}

.rotranslate-close {
    border: 0;
    background: #0f6fbd;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    cursor: pointer;
    color: #ffffff;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(15, 79, 153, 0.25);
    box-shadow: 0 4px 10px rgba(15, 79, 153, 0.25);
    font-size: 16px;
    line-height: 1;
}

.rotranslate-flag-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: 10px;
}

.rotranslate-flag-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 10px;
    border: 1px solid #e3e3e3;
    background: #f8f8f8;
    cursor: pointer;
    min-height: calc(var(--rotranslate-flag-height, 16px) + 22px);
}

.rotranslate-flag-btn.is-active {
    border-color: #1b75d0;
    box-shadow: 0 0 0 2px rgba(27, 117, 208, 0.25);
    background: #ffffff;
}

.rotranslate-flag-fallback {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.rotranslate-powered {
    margin-top: 12px;
    font-size: 12px;
    color: #666666;
    text-align: center;
}

.rotranslate-powered a {
    color: #0f4f99;
    text-decoration: none;
    font-weight: 600;
}

.rotranslate-powered a:hover {
    text-decoration: underline;
}

.rotranslate-widget {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.rotranslate-menu-item .rotranslate-toggle {
    padding: 0;
}

.rotranslate-menu-item {
    display: flex;
    align-items: center;
}

.rotranslate-switcher--menu {
    align-items: center;
}

.rotranslate-switcher--menu .rotranslate-hint {
    display: none;
}

.rotranslate-hint {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    opacity: 0;
    transform: translateY(2px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    pointer-events: none;
    white-space: nowrap;
    line-height: 1.1;
}

.rotranslate-switcher:hover .rotranslate-hint,
.rotranslate-switcher:focus-within .rotranslate-hint {
    opacity: 0.8;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .rotranslate-hint {
        display: none !important;
    }
    
    .rotranslate-hide-mobile {
        display: none !important;
    }
}

body.rotranslate-modal-open {
    overflow: hidden;
}

/* Floating Widget */
.rotranslate-floating {
    position: fixed;
    z-index: 99999;
}

.rotranslate-position-bottom_right { bottom: 20px; right: 20px; }
.rotranslate-position-bottom_left { bottom: 20px; left: 20px; }
.rotranslate-position-top_right { top: 20px; right: 20px; }
.rotranslate-position-top_left { top: 20px; left: 20px; }

.rotranslate-position-center_right { top: 50%; right: 20px; transform: translateY(-50%); }
.rotranslate-position-center_left { top: 50%; left: 20px; transform: translateY(-50%); }

/* Round Style */
.rotranslate-style-round .rotranslate-flag,
.rotranslate-style-round .rotranslate-current-flag,
.rotranslate-style-round img,
.rotranslate-style-round .rotranslate-flag-btn img {
    border-radius: 50% !important;
    overflow: hidden;
    /* Aspect ratio fix specifically for round flags */
    height: var(--rotranslate-flag-width, 24px) !important;
    width: var(--rotranslate-flag-width, 24px) !important; 
    object-fit: cover;
}

.rotranslate-style-round .rotranslate-current-flag,
.rotranslate-style-round .rotranslate-flag {
    height: var(--rotranslate-flag-width, 24px);
    border-radius: 50%;
}


.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
.goog-te-banner,
#goog-gt-tt,
.goog-te-balloon-frame,
.goog-te-spinner-pos,
.goog-te-menu-frame,
.skiptranslate,
.goog-te-gadget,
.goog-te-gadget-simple,
iframe.goog-te-banner-frame {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
}

body {
    top: 0 !important;
}

html {
    top: 0 !important;
}
