/**
 * Frontend Stylesheet for Apartment Booking Manager.
 * Fully responsive, accessible, mobile-first design.
 */

:root {
    --abm-primary: #0d6efd;
    --abm-primary-hover: #0b5ed7;
    --abm-secondary: #64748b;
    --abm-secondary-hover: #475569;
    --abm-success: #16a34a;
    --abm-danger: #dc2626;
    --abm-warning: #f59e0b;
    --abm-bg: #ffffff;
    --abm-border: #e2e8f0;
    --abm-text: #1e293b;
    --abm-text-muted: #64748b;
    --abm-radius: 8px;
    --abm-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.abm-container {
    max-width: 960px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--abm-text);
    box-sizing: border-box;
}

.abm-container *,
.abm-container *::before,
.abm-container *::after {
    box-sizing: border-box;
}

/* Cards */
.abm-search-card,
.abm-customer-form-card,
.abm-confirmation-card,
.abm-apartment-card {
    background: var(--abm-bg);
    border: 1px solid var(--abm-border);
    border-radius: var(--abm-radius);
    padding: 24px;
    box-shadow: var(--abm-shadow);
    margin-bottom: 24px;
}

.abm-search-title,
.abm-card-title,
.abm-results-heading,
.abm-confirmation-title {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 700;
    color: var(--abm-text);
}

/* Form Grids */
.abm-search-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    align-items: flex-end;
}

.abm-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .abm-grid-2,
    .abm-search-form-grid {
        grid-template-columns: 1fr;
    }
}

.abm-form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.abm-form-group label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--abm-text);
}

.abm-form-group input,
.abm-form-group select,
.abm-form-group textarea {
    padding: 10px 14px;
    border: 1px solid var(--abm-border);
    border-radius: 6px;
    font-size: 14px;
    color: var(--abm-text);
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    width: 100%;
}

.abm-form-group input:focus,
.abm-form-group select:focus,
.abm-form-group textarea:focus {
    border-color: var(--abm-primary);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
    outline: none;
}

.abm-field-hint {
    font-size: 11px;
    color: var(--abm-text-muted);
    margin-top: 4px;
}

/* Buttons */
.abm-btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    transition: background 0.15s ease, transform 0.1s ease;
}

.abm-btn:active {
    transform: scale(0.98);
}

.abm-btn-primary {
    background: var(--abm-primary);
    color: #fff;
}

.abm-btn-primary:hover {
    background: var(--abm-primary-hover);
    color: #fff;
}

.abm-btn-secondary {
    background: var(--abm-secondary);
    color: #fff;
}

.abm-btn-secondary:hover {
    background: var(--abm-secondary-hover);
    color: #fff;
}

.abm-btn-large {
    padding: 14px 28px;
    font-size: 16px;
}

/* Apartments Results Grid */
.abm-apartments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.abm-apartment-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--abm-border);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.abm-apartment-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.abm-apt-header h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--abm-text);
}

.abm-apt-specs {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--abm-text-muted);
}

.abm-apt-spec-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.abm-apt-address {
    font-size: 13px;
    color: var(--abm-text-muted);
    margin-bottom: 16px;
}

.abm-apt-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--abm-border);
}

.abm-apt-footer .abm-btn {
    width: 100%;
}

/* Selected Summary Bar */
.abm-selected-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    background: #f8fafc;
    border: 1px solid var(--abm-border);
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 24px;
}

.abm-summary-item {
    display: flex;
    flex-direction: column;
}

.abm-summary-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--abm-text-muted);
    font-weight: 600;
}

.abm-summary-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--abm-text);
}

/* Alerts */
.abm-alert {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 16px;
}

.abm-alert-danger {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.abm-alert-success {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
}

.abm-alert-info {
    background: #e0f2fe;
    border: 1px solid #7dd3fc;
    color: #0369a1;
}

/* Confirmation Card */
.abm-confirmation-card {
    text-align: center;
    padding: 40px 24px;
}

.abm-confirmation-icon {
    margin-bottom: 16px;
}

.abm-confirmation-subtitle {
    color: var(--abm-text-muted);
    font-size: 15px;
    margin-bottom: 24px;
}

.abm-confirmation-details-box {
    background: #f8fafc;
    border: 1px solid var(--abm-border);
    border-radius: 8px;
    max-width: 400px;
    margin: 0 auto 24px;
    padding: 16px 20px;
}

.abm-confirm-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.abm-confirm-row:not(:last-child) {
    border-bottom: 1px solid var(--abm-border);
}

.abm-badge-reference {
    font-family: monospace;
    font-size: 15px;
    font-weight: 700;
    color: var(--abm-primary);
}

.abm-badge-pending-status {
    background: #fef3c7;
    color: #92400e;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.abm-confirmation-notice {
    max-width: 500px;
    margin: 0 auto;
    font-size: 13px;
    color: var(--abm-text-muted);
}

/* ==========================================
   Inline Login Card
   ========================================== */
.abm-login-card {
    background: var(--abm-bg);
    border: 1px solid var(--abm-border);
    border-radius: var(--abm-radius);
    padding: 36px 30px;
    box-shadow: var(--abm-shadow);
    max-width: 440px;
    margin: 40px auto;
}

.abm-login-header {
    text-align: center;
    margin-bottom: 24px;
}

.abm-login-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #eff6ff;
    font-size: 26px;
    margin-bottom: 12px;
}

.abm-login-title {
    margin: 0 0 8px 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--abm-text);
}

.abm-login-subtitle {
    margin: 0;
    font-size: 13px;
    color: var(--abm-text-muted);
    line-height: 1.5;
}

.abm-login-options {
    margin-bottom: 20px;
}

.abm-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--abm-text-muted);
    cursor: pointer;
    user-select: none;
}

.abm-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--abm-primary);
    margin: 0;
}

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

/* ==========================================
   City Selector & Availability Calendar
   ========================================== */

.abm-search-subtitle {
    margin-top: -12px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--abm-text-muted);
}

.abm-city-selector-box {
    display: flex;
    flex-direction: column;
    max-width: 380px;
}

.abm-city-label {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--abm-text);
}

.abm-city-dropdown {
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 600;
    border: 2px solid var(--abm-primary);
    border-radius: 8px;
    background: #fff;
    color: var(--abm-text);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.08);
    transition: all 0.2s ease;
}

.abm-city-dropdown:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

/* Calendar Card */
.abm-calendar-card {
    background: #fff;
    border: 1px solid var(--abm-border);
    border-radius: var(--abm-radius);
    padding: 24px;
    box-shadow: var(--abm-shadow);
    margin-bottom: 24px;
}

.abm-cal-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--abm-border);
}

.abm-cal-nav-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.abm-cal-month-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    min-width: 170px;
    text-align: center;
    color: var(--abm-text);
}

.abm-cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--abm-text-muted);
}

.abm-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.abm-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}

.abm-legend-dot.abm-status-available {
    background: #10b981;
}

.abm-legend-dot.abm-status-booked {
    background: #ef4444;
}

.abm-legend-dot.abm-status-blocked {
    background: #f59e0b;
}

.abm-legend-dot.abm-status-past {
    background: #cbd5e1;
}

/* Instruction box */
.abm-cal-instruction-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
}

/* Floating / Inline Selection Banner */
.abm-selection-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    background: #eff6ff;
    border: 1.5px solid var(--abm-primary);
    border-radius: 8px;
    padding: 12px 18px;
    margin-bottom: 16px;
    box-shadow: 0 4px 6px -1px rgba(13, 110, 253, 0.1);
}

.abm-selection-summary-text {
    font-size: 14px;
    color: var(--abm-text);
}

.abm-badge-nights {
    background: var(--abm-primary);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    margin-left: 8px;
}

.abm-selection-banner-actions {
    display: flex;
    gap: 8px;
}

.abm-btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.abm-btn-outline {
    background: transparent;
    border: 1px solid var(--abm-secondary);
    color: var(--abm-secondary);
}

.abm-btn-outline:hover {
    background: #f1f5f9;
}

/* Timeline Scroll & Table */
.abm-timeline-scroll {
    overflow-x: auto;
    border: 1px solid var(--abm-border);
    border-radius: 6px;
    background: #fff;
    -webkit-overflow-scrolling: touch;
}

.abm-cal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    text-align: center;
}

.abm-cal-table th,
.abm-cal-table td {
    border: 1px solid var(--abm-border);
    padding: 0;
    min-width: 32px;
    height: 38px;
    vertical-align: middle;
}

/* Sticky Apartment Column */
.abm-th-apt,
.abm-td-apt {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 2;
    min-width: 200px !important;
    max-width: 240px;
    text-align: left !important;
    padding: 10px 14px !important;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.04);
}

.abm-th-apt {
    background: #f8fafc;
    font-size: 13px;
    font-weight: 700;
    color: var(--abm-text);
}

.abm-apt-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.abm-apt-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--abm-text);
}

.abm-apt-specs-sub {
    font-size: 11px;
    color: var(--abm-text-muted);
}

.abm-apt-address-sub {
    font-size: 10px;
    color: var(--abm-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 190px;
}

/* Header Day Columns */
.abm-th-day {
    background: #f8fafc;
    font-weight: 600;
    color: var(--abm-text-muted);
    padding: 4px 2px !important;
    min-width: 34px;
}

.abm-th-dow {
    font-size: 10px;
    text-transform: uppercase;
    line-height: 1;
}

.abm-th-num {
    font-size: 13px;
    font-weight: 700;
    color: var(--abm-text);
    margin-top: 2px;
}

.abm-th-day.abm-today {
    background: #e0f2fe !important;
    border-color: #38bdf8 !important;
    color: #0369a1;
}

.abm-th-day.abm-today .abm-dow-today {
    color: #0284c7;
    font-weight: 800;
    font-size: 11px;
}

.abm-th-day.abm-today .abm-th-num {
    color: #0369a1;
    font-weight: 800;
}

.abm-cal-nav-btn:disabled {
    opacity: 0.35 !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

.abm-th-day.abm-past {
    opacity: 0.5;
}

/* Day Cells Status */
.abm-cal-cell {
    position: relative;
    user-select: none;
    transition: background 0.15s ease, transform 0.1s ease;
}

.abm-cell-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.abm-cell-symbol {
    font-size: 13px;
    font-weight: 700;
}

/* Available */
.abm-cell-available {
    background: #ecfdf5;
    color: #059669;
    cursor: pointer;
}

.abm-cell-available:hover {
    background: #a7f3d0 !important;
    transform: scale(1.08);
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.abm-sym-available {
    color: #10b981;
}

/* Booked */
.abm-cell-booked {
    background: #fee2e2;
    color: #dc2626;
    cursor: not-allowed;
}

.abm-sym-booked {
    color: #ef4444;
    font-size: 11px;
}

/* Blocked */
.abm-cell-blocked {
    background: #fef3c7;
    color: #d97706;
    cursor: not-allowed;
}

.abm-sym-blocked {
    color: #f59e0b;
    font-size: 11px;
}

/* Past */
.abm-cell-past {
    background: #f8fafc;
    color: #cbd5e1;
    cursor: not-allowed;
    opacity: 0.6;
}

.abm-sym-past {
    color: #cbd5e1;
}

/* Selected Range Highlights */
.abm-cal-cell.abm-selected-in {
    background: #0d6efd !important;
    color: #fff !important;
    font-weight: 700;
    box-shadow: inset 0 0 0 2px #0a58ca;
}

.abm-cal-cell.abm-selected-in .abm-cell-symbol {
    color: #fff !important;
}

.abm-cal-cell.abm-selected-out {
    background: #0d6efd !important;
    color: #fff !important;
    font-weight: 700;
    box-shadow: inset 0 0 0 2px #0a58ca;
}

.abm-cal-cell.abm-selected-out .abm-cell-symbol {
    color: #fff !important;
}

.abm-cal-cell.abm-selected-range {
    background: #cfe2ff !important;
    color: #084298 !important;
    box-shadow: inset 0 0 0 1px #9ec5fe;
}

.abm-cal-cell.abm-selected-range .abm-cell-symbol {
    color: #084298 !important;
}

/* Loading & Spinner */
.abm-cal-loading {
    padding: 30px;
    text-align: center;
    color: var(--abm-text-muted);
    font-size: 14px;
}

.abm-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #e2e8f0;
    border-top-color: var(--abm-primary);
    border-radius: 50%;
    animation: abm-spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes abm-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================
   RTL & Arabic Typography Support
   ========================================== */
.abm-rtl,
.abm-container[dir="rtl"],
.rtl .abm-container {
    direction: rtl;
    text-align: right;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, "Noto Sans Arabic", sans-serif;
}

.abm-rtl .abm-th-apt,
.abm-rtl .abm-td-apt,
.abm-container[dir="rtl"] .abm-th-apt,
.abm-container[dir="rtl"] .abm-td-apt,
.rtl .abm-th-apt,
.rtl .abm-td-apt {
    right: 0;
    left: auto;
    text-align: right !important;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.04);
}

.abm-rtl .abm-badge-nights,
.abm-container[dir="rtl"] .abm-badge-nights {
    margin-left: 0;
    margin-right: 8px;
}

.abm-rtl .abm-cal-instruction-box,
.abm-container[dir="rtl"] .abm-cal-instruction-box {
    text-align: right;
}

/* Readonly / Default Inputs (Email, Employee ID) */
.abm-form-group input[readonly],
.abm-input-readonly,
#abm_email[readonly],
#abm_employee_id[readonly] {
    background-color: #f1f5f9 !important;
    color: #64748b !important;
    border-color: #e2e8f0 !important;
    cursor: not-allowed !important;
    user-select: none !important;
    box-shadow: none !important;
}

/* ==========================================
   MOBILE-FIRST RESPONSIVE CALENDAR
   ========================================== */

/* Scroll hint shown only on mobile when calendar is present */
.abm-scroll-hint {
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--abm-text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

.abm-scroll-hint-icon {
    font-size: 16px;
    animation: abm-swipe 1.4s ease-in-out infinite;
}

@keyframes abm-swipe {
    0%, 100% { transform: translateX(0); }
    50%       { transform: translateX(6px); }
}

/* ---- Tablet (≤ 768px) ---- */
@media (max-width: 768px) {

    .abm-container {
        margin: 12px auto;
        padding: 0 4px;
    }

    .abm-search-card,
    .abm-customer-form-card,
    .abm-confirmation-card,
    .abm-calendar-card,
    .abm-login-card {
        padding: 24px 16px;
        margin-bottom: 16px;
    }

    /* Month nav bar: stack legend below on tablet */
    .abm-cal-top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 12px;
        padding-bottom: 12px;
    }

    .abm-cal-month-title {
        font-size: 15px;
        min-width: unset;
    }

    .abm-cal-legend {
        font-size: 11px;
        gap: 10px;
    }

    /* Show horizontal scroll hint */
    .abm-scroll-hint {
        display: flex;
    }

    /* Timeline scroll area */
    .abm-timeline-scroll {
        border-radius: 6px;
        /* Smooth momentum scrolling on iOS */
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
    }

    /* Calendar table */
    .abm-cal-table {
        font-size: 11px;
    }

    .abm-cal-table th,
    .abm-cal-table td {
        min-width: 36px;
        height: 44px; /* bigger tap target */
    }

    /* Narrower sticky apartment column */
    .abm-th-apt,
    .abm-td-apt {
        min-width: 100px !important;
        max-width: 120px;
        padding: 8px 8px !important;
    }

    .abm-apt-title {
        font-size: 12px;
    }

    .abm-apt-specs-sub,
    .abm-apt-address-sub {
        display: none; /* hide sub-labels to save space */
    }

    /* Day headers */
    .abm-th-day {
        min-width: 36px;
        padding: 4px 1px !important;
    }

    .abm-th-dow {
        font-size: 9px;
    }

    .abm-th-num {
        font-size: 11px;
    }

    /* Cell tap size */
    .abm-cell-symbol {
        font-size: 12px;
    }

    /* Selection banner: stack vertically */
    .abm-selection-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 10px 14px;
    }

    .abm-selection-banner-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .abm-selection-banner-actions .abm-btn-sm {
        flex: 1;
        text-align: center;
    }
}

/* ---- Mobile (≤ 480px) ---- */
@media (max-width: 480px) {

    .abm-search-card,
    .abm-customer-form-card,
    .abm-confirmation-card,
    .abm-calendar-card,
    .abm-login-card {
        padding: 20px 14px;
        border-radius: 8px;
    }

    .abm-search-title,
    .abm-card-title,
    .abm-results-heading {
        font-size: 17px;
    }

    /* Full-width city dropdown */
    .abm-city-selector-box {
        max-width: 100%;
    }

    .abm-city-dropdown {
        font-size: 14px;
        padding: 10px 12px;
    }

    /* Make nav buttons larger for touch */
    .abm-cal-nav-btn {
        min-width: 38px;
        min-height: 38px;
        font-size: 18px;
    }

    .abm-cal-month-title {
        font-size: 14px;
    }

    /* Legend: 2 per row */
    .abm-cal-legend {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px 12px;
    }

    /* Calendar table cells: even taller for finger tapping */
    .abm-cal-table th,
    .abm-cal-table td {
        min-width: 32px;
        height: 46px;
    }

    /* Very narrow sticky column */
    .abm-th-apt,
    .abm-td-apt {
        min-width: 72px !important;
        max-width: 80px;
        padding: 6px 4px !important;
    }

    .abm-apt-title {
        font-size: 11px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 72px;
    }

    /* Bigger tap symbols */
    .abm-cell-symbol {
        font-size: 14px;
    }

    /* Active cell: larger scale on touch */
    .abm-cell-available:hover,
    .abm-cell-available:active {
        transform: scale(1.12);
    }

    /* Instruction box: smaller text */
    .abm-cal-instruction-box {
        font-size: 12px;
        padding: 8px 10px;
    }

    /* Full-width action buttons */
    .abm-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .abm-actions .abm-btn {
        width: 100%;
    }

    /* Confirmation detail box */
    .abm-confirmation-details-box {
        max-width: 100%;
        padding: 12px 14px;
    }

    .abm-confirm-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        padding: 10px 0;
    }
}

/* ==========================================
   RTL + Mobile combined
   ========================================== */
@media (max-width: 768px) {
    .abm-rtl .abm-th-apt,
    .abm-rtl .abm-td-apt,
    .abm-container[dir="rtl"] .abm-th-apt,
    .abm-container[dir="rtl"] .abm-td-apt {
        right: 0;
        left: auto;
        text-align: right !important;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.04);
    }

    .abm-rtl .abm-selection-banner,
    .abm-container[dir="rtl"] .abm-selection-banner {
        align-items: flex-end;
    }

    .abm-rtl .abm-selection-banner-actions,
    .abm-container[dir="rtl"] .abm-selection-banner-actions {
        justify-content: flex-start;
    }
}
