/* ==========================================================================
   ۱. بخش کانتینر قفل شیشه‌ای (نسخه دسکتاپ / اصلی سیستم)
   ========================================================================== */
.rezam-comment-form-container-locked {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.rezam-comment-form-container-locked #commentform {
    filter: blur(5px);
    -webkit-filter: blur(5px);
    pointer-events: none;
    user-select: none;
    opacity: 0.5;
}

.rezam-glass-overlay-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--rezam-bg);
    backdrop-filter: blur(var(--rezam-blur));
    -webkit-backdrop-filter: blur(var(--rezam-blur));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99;
}

.rezam-glass-content {
    text-align: center;
    padding: 25px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-width: 85%;
}

.rezam-glass-content h3 {
    margin-bottom: 20px;
    font-size: 1rem;
    color: var(--rezam-text);
}

.rezam-glass-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.rezam-btn {
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s ease-in-out;
    display: inline-block;
}

.rezam-btn-login {
    background-color: var(--rezam-btn);
    color: #fff !important;
}

.rezam-btn-register {
    background-color: transparent;
    color: var(--rezam-btn) !important;
    border: 2px solid var(--rezam-btn);
}


/* ==========================================================================
   ۲. دکمه‌های اصلی، باکس پاسخ پوسته و زیباسازی دکمه لغو
   ========================================================================== */
#submit, 
.form-submit input[type="submit"],
#respond input[type="submit"] {
    background-color: var(--rezam-btn) !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 30px !important;
    font-size: 0.9rem !important;
    font-weight: bold !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: all 0.2s ease-in-out !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

#submit:hover, 
.form-submit input[type="submit"]:hover {
    opacity: 0.95 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15) !important;
}

#respond {
    background: #ffffff !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 4px !important;
    padding: 22px !important;
    margin: 15px 0 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.01) !important;
}

#respond h3#reply-title {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-size: 0.95rem !important;
    margin-bottom: 15px !important;
    color: #1e293b !important;
    width: 100%;
}

#cancel-comment-reply-link {
    background: #f1f5f9 !important;
    color: #64748b !important;
    padding: 5px 14px !important;
    border-radius: 6px !important;
    font-size: 0.78rem !important;
    text-decoration: none !important;
    font-weight: normal !important;
    border: 1px solid #e2e8f0 !important;
    transition: all 0.2s ease !important;
}

#cancel-comment-reply-link:hover {
    background: #fee2e2 !important;
    color: #ef4444 !important;
    border-color: #fca5a5 !important;
}

.logged-in-as, 
.comment-notes {
    display: none !important;
}


/* ==========================================================================
   ۳. فیلد گزینه‌های پیشنهاد
   ========================================================================== */
.rezam-comment-recommendation-box {
    margin: 14px 0;
    padding: 12px;
    background: #fafafa;
    border: 1px solid #edf2f7;
    border-radius: 4px;
}

.rezam-rec-title {
    display: block;
    margin-bottom: 6px;
    font-size: 0.8rem;
    font-weight: bold;
    color: #4a5568;
}

.rezam-comment-recommendation-box .rezam-rec-options {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
    position: relative;
    z-index: 999;
}

.rezam-radio-hidden {
    display: none !important;
}

.rezam-rec-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 4px;
    background: #fff;
    border: 1px solid #e2e8f0;
    font-size: 0.75rem;
    color: #718096;
    transition: all 0.15s ease;
    user-select: none;
    white-space: nowrap;
    position: relative;
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
}

.rezam-rec-label .rezam-icon {
    font-size: 0.85rem;
}

.rezam-rec-label *,
.rezam-rec-label span {
    pointer-events: none !important;
}

#rezam_rec_yes:checked + .rezam-rec-yes,
.rezam-rec-label.active.rezam-rec-yes, 
.rezam-rec-label.rezam-checked.rezam-rec-yes {
    background: #e6f4ea !important;
    border-color: #34a853 !important;
    color: #137333 !important;
    box-shadow: 0 2px 6px rgba(52, 168, 83, 0.15);
}

#rezam_rec_no:checked + .rezam-rec-no,
.rezam-rec-label.active.rezam-rec-no, 
.rezam-rec-label.rezam-checked.rezam-rec-no {
    background: #fce8e6 !important;
    border-color: #ea4335 !important;
    color: #c5221f !important;
    box-shadow: 0 2px 6px rgba(234, 67, 53, 0.15);
}


/* ==========================================================================
   ۴. سیستم رای‌دهی و اصلاح ساختار خط امتدادی پاسخ‌ها
   ========================================================================== */
.rezam-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-bottom: 6px;
}

.badge-recommend { background-color: #e6f4ea; color: #137333; }
.badge-not-recommend { background-color: #fce8e6; color: #c5221f; }

.rezam-comment-voting-bar {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.rezam-vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 4px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.75rem;
    color: #718096;
    transition: all 0.2s;
}

.rezam-vote-btn:hover { background: #f7fafc; color: #2d3748; }
.rezam-like-btn:hover { border-color: #34a853; color: #34a853; }
.rezam-dislike-btn:hover { border-color: #ea4335; color: #ea4335; }

.children {
    margin-right: 16px !important; 
    padding-right: 12px !important;
    border-right: 2px solid #e2e8f0 !important; 
}

.children .comment {
    margin-right: 0 !important;
    border-right: none !important;
    padding-right: 0 !important;
}


/* ==========================================================================
   ۵. دکمه شناور موبایل (FAB)
   ========================================================================== */
.rezam-mobile-fab-container {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: none;
    width: auto;
    text-align: center;
}

.rezam-fab-btn {
    background: var(--rezam-btn);
    color: #fff;
    border: none;
    padding: 12px 26px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s ease, background 0.2s ease;
}

.rezam-fab-btn:active {
    transform: scale(0.96);
}


/* ==========================================================================
   ۶. مودال توییتر موبایل
   ========================================================================== */
.rezam-twt-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    z-index: 1000000;
    display: none;
    align-items: flex-end;
}

.rezam-twt-modal-window {
    width: 100%;
    background: #fff;
    border-radius: 16px 16px 0 0;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    direction: rtl;
    animation: rezamTwtSlideUp 0.3s cubic-bezier(0.15, 0.85, 0.3, 1);
}

.rezam-twt-modal-window .rezam-rec-label {
    cursor: pointer !important;
    pointer-events: auto !important;
    z-index: 9999;
}

.rezam-twt-modal-header {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.rezam-twt-close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #64748b;
    margin-left: 15px;
}

.rezam-twt-header-title {
    font-weight: bold;
    font-size: 1rem;
    color: #0f172a;
}

.rezam-twt-modal-body {
    padding: 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.rezam-twt-user-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.rezam-twt-avatar {
    width: 38px;
    height: 38px;
    background: #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.rezam-twt-user-row textarea {
    flex: 1;
    border: none;
    resize: none;
    min-height: 110px;
    font-size: 0.95rem;
    outline: none;
    padding-top: 4px;
}

.rezam-modal-glass-lock {
    text-align: center;
    padding: 30px 10px;
}

.rezam-twt-modal-footer {
    display: block !important;
    padding: 12px 16px 16px 16px;
    border-top: 1px solid #f1f5f9;
    width: 100%;
    box-sizing: border-box;
}

.rezam-twt-main-submit {
    width: 100% !important;
    display: block !important;
    background-color: var(--rezam-btn) !important;
    color: #fff !important;
    border: none !important;
    padding: 14px 0 !important;
    font-size: 0.95rem !important;
    font-weight: bold !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    text-align: center !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.2s ease-in-out !important;
}

.rezam-twt-main-submit:hover {
    opacity: 0.95 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15) !important;
}


/* ==========================================================================
   ۷. پاپ‌آپ سفارشی سیستم (Alert)
   ========================================================================= */
.rezam-alert-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2000000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.rezam-alert-card {
    background: #fff;
    width: 100%;
    max-width: 320px;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    animation: rezamPopIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    direction: rtl;
}

.rezam-alert-icon-wrap {
    font-size: 2rem;
    margin-bottom: 12px;
}

.rezam-alert-card p {
    font-size: 0.9rem;
    color: #334155;
    margin-bottom: 20px;
    line-height: 1.6;
}

.rezam-alert-dismiss-btn {
    background: #0f172a;
    color: #fff;
    border: none;
    padding: 11px 0;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.85rem;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    transition: background 0.2s;
}

.rezam-alert-dismiss-btn:hover {
    background: #1e293b;
}


/* ==========================================================================
   ۸. کارت و فرم احراز هویت پیامکی مدرن (استفاده کامل از فونت اصلی سایت)
   ========================================================================== */
.rezam-auth-container {
    max-width: 440px;
    width: 100%;
    margin: 40px auto;
    padding: 35px 28px;
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
    direction: rtl;
    box-sizing: border-box;
    text-align: right;
}

.rezam-auth-step {
    width: 100%;
    box-sizing: border-box;
}

.rezam-auth-title {
    margin: 0 0 10px 0 !important;
    font-size: 1.3rem !important;
    font-weight: 800 !important;
    color: #1a202c !important;
    text-align: center !important;
}

.rezam-auth-sub {
    font-size: 0.9rem !important;
    color: #718096 !important;
    margin: 0 0 24px 0 !important;
    text-align: center !important;
    line-height: 1.6 !important;
}

.rezam-mobile-holder {
    font-weight: bold;
    color: #2b6cb0;
    direction: ltr;
    display: inline-block;
}

.rezam-change-mobile-btn {
    color: #e53e3e !important;
    text-decoration: none !important;
    font-size: 0.8rem !important;
    font-weight: normal;
    margin-right: 6px;
}

.rezam-change-mobile-btn:hover {
    text-decoration: underline !important;
}

.rezam-form-group {
    margin-bottom: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.rezam-form-group input {
    width: 100% !important;
    height: 48px !important;
    padding: 0 16px !important;
    background: #f8fafc !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 10px !important;
    font-size: 0.95rem !important;
    color: #2d3748 !important;
    box-sizing: border-box !important;
    outline: none !important;
    transition: all 0.2s ease !important;
}

.rezam-form-group input:focus {
    background: #fff !important;
    border-color: var(--rezam-btn, #0073aa) !important;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.12) !important;
}

.rezam-password-group {
    position: relative !important;
}

.rezam-password-group input {
    padding-left: 45px !important;
}

.rezam-toggle-pwd {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    user-select: none;
    font-size: 1.1rem;
    opacity: 0.6;
    transition: opacity 0.2s;
    line-height: 1;
}

.rezam-toggle-pwd:hover {
    opacity: 1;
}

.rezam-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 20px;
    color: #718096;
}

.rezam-form-actions a {
    color: var(--rezam-btn, #0073aa);
    text-decoration: none;
}

.rezam-form-actions a:hover {
    text-decoration: underline;
}

.rezam-btn-primary {
    width: 100% !important;
    height: 48px !important;
    background: var(--rezam-btn, #0073aa) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 1rem !important;
    font-weight: bold !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

.rezam-btn-primary:hover {
    opacity: 0.93 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15) !important;
}

.rezam-btn-primary:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.rezam-auth-notice {
    margin-top: 18px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.88rem;
    text-align: center;
    line-height: 1.5;
}

.notice-error {
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #feb2b2;
}

.notice-success {
    background: #f0fff4;
    color: #276749;
    border: 1px solid #9ae6b4;
}


/* ==========================================================================
   ۹. انیمیشن‌ها و ریسپانسیو (Media Queries)
   ========================================================================== */
@keyframes rezamTwtSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes rezamPopIn {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@media (max-width: 767px) {
    .rezam-mobile-fab-container {
        display: block;
    }

    .rezam-auth-container {
        margin: 20px 12px;
        padding: 24px 16px;
    }
}