/**
 * استایل نوار ترجمه سفارشی نمشی
 * استفاده از رنگ‌های سازمانی: طلایی #CFAA56 و سرمه‌ای #262C49
 */

/* متغیرهای CSS */
:root {
  --namshi-primary: #262C49; /* سرمه‌ای سازمانی */
  --namshi-secondary: #CFAA56; /* طلایی سازمانی */
}

/* نوار ترجمه - با ساختار جدول برای پایداری بیشتر */
.namshi-translator-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--namshi-secondary);
    padding: 10px 15px;
    z-index: 9999;
    direction: rtl;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
    font-family: "ایران یکان", Sans-serif;
    width: 100%;
    box-sizing: border-box;
    display: table;
    table-layout: fixed;
}

/* دکمه ترجمه - سمت راست */
.namshi-translator-actions {
    display: table-cell;
    vertical-align: middle;
    width: 1%;
    white-space: nowrap;
    padding-left: 10px;
}

/* پیام وضعیت - وسط */
.namshi-translator-message {
    display: table-cell;
    vertical-align: middle;
    text-align: center;
    color: var(--namshi-primary);
    font-size: 14px;
    font-weight: bold;
    width: 98%;
}

/* دکمه بستن - سمت چپ */
.namshi-translator-close-container {
    display: table-cell;
    vertical-align: middle;
    width: 1%;
    white-space: nowrap;
    text-align: left;
}

.namshi-translator-button {
    background-color: var(--namshi-primary);
    color: white;
    border: none;
    padding: 6px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-family: "ایران یکان", Sans-serif;
    transition: all 0.2s;
    white-space: nowrap;
    text-align: center;
    outline: none;
    min-width: 70px;
}

.namshi-translator-button:hover {
    background-color: #363f6a;
}

.namshi-translator-close {
    background: none;
    border: none;
    color: var(--namshi-primary);
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: inline-block;
    text-align: center;
    line-height: 24px;
}

/* مخفی کردن المان‌های گوگل ترنسلیت */
.goog-te-banner-frame,
.skiptranslate {
    display: none !important;
    visibility: hidden !important;
}

body {
    top: 0 !important;
}

#goog-gt-tt, 
.goog-te-balloon-frame {
    display: none !important;
}

.goog-text-highlight {
    background-color: transparent !important;
    box-shadow: none !important;
}

/* استایل‌های ریسپانسیو با حفظ ساختار جدول */
@media (max-width: 768px) {
    .namshi-translator-bar {
        padding: 8px 12px;
    }
    
    .namshi-translator-message {
        font-size: 13px;
    }
    
    .namshi-translator-button {
        padding: 5px 12px;
        font-size: 12px;
        min-width: 60px;
    }
}

/* استایل برای موبایل‌های کوچک */
@media (max-width: 576px) {
    .namshi-translator-bar {
        padding: 6px 10px;
    }
    
    .namshi-translator-message {
        font-size: 12px;
    }
    
    .namshi-translator-button {
        padding: 4px 10px;
        font-size: 11px;
        min-width: 50px;
    }
    
    .namshi-translator-close {
        font-size: 18px;
        width: 22px;
        height: 22px;
        line-height: 22px;
    }
}

/* فیکس برای دستگاه‌های iOS */
@supports (-webkit-touch-callout: none) {
    .namshi-translator-bar {
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }
}
