/**
 * FT OTP Login - Public Facing Styles
 * Version: 2.6.0 (Mobile Border Removal & Reordering)
 * Author: Faratechnic
 */

/* -------------------------------------------------------------------------- */
/*                                  Variables                                 */
/* -------------------------------------------------------------------------- */

:root {
    /* مقادیر پیش‌فرض */
    --ft-otp-primary-color: #0073aa;
    --ft-otp-primary-color-hover: #005a87;
    
    --ft-otp-text-color: #2c3338;
    --ft-otp-text-muted: #646970;
    --ft-otp-border-color: #dcdcde;
    --ft-otp-background-color: #fff;
    
    /* متغیرهای دکمه */
    --ft-otp-btn-text-color: #ffffff;
    --ft-otp-btn-border-color: #0073aa; 
    
    --ft-otp-input-bg: #fdfdfd;
    --ft-otp-input-focus-bg: #ffffff;
    
    --ft-otp-success-bg: #edfaef;
    --ft-otp-success-text: #155724;
    --ft-otp-success-border: #c3e6cb;
    
    --ft-otp-error-bg: #fcf0f1;
    --ft-otp-error-text: #d63638;
    --ft-otp-error-border: #f5c6cb;
    --ft-otp-error-field-border: #d63638;
    
    --ft-otp-font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --ft-otp-radius: 8px;
    --ft-otp-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* -------------------------------------------------------------------------- */
/*                                  Font & Icons                              */
/* -------------------------------------------------------------------------- */

@font-face {
    font-family: 'Ft-OTP';
    src: url('../fonts/Ft-OTP.eot?yk6gem');
    src: url('../fonts/Ft-OTP.eot?yk6gem#iefix') format('embedded-opentype'),
        url('../fonts/Ft-OTP.ttf?yk6gem') format('truetype'),
        url('../fonts/Ft-OTP.woff?yk6gem') format('woff'),
        url('../fonts/Ft-OTP.svg?yk6gem#Ft-OTP') format('svg');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

[class^="ft-otp-icon-"], [class*=" ft-otp-icon-"] {
    font-family: 'Ft-OTP' !important;
    speak: never;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* آیکون‌ها */

.ft-otp-icon-alert-circle:before { content: "\e900"; }
.ft-otp-icon-alert-triangle:before { content: "\e901"; }
.ft-otp-icon-at-sign:before { content: "\e902"; }
.ft-otp-icon-bell:before { content: "\e903"; }
.ft-otp-icon-book:before { content: "\e918"; }
.ft-otp-icon-book-open:before { content: "\e919"; }
.ft-otp-icon-bookmark:before { content: "\e91a"; }
.ft-otp-icon-box:before { content: "\e91b"; }
.ft-otp-icon-briefcase:before { content: "\e91c"; }
.ft-otp-icon-calendar:before { content: "\e91d"; }
.ft-otp-icon-check:before { content: "\e904"; }
.ft-otp-icon-check-square:before { content: "\e91e"; }
.ft-otp-icon-chevron-down:before { content: "\e91f"; }
.ft-otp-icon-chevron-left:before { content: "\e920"; }
.ft-otp-icon-chevron-right:before { content: "\e921"; }
.ft-otp-icon-chevron-up:before { content: "\e922"; }
.ft-otp-icon-clipboard:before { content: "\e923"; }
.ft-otp-icon-clock:before { content: "\e905"; }
.ft-otp-icon-credit-card:before { content: "\e92c"; }
.ft-otp-icon-database:before { content: "\e92d"; }
.ft-otp-icon-download:before { content: "\e906"; }
.ft-otp-icon-edit:before { content: "\e924"; }
.ft-otp-icon-edit-3:before { content: "\e907"; }
.ft-otp-icon-external-link:before { content: "\e925"; }
.ft-otp-icon-eye:before { content: "\e926"; }
.ft-otp-icon-file:before { content: "\e92e"; }
.ft-otp-icon-file-text:before { content: "\e92f"; }
.ft-otp-icon-folder:before { content: "\e930"; }
.ft-otp-icon-grid:before { content: "\e908"; }
.ft-otp-icon-help-circle:before { content: "\e909"; }
.ft-otp-icon-home:before { content: "\e90a"; }
.ft-otp-icon-image:before { content: "\e927"; }
.ft-otp-icon-inbox:before { content: "\e928"; }
.ft-otp-icon-layout:before { content: "\e929"; }
.ft-otp-icon-lock:before { content: "\e90b"; }
.ft-otp-icon-mail:before { content: "\e90c"; }
.ft-otp-icon-menu:before { content: "\e92a"; }
.ft-otp-icon-message-square:before { content: "\e90d"; }
.ft-otp-icon-power:before { content: "\e90e"; }
.ft-otp-icon-settings:before { content: "\e931"; }
.ft-otp-icon-share:before { content: "\e932"; }
.ft-otp-icon-share-2:before { content: "\e933"; }
.ft-otp-icon-shield:before { content: "\e934"; }
.ft-otp-icon-shopping-bag:before { content: "\e90f"; }
.ft-otp-icon-slash:before { content: "\e910"; }
.ft-otp-icon-sliders:before { content: "\e911"; }
.ft-otp-icon-square:before { content: "\e92b"; }
.ft-otp-icon-trash-2:before { content: "\e912"; }
.ft-otp-icon-unlock:before { content: "\e913"; }
.ft-otp-icon-upload:before { content: "\e914"; }
.ft-otp-icon-user:before { content: "\e915"; }
.ft-otp-icon-users:before { content: "\e916"; }
.ft-otp-icon-x-circle:before { content: "\e917"; }


/* -------------------------------------------------------------------------- */
/*                        Global Reset for Plugin                             */
/* -------------------------------------------------------------------------- */

.ft-otp-container a,
.ft-account-wrapper a,
.ft-dashboard-content a {
    text-decoration: none !important;
}

.ft-otp-container a:hover,
.ft-account-wrapper a:hover,
.ft-dashboard-content a:hover {
    text-decoration: none !important;
}

/* -------------------------------------------------------------------------- */
/*                        Login/Register Form Styles                          */
/* -------------------------------------------------------------------------- */

.ft-otp-container {
    max-width: 400px;
    margin: 40px auto;
    font-family: var(--ft-otp-font-family);
    direction: rtl;
    position: relative;
    line-height: 1.6;
}

.ft-otp-container * { box-sizing: border-box; }

.ft-otp-wrapper {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: var(--ft-otp-radius);
    overflow: hidden;
    width: 100%;
    box-shadow: var(--ft-otp-shadow);
    border: 1px solid var(--ft-otp-border-color);
}

.ft-otp-form-wrapper { flex: 1; padding: 30px; position: relative; }

/* Branding */
.ft-otp-branding {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    padding: 20px;
}
.ft-otp-branding-inner { text-align: center; position: relative; z-index: 2; width: 100%; }
.ft-otp-logo-img { max-width: 100%; height: auto; display: inline-block; margin-bottom: 10px; }
.ft-otp-branding-text { font-size: 20px; font-weight: 700; color: var(--ft-otp-text-color); margin: 5px 0; }
.ft-otp-branding-desc { font-size: 13px; color: var(--ft-otp-text-muted); margin: 0; opacity: 0.9; }

/* Layouts */
.ft-otp-layout-top .ft-otp-branding { border-bottom: 1px solid #eee; padding: 25px 30px; }
.ft-otp-layout-top .ft-otp-logo-img { max-height: 80px; }
.ft-otp-layout-right, .ft-otp-layout-left { flex-direction: row; }
.ft-otp-layout-left { flex-direction: row-reverse; }
.ft-otp-layout-right .ft-otp-branding, .ft-otp-layout-left .ft-otp-branding { flex: 1; min-width: 300px; }

/* Titles */
.ft-otp-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--ft-otp-text-color);
    text-align: center;
    margin: 0 0 15px 0;
}
.ft-otp-description, #ft-otp-step-2 p {
    font-size: 14px;
    color: var(--ft-otp-text-muted);
    text-align: center;
    margin: 0 0 25px 0;
    line-height: 1.6;
}
#ft-otp-step-2 p b { direction: ltr; display: inline-block; color: var(--ft-otp-text-color); }

/* Inputs (Global for Plugin) */
.ft-otp-input, 
.ft-otp-form-group textarea, 
.ft-otp-form-group select {
    width: 100%;
    padding: 12px 15px;
    font-size: 14px;
    font-family: inherit;
    color: var(--ft-otp-text-color);
    background-color: var(--ft-otp-input-bg);
    border: 1px solid var(--ft-otp-border-color);
    border-radius: 6px;
    transition: all 0.2s ease-in-out;
    margin-bottom: 15px;
    outline: none;
    box-shadow: none;
}
.ft-otp-input:focus, 
.ft-otp-form-group textarea:focus, 
.ft-otp-form-group select:focus {
    background-color: var(--ft-otp-input-focus-bg);
    border-color: var(--ft-otp-primary-color);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}
.ft-otp-input.ft-otp-input-error {
    border-color: var(--ft-otp-error-text) !important;
    background-color: var(--ft-otp-error-bg) !important;
    color: var(--ft-otp-error-text);
}
#ft-otp-mobile { text-align: center; direction: ltr; font-size: 16px; letter-spacing: 1px; }

/* OTP Digits */
.ft-otp-code-inputs-container { display: flex; justify-content: center; gap: 8px; direction: ltr; margin-bottom: 25px; }
.ft-otp-digit-input {
    min-width: auto !important;
    width: 48px !important; height: 54px !important; font-size: 24px !important;
    font-weight: 600; text-align: center; padding: 0 !important;
    border: 1px solid var(--ft-otp-border-color); background-color: var(--ft-otp-input-bg);
    border-radius: 8px; transition: all 0.2s; color: var(--ft-otp-text-color); -moz-appearance: textfield;
}
.ft-otp-digit-input:focus {
    border-color: var(--ft-otp-primary-color); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08); transform: translateY(-2px);
}
.ft-otp-digit-input.ft-otp-input-error {
    border-color: var(--ft-otp-error-text) !important; background-color: var(--ft-otp-error-bg) !important;
}

/* Buttons */
.ft-otp-button {
    width: 100% !important; 
    padding: 12px 20px; 
    font-size: 15px; 
    font-weight: 600; 
    color: #fff;
    background: var(--ft-otp-primary-color); 
    border: 1px solid var(--ft-otp-btn-border-color);
    border-radius: 6px; 
    cursor: pointer;
    transition: all 0.3s ease; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); 
    position: relative; 
    overflow: hidden;
    display: inline-flex; 
    justify-content: center; 
    align-items: center;
}
.ft-otp-button:hover { 
    background: var(--ft-otp-primary-color-hover); 
    border-color: var(--ft-otp-primary-color-hover);
    transform: translateY(-1px); 
    box-shadow: 0 4px 8px rgba(0,0,0,0.15); 
}
.ft-otp-button:active { transform: translateY(0); box-shadow: none; }
.ft-otp-button:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

/* Links */
.ft-otp-actions { margin-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.ft-otp-links {display: flex;justify-content: space-between;align-items: center;font-size: 13px;flex-direction: row;}
.ft-otp-link {
    color: var(--ft-otp-primary-color); text-decoration: none !important; transition: all 0.2s; font-weight: 500;
    background: transparent; border: none; padding: 0; cursor: pointer;
    text-align: center;
}
.ft-otp-link:hover { color: var(--ft-otp-primary-color-hover); }
.ft-otp-timer { display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--ft-otp-text-muted); }
.ft-otp-timer i { margin-left: 5px; font-size: 15px; }
#ft-otp-timer { font-weight: 600; margin-right: 3px; color: var(--ft-otp-text-color); min-width: 35px; display: inline-block; text-align: left; }

/* Custom Fields in Form */
.ft-otp-fields-row { display: flex; flex-wrap: wrap; gap: 15px;}
.ft-otp-form-group { padding: 0 10px; margin-bottom: 20px; box-sizing: border-box; display: flex; flex-direction: column; }
.ft-otp-form-group label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--ft-otp-text-color); }
.ft-otp-form-group label .required { color: red; }
.ft-field-width-100 { flex: 0 0 100%; max-width: 100%; }
.ft-field-width-50 { flex: 0 0 50%; max-width: 50%; }
.ft-field-width-33 { flex: 0 0 33.333%; max-width: 33.333%; }
.ft-otp-radio-group { display: flex; gap: 15px; padding: 5px 0; }
.ft-otp-radio-group label { font-weight: normal; font-size: 13px; display: flex; align-items: center; gap: 5px; cursor: pointer; }
.ft-otp-checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; line-height: 1.4; }

/* -------------------------------------------------------------------------- */
/*                                  Modals                                    */
/* -------------------------------------------------------------------------- */

.ft-otp-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(3px); z-index: 99999;
    display: flex; justify-content: center; align-items: center;
    visibility: hidden; opacity: 0; transition: all 0.3s ease;
}
.ft-otp-modal-overlay.show { visibility: visible; opacity: 1; }
.ft-otp-modal-content {
    position: relative; width: 90%; transform: scale(0.9); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.ft-otp-modal-overlay.show .ft-otp-modal-content { transform: scale(1); }
.ft-otp-modal-content .ft-otp-container { margin: 0; max-width: 100% !important; }
.ft-otp-modal-close {
    position: absolute; top: 15px; left: 15px; width: 32px; height: 32px; background: transparent;
    border: none; border-radius: 50%;  color: #666;
    font-size: 24px; line-height: 1; display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 100; transition: all 0.3s ease;
}
.ft-otp-modal-close:hover { color: #d63638; transform: rotate(90deg);  background: transparent;}
body.ft-otp-modal-open { overflow: hidden; }

/* Logout Modal */
@keyframes ft-otp-fade-scale-in { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.ft-otp-logout-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(30, 30, 30, 0.7);
    z-index: 99998; display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0s 0.25s;
}
.ft-otp-logout-modal-overlay.show { opacity: 1; visibility: visible; transition-delay: 0s; }
.ft-otp-logout-modal-content {
    background: var(--ft-otp-background-color); padding: 25px 30px; border-radius: 8px; text-align: center;
    width: 90%; max-width: 380px; box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    animation: ft-otp-fade-scale-in 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}
.ft-otp-logout-modal-content h4 { font-size: 20px; margin-top: 0; margin-bottom: 10px; color: var(--ft-otp-text-color); }
.ft-otp-logout-modal-content p { font-size: 15px; color: #555; margin-top: 0; margin-bottom: 25px; line-height: 1.6; }
.ft-otp-logout-modal-actions { display: flex; justify-content: center; gap: 15px; }
.ft-otp-logout-modal-actions .ft-otp-button { width: auto !important; flex-grow: 1; }
.ft-otp-button-confirm { background-color: #dc3545 !important; border-color: #dc3545 !important; }
.ft-otp-button-confirm:hover { background-color: #c82333 !important; border-color: #c82333 !important; }
.ft-otp-button-cancel { background-color: #6c757d !important; color: #fff; border-color: #6c757d !important; }
.ft-otp-button-cancel:hover { background-color: #5a6268 !important; border-color: #5a6268 !important; }
body.ft-otp-modal-open-logout { overflow: hidden; }

/* -------------------------------------------------------------------------- */
/*                                Loader & Toasts                             */
/* -------------------------------------------------------------------------- */

.ft-otp-feedback {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(1px); z-index: 50;
    display: flex; justify-content: center; align-items: center; border-radius: var(--ft-otp-radius);
    visibility: hidden; opacity: 0; transition: all 0.2s ease;
}
.ft-otp-feedback.is-loading { visibility: visible; opacity: 1; }
#ft-otp-loader .spinner {
    width: 40px; height: 40px; border: 3px solid rgba(0,0,0,0.1); border-radius: 50%;
    border-top-color: var(--ft-otp-primary-color); animation: ft-otp-spin 0.8s ease-in-out infinite;
}
@keyframes ft-otp-spin { to { transform: rotate(360deg); } }

#ft-otp-message-container {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 100000;
    display: flex; flex-direction: column; gap: 12px; align-items: center; width: auto; max-width: 90%; pointer-events: none;
}
.ft-otp-toast-message {
    direction: rtl; padding: 16px 24px; border-radius: 12px; font-size: 15px; font-weight: 500;
    line-height: 1.5; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15); display: flex; align-items: center;
    gap: 12px; opacity: 0; transform: translateY(20px); transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    pointer-events: auto; font-family: var(--ft-otp-font-family); min-width: 300px;
}
.ft-otp-toast-message.show { opacity: 1; transform: translateY(0); }
.ft-otp-toast-message i { font-size: 24px; flex-shrink: 0; }
.ft-otp-toast-message span { flex-grow: 1; }
.ft-otp-toast-message.success { background-color: #ffffff; color: #155724; border-right: 6px solid #28a745; }
.ft-otp-toast-message.success i { color: #28a745; }
.ft-otp-toast-message.error { background-color: #ffffff; color: #721c24; border-right: 6px solid #dc3545; }
.ft-otp-toast-message.error i { color: #dc3545; }

/* -------------------------------------------------------------------------- */
/*                         MY ACCOUNT DASHBOARD STYLES                        */
/* -------------------------------------------------------------------------- */

.ft-account-wrapper {
    direction: rtl;
    font-family: var(--ft-otp-font-family);
    margin: 20px 0;
}

.ft-dashboard-layout {
    display: flex;
    margin: 10px;
    background: #fff;
    border: 1px solid var(--ft-otp-border-color);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    align-items: stretch;
}

.ft-dashboard-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: #f9f9f9;
    border-left: 1px solid var(--ft-otp-border-color);
    padding: 0 !important;
    min-height: 100%; 
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.ft-sidebar-sticky-wrapper {
    position: -webkit-sticky;
    position: sticky;
    top: 32px;
    z-index: 2;
}

.ft-dashboard-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ft-dashboard-nav a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #555;
    text-decoration: none !important;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease, color 0.2s ease;
    font-size: 14px;
    border-right: 3px solid transparent;
}

.ft-dashboard-nav a:hover {
    background-color: #f0f0f0;
    color: var(--ft-otp-text-color);
}

.ft-dashboard-nav a.active {
    background-color: #fff;
    font-weight: 600;
    color: var(--ft-otp-primary-color);
    border-right-color: var(--ft-otp-primary-color);
    margin-right: -1px;
}

.ft-dashboard-nav li:last-child a {
    border-bottom: none;
}

.ft-dashboard-nav i {
    font-size: 18px;
    margin-left: 12px;
    width: 20px;
    text-align: center;
}

/* Dashboard Content */
.ft-dashboard-content {
    flex-grow: 1;
    padding: 30px;
    line-height: 1.8;
    min-width: 0;
}

.ft-dashboard-section {
    display: none;
}

.ft-dashboard-section.active {
    display: block;
    animation: ft-otp-fade-in 0.3s ease;
}

@keyframes ft-otp-fade-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.ft-dashboard-section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--ft-otp-text-color);
    margin-top: 0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.ft-dashboard-section-title i {
    font-size: 22px;
    margin-left: 10px;
    color: var(--ft-otp-primary-color);
}

/* Dashboard Forms - Improved Alignment & Borders */
.ft-dashboard-content form fieldset {
    border: 1px solid #e5e5e5;
    padding: 20px 25px;
    border-radius: 8px;
    margin: 25px 0;
    background-color: #fff;
}

.ft-dashboard-content form legend {
    padding: 0 10px;
    font-weight: 600;
    color: var(--ft-otp-text-color);
    font-size: 15px;
}

/* Inputs styling */
.ft-dashboard-content form input[type="text"],
.ft-dashboard-content form input[type="email"],
.ft-dashboard-content form input[type="password"],
.ft-dashboard-content form input[type="tel"] {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--ft-otp-border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    margin-bottom: 0;
    height: 42px;
}

.ft-dashboard-content form input:focus {
    border-color: var(--ft-otp-primary-color);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

/* Disabled input style */
#ft-acc-mobile {
    background-color: #f5f5f5 !important;
    color: #777;
    border-color: #e0e0e0;
    cursor: not-allowed;
}

/* Form Row Grid System */
.ft-dashboard-content .form-row {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
        width: 100%;

}

.ft-dashboard-content form label {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ft-otp-text-color);
}

.ft-dashboard-content form .submit-row {
    padding-top: 10px;
    text-align: left;
}

.ft-dashboard-content form .ft-otp-button {
    width: auto !important;
    padding: 10px 30px;
}

/* Inline links */
.ft-dashboard-content p .ft-dashboard-inline-link {
    text-decoration: none !important;
    color: var(--ft-otp-primary-color);
    font-weight: 600;
    border-bottom: 1px dotted var(--ft-otp-primary-color);
    transition: all 0.2s ease;
}
.ft-dashboard-content p .ft-dashboard-inline-link:hover {
    color: var(--ft-otp-primary-color-hover);
    border-bottom-style: solid;
}

/* -------------------------------------------------------------------------- */
/*                                Inbox Styles                                */
/* -------------------------------------------------------------------------- */

.ft-inbox-badge {
    background-color: #d63638;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    padding: 2px 6px;
    margin-right: auto;
    margin-left: 5px;
    line-height: 1;
    min-width: 18px;
    text-align: center;
}

.ft-inbox-unread-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #d63638;
    border-radius: 50%;
    margin-left: 5px;
}

/* Conversation View */
.ft-conversation-subject {
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    color: var(--ft-otp-text-color);
}

.ft-conversation-messages-container {
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-48 0c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zM11 68c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7z' fill='%23e0e0e0' fill-opacity='0.4' fill-rule='evenodd'/%3E%3C/svg%3E");
    background-color: #f0f2f5;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 15px;
    max-height: 450px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.ft-conversation-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ft-conversation-message {
    max-width: 80%;
    width: fit-content;
    padding: 10px 15px;
    border-radius: 12px;
    line-height: 1.6;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
}

.ft-conversation-message .meta {
    font-size: 11px;
    color: #666;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 4px;
}

.ft-conversation-message .meta strong {
    font-weight: bold;
}

.ft-conversation-message .meta time {
    direction: ltr;
    font-size: 10px;
    opacity: 0.8;
}

.ft-conversation-message .text {
    word-wrap: break-word;
    font-size: 14px;
}
.ft-conversation-message .text p { margin: 0; }

.ft-conversation-message.is-user {
    align-self: flex-end;
    background-color: #dcf8c6;
    border-bottom-right-radius: 2px;
    text-align: right;
}
.ft-conversation-message.is-user .meta strong { color: #128c7e; }

.ft-conversation-message.is-other {
    align-self: flex-start;
    background-color: #fff;
    border-bottom-left-radius: 2px;
    text-align: left;
}
.ft-conversation-message.is-other .meta strong { color: var(--ft-otp-primary-color); }

.ft-reply-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    min-height: 100px;
    margin-bottom: 10px;
    resize: vertical;
}

.ft-reply-actions {
    display: flex;
    justify-content: flex-end;
}
.ft-reply-actions .ft-otp-button { width: auto !important; padding: 10px 25px; }

/* -------------------------------------------------------------------------- */
/*                        Comments & Table Styles                             */
/* -------------------------------------------------------------------------- */

.ft-comments-area { margin-top: 20px; }

.ft-comments-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 14px;
}

.ft-comments-table th,
.ft-comments-table td {
    padding: 12px 15px;
    border: 1px solid var(--ft-otp-border-color);
    text-align: right;
    vertical-align: middle;
}

.ft-comments-table thead th {
    background-color: #f7f7f7;
    font-weight: 600;
    color: var(--ft-otp-text-color);
}

.ft-comments-table tbody tr:nth-child(even) {
    background-color: #fcfcfc;
}
.ft-comments-table tbody tr:hover {
    background-color: #f0f8ff;
}

.ft-comments-table td a {
    color: var(--ft-otp-primary-color);
    text-decoration: none !important;
}
.ft-comments-table td a:hover {
    text-decoration: none !important;
}

/* Pagination */
.ft-pagination-wrapper { margin-top: 25px; text-align: center; }
ul.ft-pagination-list {
    list-style: none; padding: 0; margin: 0; display: flex; justify-content: center; gap: 5px;
}
ul.ft-pagination-list li a, ul.ft-pagination-list li span {
    display: inline-block; padding: 6px 12px; min-width: 36px; height: 36px;
    border: 1px solid var(--ft-otp-border-color); border-radius: 4px;
    color: var(--ft-otp-primary-color); text-decoration: none !important;
    transition: all 0.2s; line-height: 22px;
}
ul.ft-pagination-list li a:hover, ul.ft-pagination-list li .current {
    background-color: var(--ft-otp-primary-color); color: #fff; border-color: var(--ft-otp-primary-color);
}
ul.ft-pagination-list li .dots { border: none; background: none; padding: 6px; }

/* -------------------------------------------------------------------------- */
/*                        WooCommerce Integration                             */
/* -------------------------------------------------------------------------- */
.ft-dashboard-section .woocommerce-orders-table__cell,
.ft-dashboard-section .woocommerce-orders-table__header {
    text-align: right;
    padding: 10px;
}
.ft-dashboard-section .woocommerce-orders-table__cell-order-number a {
    font-weight: bold; color: var(--ft-otp-primary-color); text-decoration: none !important;
}
.ft-dashboard-section .woocommerce-button {
    background-color: var(--ft-otp-primary-color) !important;
    color: #fff !important;
    padding: 8px 16px !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    border: 1px solid var(--ft-otp-btn-border-color) !important;
}
.ft-dashboard-section .woocommerce-button:hover {
    background-color: var(--ft-otp-primary-color-hover) !important;
    border-color: var(--ft-otp-primary-color-hover) !important;
}
.ft-dashboard-section .woocommerce-info,
.ft-dashboard-section .woocommerce-message {
    border-top: 3px solid var(--ft-otp-primary-color) !important;
    background-color: #f9f9f9;
    padding: 15px;
    margin-bottom: 20px;
}
.ft-dashboard-section .woocommerce-info::before,
.ft-dashboard-section .woocommerce-message::before {
    color: var(--ft-otp-primary-color) !important;
}

/* -------------------------------------------------------------------------- */
/*                        Menu Icons & Badges                                 */
/* -------------------------------------------------------------------------- */
.menu-item > a {
    position: relative; display: inline-flex !important; align-items: center; gap: 8px;
}
.ft-menu-icon { line-height: 1; vertical-align: middle; }
.ft-menu-icon-image { max-width: 20px; max-height: 20px; height: auto; width: auto; }
.ft-menu-badge {
    position: absolute; top: 0; right: 0; font-size: 9px; font-weight: 600;
    color: #fff; padding: 2px 5px; border-radius: 4px; line-height: 1;
    transform: translate(-40%, -40%); z-index: 1;
}
html[dir="rtl"] .ft-menu-badge { right: auto; left: 0; }

/* -------------------------------------------------------------------------- */
/*                        Elementor Widget Styles                             */
/* -------------------------------------------------------------------------- */

.ft-otp-elementor-wrapper {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    align-items: center;
}

.ft-otp-elementor-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    transition: all 0.3s ease;
    line-height: 1;
    cursor: pointer;
}

.ft-otp-item-icon {
    display: inline-flex;
    align-items: center;
    position: relative;
    line-height: 0; /* Fix for extra height */
}

.ft-otp-item-icon i {
    font-size: inherit;
}

.ft-otp-item-icon svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
}

/* Avatar Styles */
.ft-otp-avatar img {
    object-fit: cover;
    vertical-align: middle;
}

/* Cart Count */
.ft-otp-cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #d63638;
    color: #fff;
    font-size: 10px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-family: Arial, sans-serif; /* For better number centering */
}

body.rtl .ft-otp-cart-count {
    right: auto;
    left: -8px;
}

/* Dropdown Styles */
.ft-otp-dropdown-wrapper {
    position: relative;
    display: inline-flex;
}

.ft-otp-dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 99;
    display: flex;
    flex-direction: column;
    padding: 10px 0;
    text-align: right; /* Ensure RTL alignment */
}

body.rtl .ft-otp-dropdown-content {
    left: auto;
    right: 0;
}

.ft-otp-dropdown-wrapper:hover .ft-otp-dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ft-otp-dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #333;
    text-decoration: none !important;
    transition: background 0.2s;
    font-size: 14px;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.ft-otp-dropdown-item i, 
.ft-otp-dropdown-item svg {
    width: 1.2em;
    text-align: center;
    flex-shrink: 0;
}

/* Mobile Text Hide */
@media (max-width: 767px) {
    .ft-otp-hide-text-mobile .ft-otp-item-text {
        display: none !important;
    }
    .ft-otp-hide-text-mobile .ft-otp-item-icon {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}


/* Math Captcha Styles */
.ft-otp-math-captcha {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid var(--ft-otp-border-color);
}

.ft-math-label {
    font-weight: bold;
    font-size: 16px;
    color: var(--ft-otp-text-color);
    letter-spacing: 2px;
    direction: ltr;
}

.ft-math-input {
    width: 80px !important;
    text-align: center;
    margin-bottom: 0 !important;
    padding: 8px !important;
    height: 38px;
}

/* -------------------------------------------------------------------------- */
/*                           Side Cart (Mini Cart)                            */
/* -------------------------------------------------------------------------- */

.ft-side-cart-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 99990; opacity: 0; visibility: hidden;
    transition: all 0.3s ease; backdrop-filter: blur(2px);
}
.ft-side-cart-overlay.show { opacity: 1; visibility: visible; }

.ft-side-cart-panel {
    position: fixed; top: 0; bottom: 0;
    width: 350px; max-width: 90%;
    background: #fff; z-index: 99991;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
    display: flex; flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.77, 0, 0.175, 1);
    
    /* تنظیم جهت باز شدن (پیش‌فرض از چپ برای سایت‌های فارسی RTL) */
    left: 0; 
    transform: translateX(-100%);
}

/* اگر می‌خواهید از راست باز شود، دو خط بالا را کامنت و دو خط زیر را فعال کنید */
/* right: 0; transform: translateX(100%); */

.ft-side-cart-panel.open {
    transform: translateX(0);
}

.ft-side-cart-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex; justify-content: space-between; align-items: center;
    background: #f9f9f9;
}
.ft-side-cart-header h3 { margin: 0; font-size: 18px; color: var(--ft-otp-text-color); }

.ft-side-cart-close-btn {
    background: transparent; border: none; font-size: 28px; line-height: 1;
    cursor: pointer; color: #666; padding: 0; margin: 0;
}
.ft-side-cart-close-btn:hover { color: #d63638; }

.ft-side-cart-body {
    flex: 1; padding: 20px; overflow-y: auto;
}

/* استایل‌های داخلی مینی کارت ووکامرس */
.ft-side-cart-body .woocommerce-mini-cart { padding: 0; margin: 0; }
.ft-side-cart-body .woocommerce-mini-cart__empty-message { text-align: center; margin-top: 50px; color: #777; }
.ft-side-cart-body ul.cart_list li, .ft-side-cart-body ul.product_list_widget li {
    padding: 10px 0; border-bottom: 1px solid #eee; display: flex; align-items: center; gap: 10px;
}
.ft-side-cart-body ul.cart_list li img { width: 60px; height: auto; border-radius: 4px; margin-left: 10px; float: none; }
.ft-side-cart-body .mini_cart_item .remove {
    order: -1; color: #d63638 !important; background: rgba(214, 54, 56, 0.1);
    border-radius: 50%; width: 20px; height: 20px; line-height: 20px; text-align: center;
    font-size: 16px; display: inline-block;
}
.ft-side-cart-body .quantity { display: block; font-size: 13px; color: #777; margin-top: 5px; }
.ft-side-cart-body .woocommerce-mini-cart__total {
    margin-top: 20px; padding-top: 15px; border-top: 2px solid #eee;
    font-size: 16px; font-weight: bold; display: flex; justify-content: space-between;
}
.ft-side-cart-body .woocommerce-mini-cart__buttons {
    display: flex; gap: 10px; flex-direction: column; margin-top: 15px;
}
.ft-side-cart-body .woocommerce-mini-cart__buttons .button {
    width: 100%; text-align: center; margin: 0; padding: 12px;
}
.ft-side-cart-body .woocommerce-mini-cart__buttons .button.checkout {
    background-color: var(--ft-otp-primary-color); color: #fff;
}
.ft-side-cart-body .woocommerce-mini-cart__buttons .button:not(.checkout) {
    background-color: #f5f5f5; color: #333;
}

body.ft-side-cart-open { overflow: hidden; }

/* -------------------------------------------------------------------------- */
/*                           Side Cart (Mini Cart) - Premium Style            */
/* -------------------------------------------------------------------------- */

/* لایه تاریک پشت صفحه */
.ft-side-cart-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4); z-index: 99990; opacity: 0; visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    backdrop-filter: blur(3px); /* افکت بلور برای پس‌زمینه */
}
.ft-side-cart-overlay.show { opacity: 1; visibility: visible; }

/* پنل اصلی سبد خرید */
.ft-side-cart-panel {
    position: fixed; top: 0; bottom: 0;
    width: 400px; max-width: 85vw; /* در موبایل خیلی پهن نشود */
    background: #fff; z-index: 999991;
    box-shadow: 0 0 30px rgba(0,0,0,0.15);
    display: flex; flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    /* جهت باز شدن: پیش‌فرض از چپ (برای تغییر به راست، مقادیر زیر را تغییر دهید) */
    left: 0; 
    transform: translateX(-105%); 
}

/* برای باز شدن از راست (در صورت نیاز کامنت بالا را غیرفعال و این را فعال کنید) */
/* right: 0; transform: translateX(105%); */

.ft-side-cart-panel.open {
    transform: translateX(0);
}

/* هدر سبد خرید */
.ft-side-cart-header {
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f0;
    display: flex; justify-content: space-between; align-items: center;
    background: #fff;
}
.ft-side-cart-header h3 { 
    margin: 0; font-size: 18px; font-weight: 700; color: var(--ft-otp-text-color); 
    display: flex; align-items: center; gap: 10px;
}
.ft-side-cart-close-btn {
    background: transparent; border: none; font-size: 28px; line-height: 1;
    cursor: pointer; color: #999; padding: 5px; margin: 0; transition: color 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.ft-side-cart-close-btn:hover { color: #d63638; }

/* بدنه سبد خرید (لیست محصولات) */
.ft-side-cart-body {
    flex: 1; padding: 0; overflow-y: auto;
    /* اسکرول‌بار سفارشی */
    scrollbar-width: thin; scrollbar-color: #ddd transparent;
}
.ft-side-cart-body::-webkit-scrollbar { width: 6px; }
.ft-side-cart-body::-webkit-scrollbar-thumb { background-color: #ddd; border-radius: 3px; }

.ft-side-cart-body .widget_shopping_cart_content {
    height: 100%; display: flex; flex-direction: column;
}

/* پیام خالی بودن سبد */
.ft-side-cart-body .woocommerce-mini-cart__empty-message {
    text-align: center; margin: auto; color: #777; padding: 20px;
    display: flex; flex-direction: column; align-items: center; gap: 15px;
}
.ft-side-cart-body .woocommerce-mini-cart__empty-message:before {
    content: "\e90f"; /* آیکون سبد خرید از فونت افزونه */
    font-family: 'Ft-OTP'; font-size: 40px; color: #eee;
}

/* لیست آیتم‌ها */
.ft-side-cart-body ul.cart_list, 
.ft-side-cart-body ul.product_list_widget {
    list-style: none; padding: 0; margin: 0; flex: 1;
}

.ft-side-cart-body ul.cart_list li, 
.ft-side-cart-body ul.product_list_widget li {
    padding: 20px 25px; 
    border-bottom: 1px solid #f5f5f5; 
    display: flex; 
    align-items: center; 
    gap: 15px;
    position: relative;
    transition: background 0.2s;
}
.ft-side-cart-body ul.cart_list li:hover { background-color: #fafafa; }

/* تصویر محصول */
.ft-side-cart-body ul.cart_list li img { 
    width: 70px; height: 70px; 
    object-fit: cover; 
    border-radius: 8px; 
    margin: 0 !important; 
    float: none !important; 
    border: 1px solid #eee;
}

/* لینک محصول (عنوان) */
.ft-side-cart-body ul.cart_list li a:not(.remove) {
    font-weight: 600; color: var(--ft-otp-text-color); font-size: 14px;
    display: block; margin-bottom: 5px; line-height: 1.4;
}

/* تعداد و قیمت */
.ft-side-cart-body .quantity { 
    display: block; font-size: 13px; color: #777; 
}
.ft-side-cart-body .amount { 
    color: var(--ft-otp-text-color); font-weight: 700; 
}

/* دکمه حذف */
.ft-side-cart-body .mini_cart_item .remove {
    position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
    color: #ccc !important; background: transparent !important;
    border: 1px solid #eee; border-radius: 50%; 
    width: 24px; height: 24px; line-height: 22px; text-align: center;
    font-size: 16px; transition: all 0.2s;
}
.ft-side-cart-body .mini_cart_item .remove:hover {
    color: #fff !important; background: #d63638 !important; border-color: #d63638;
}

/* فوتر سبد خرید (جمع کل و دکمه‌ها) */
.ft-side-cart-body .woocommerce-mini-cart__total {
    margin: 0; padding: 20px 25px; 
    background: #fcfcfc; border-top: 1px solid #eee;
    font-size: 16px; font-weight: 700; color: var(--ft-otp-text-color);
    display: flex; justify-content: space-between; align-items: center;
}
.ft-side-cart-body .woocommerce-mini-cart__total strong { font-weight: 500; color: #777; }

.ft-side-cart-body .woocommerce-mini-cart__buttons {
    display: flex; gap: 10px; flex-direction: column; 
    padding: 0 25px 25px 25px; background: #fcfcfc; margin: 0;
}

.ft-side-cart-body .woocommerce-mini-cart__buttons .button {
    width: 100%; text-align: center; margin: 0; padding: 14px;
    border-radius: 8px; font-size: 14px; font-weight: 600;
    transition: all 0.3s ease;
}

/* دکمه تسویه حساب (اصلی) */
.ft-side-cart-body .woocommerce-mini-cart__buttons .button.checkout {
    background-color: var(--ft-otp-primary-color) !important; 
    color: #fff !important;
    border: 1px solid var(--ft-otp-primary-color) !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.ft-side-cart-body .woocommerce-mini-cart__buttons .button.checkout:hover {
    background-color: var(--ft-otp-primary-color-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

/* دکمه مشاهده سبد خرید (ثانویه) */
.ft-side-cart-body .woocommerce-mini-cart__buttons .button:not(.checkout) {
    background-color: #fff !important; 
    color: var(--ft-otp-text-color) !important;
    border: 1px solid #ddd !important;
}
.ft-side-cart-body .woocommerce-mini-cart__buttons .button:not(.checkout):hover {
    background-color: #f5f5f5 !important;
    border-color: #ccc !important;
}

/* جلوگیری از اسکرول صفحه وقتی منو باز است */
body.ft-side-cart-open { overflow: hidden; }

/* راست‌چین کردن محتوا برای زبان فارسی */
.ft-side-cart-panel { direction: rtl; text-align: right; }
/* -------------------------------------------------------------------------- */
/*                             Responsive Styles                              */
/* -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    /* حذف حاشیه و سایه در موبایل */
    .ft-otp-container .ft-otp-wrapper {
        border: none !important;
        box-shadow: none !important;
        flex-direction: column !important; /* چینش ستونی اجباری */
    }

    /* ترتیب: فرم همیشه بالا */
    .ft-otp-form-wrapper {
        order: 1 !important;
        padding: 15px !important; /* پدینگ کمتر برای موبایل */
    }

    /* ترتیب: تصویر/برند همیشه پایین (یا مخفی اگر بخواهید) */
    .ft-otp-branding {
display: none !important;
    }

    /* اجبار به ستونی شدن در تمامی حالات چیدمان */
    .ft-otp-layout-right, .ft-otp-layout-left {
        flex-direction: column !important;
    }
    
    .ft-field-width-50, .ft-field-width-33 { flex: 0 0 100%; max-width: 100%; }
    
    /* Dashboard Mobile */
    .ft-dashboard-layout { flex-direction: column; }
    
    .ft-dashboard-sidebar { 
        width: 100%; 
        border-left: none; 
        border-bottom: 1px solid var(--ft-otp-border-color);
        min-height: auto; 
        border-radius: 8px 8px 0 0;
    }
    
    .ft-dashboard-nav ul { display: flex; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
    .ft-dashboard-nav a { padding: 12px 15px; border-right: none; border-bottom: 3px solid transparent; flex-direction: column; gap: 5px; font-size: 12px; }
    .ft-dashboard-nav a.active { border-right: none; border-bottom-color: var(--ft-otp-primary-color); background-color: #f9f9f9; }
    .ft-dashboard-nav i { margin: 0; font-size: 20px; }
    
    .ft-dashboard-content { padding: 20px 15px; }
    
    .ft-comments-table { display: block; overflow-x: auto; }
    
    .ft-dashboard-content form .form-row { flex-direction: column; align-items: stretch; margin-bottom: 15px; }
    .ft-dashboard-content form label { width: 100%; padding-left: 0; margin-bottom: 5px; }
}