/* ═══════════════════════════════════════════════════════
   استایل عمومی رزرو اقامت
   ═══════════════════════════════════════════════════════ */

.tr-booking-wrapper,
.tr-my-bookings-wrapper,
.tr-profile-wrapper {
    max-width: 1200px;
    margin: 30px auto;
    direction: rtl;
    font-family: Tahoma, sans-serif;
}

.tr-box {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 22px 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

.tr-box h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 12px;
}

.tr-box h4 {
    color: #555;
    margin: 15px 0 10px;
}

/* ═══ ورودی‌ها ═══ */
.tr-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    box-sizing: border-box;
    transition: border-color .2s;
    direction: rtl;
}

.tr-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,.1);
}

/* ═══ جداول ═══ */
.tr-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    margin: 10px 0;
    font-size: 13px;
}

.tr-table th,
.tr-table td {
    padding: 10px 12px;
    text-align: right;
    border-bottom: 1px solid #eee;
}

.tr-table thead th {
    background: #f7f7f9;
    font-weight: bold;
    color: #555;
    font-size: 12px;
}

.tr-table tbody tr:hover {
    background: #fafbff;
}

/* ═══ جدول بازه‌ها ═══ */
.tr-ranges-table tr.tr-range-selected {
    background: #eef4ff;
}

.tr-ranges-table tr.tr-range-full {
    opacity: .9;
    background: #fef9f3;
}

.tr-ranges-table tr.tr-range-full:hover {
    opacity: 1;
    background: #fff3e0;
}

.tr-ranges-table tr.tr-range-full.tr-range-selected {
    opacity: 1;
    background: #fff3e0;
    border-right: 3px solid #e67e22;
}

.tr-ranges-table tr.tr-range-full td {
    color: #8a5a00;
}

/* ═══ دکمه‌ها ═══ */
.tr-btn {
    display: inline-block;
    padding: 9px 18px;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
    text-align: center;
}

.tr-btn-sm { padding: 5px 12px; font-size: 12px; }
.tr-btn-lg { padding: 12px 32px; font-size: 15px; }

.tr-btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    box-shadow: 0 4px 12px rgba(102,126,234,.3);
}

.tr-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(102,126,234,.4);
    color: #fff;
}

.tr-btn-outline {
    background: #fff;
    color: #667eea;
    border: 1.5px solid #667eea;
}

.tr-btn-outline:hover {
    background: #667eea;
    color: #fff;
}

.tr-btn-danger {
    background: #e74c3c;
    color: #fff;
}

.tr-btn-danger:hover {
    background: #c0392b;
    color: #fff;
}

.tr-btn-block { width: 100%; }

/* ═══ هشدارها ═══ */
.tr-alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 13.5px;
    line-height: 1.7;
}

.tr-alert-success { background: #d4edda; color: #155724; border-right: 4px solid #28a745; }
.tr-alert-error   { background: #f8d7da; color: #721c24; border-right: 4px solid #dc3545; }
.tr-alert-warning { background: #fff3cd; color: #856404; border-right: 4px solid #ffc107; }
.tr-alert-info    { background: #d1ecf1; color: #0c5460; border-right: 4px solid #17a2b8; }

/* هشدار بازه تکمیل */
#tr-full-warning {
    border-right-width: 6px;
    font-size: 14px !important;
    line-height: 1.9;
    padding: 16px 20px;
    margin-bottom: 20px;
}

#tr-full-warning strong {
    color: #8a5a00;
}

/* ═══ بج‌ها ═══ */
.tr-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11.5px;
    font-weight: bold;
}

.tr-badge-green  { background: #d4edda; color: #155724; }
.tr-badge-orange { background: #ffe5b4; color: #8a5a00; }
.tr-badge-gray   { background: #e2e3e5; color: #555; }
.tr-badge-red    { background: #f8d7da; color: #721c24; }

/* ═══ کمکی‌ها ═══ */
.tr-remove-row {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
}

.tr-remove-row:hover { color: #c0392b; }

.tr-hint { color: #777; font-size: 12.5px; margin: 5px 0 12px; }
.tr-red  { color: #c00; }
.tr-green { color: #080; }
.tr-orange { color: #e67e22; }
.tr-muted { color: #aaa; }

.tr-loading { text-align: center; padding: 20px; color: #888; }
.tr-actions { margin-top: 20px; text-align: center; }

.tr-summary {
    margin-top: 20px;
    padding: 15px;
    background: #f9fafc;
    border-radius: 10px;
    border: 1px solid #e5e5e5;
}

.tr-summary h4 { margin-top: 0; }

.tr-primary-section,
.tr-companions-section { margin-top: 20px; }

/* ═══════════════════════════════════════════════════════
   گروه‌بندی مسافران (دسته اول / دسته دوم)
   ═══════════════════════════════════════════════════════ */

.tr-group-section {
    margin-top: 25px;
    padding: 18px;
    border-radius: 12px;
    border: 2px solid #e5e5e5;
    background: #fafbfd;
}

.tr-group-primary {
    border-color: #a5d6a7;
    background: #f6fdf7;
}

.tr-group-secondary {
    border-color: #ffcc80;
    background: #fffaf3;
}

.tr-group-section h4 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tr-summary-total {
    background: #eef4ff;
    border-top: 2px solid #667eea;
}

.tr-summary-total th,
.tr-summary-total td {
    font-size: 15px !important;
    padding: 12px !important;
}

/* ═══════════════════════════════════════════════════════
   باکس تعهدنامه در فرم رزرو
   ═══════════════════════════════════════════════════════ */

.tr-terms-section {
    margin-top: 25px;
    padding: 20px;
    background: #f9f5ff;
    border: 2px solid #c5b3e6;
    border-radius: 12px;
}

.tr-terms-section h4 {
    margin-top: 0;
    color: #5b3d91;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tr-terms-box {
    margin: 15px 0;
    border: 1px solid #d5c8e8;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.tr-terms-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 18px;
    background: #efe7fb;
    border: none;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: bold;
    color: #5b3d91;
    cursor: pointer;
    text-align: right;
    transition: background .2s;
}

.tr-terms-toggle:hover { background: #e5d8f8; }

.tr-terms-toggle-icon {
    font-size: 12px;
    transition: transform .2s;
}

.tr-terms-content {
    padding: 20px 22px;
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.9;
    font-size: 13.5px;
    color: #333;
    border-top: 1px solid #e5d8f8;
    background: #fefeff;
}

.tr-terms-content h1,
.tr-terms-content h2,
.tr-terms-content h3 {
    color: #5b3d91;
    margin-top: 18px;
    margin-bottom: 10px;
}

.tr-terms-content p { margin: 10px 0; }

.tr-terms-content ul,
.tr-terms-content ol {
    padding-right: 25px;
    margin: 10px 0;
}

.tr-terms-content li { margin: 5px 0; }

.tr-terms-content blockquote {
    border-right: 4px solid #c5b3e6;
    padding: 8px 15px;
    margin: 12px 0;
    background: #f9f5ff;
    color: #5b3d91;
    font-style: italic;
}

.tr-terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 18px;
    background: #fff;
    border: 2px solid #c5b3e6;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: all .2s;
    margin-top: 15px;
}

.tr-terms-checkbox:hover {
    background: #fdf9ff;
    border-color: #5b3d91;
}

.tr-terms-checkbox input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #5b3d91;
}

.tr-terms-checkbox .required {
    color: #c00;
    font-weight: bold;
    margin-right: 4px;
}

/* ═══════════════════════════════════════════════════════
   صفحه عمومی تعهدنامه
   ═══════════════════════════════════════════════════════ */

.tr-terms-page {
    max-width: 900px;
    margin: 30px auto;
    direction: rtl;
    font-family: Tahoma, sans-serif;
}

.tr-terms-page-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 3px solid #c5b3e6;
}

.tr-terms-page-header h2 {
    color: #5b3d91;
    font-size: 26px;
    margin: 0 0 8px;
}

.tr-terms-page-content {
    background: #fff;
    padding: 30px 35px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(91,61,145,.08);
    line-height: 2;
    font-size: 14px;
    color: #333;
}

.tr-terms-page-content h1,
.tr-terms-page-content h2,
.tr-terms-page-content h3 {
    color: #5b3d91;
    border-bottom: 2px solid #efe7fb;
    padding-bottom: 8px;
    margin-top: 25px;
}

.tr-terms-page-content ul,
.tr-terms-page-content ol {
    padding-right: 25px;
}

.tr-terms-page-content blockquote {
    border-right: 4px solid #5b3d91;
    padding: 10px 18px;
    background: #f9f5ff;
    border-radius: 8px;
    color: #5b3d91;
    margin: 15px 0;
}

/* ═══════════════════════════════════════════════════════
   باکس سهمیه در صفحه «رزروهای من»
   ═══════════════════════════════════════════════════════ */

.tr-quota-summary-box {
    background: linear-gradient(135deg, #f9f5ff 0%, #f0eaff 100%);
    border: 2px solid #c5b3e6;
    box-shadow: 0 4px 20px rgba(91,61,145,.08);
}

.tr-quota-summary-box h3 {
    color: #5b3d91;
    border-bottom: 2px solid #c5b3e6;
}

.tr-quota-summary-table {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(91,61,145,.06);
}

.tr-quota-summary-table thead th {
    background: #efe7fb;
    color: #5b3d91;
    font-size: 13px;
    padding: 12px;
}

.tr-quota-summary-table tbody td {
    padding: 14px 12px;
    vertical-align: middle;
}

.tr-quota-summary-table tbody tr:hover {
    background: #fdf9ff;
}

/* ═══ Responsive ═══ */
@media (max-width: 768px) {
    .tr-bookings-table {
        font-size: 11px;
    }
    .tr-bookings-table th,
    .tr-bookings-table td {
        padding: 6px 4px;
    }
    .tr-quota-summary-table thead th,
    .tr-quota-summary-table tbody td {
        padding: 8px 6px;
        font-size: 11px;
    }
}