/**
 * Mafsho Legal Consultation - Frontend Styles
 * RTL First, Modern, Responsive
 */

.mlc-booking-container,
.mlc-user-panel,
.mlc-fast-pay-container,
.mlc-payment-result-container {
    direction: rtl;
    text-align: right;
    box-sizing: border-box;
    font-family: inherit, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #2c3e50;
    max-width: 900px;
    margin: 20px auto;
}

.mlc-booking-container *,
.mlc-user-panel *,
.mlc-fast-pay-container *,
.mlc-payment-result-container * {
    box-sizing: border-box;
}

/* Card */
.mlc-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 24px;
    margin-bottom: 24px;
}

.mlc-card-header {
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.mlc-card-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: #1a202c;
}

.mlc-card-subtitle {
    font-size: 14px;
    color: #718096;
    margin: 0;
}

/* Steps */
.mlc-form-step {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #edf2f7;
}

.mlc-form-step:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.mlc-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #2d3748;
}

/* Duration Grid */
.mlc-duration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.mlc-duration-card {
    display: flex;
    flex-direction: column;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    background: #f8fafc;
    transition: all 0.2s ease;
    position: relative;
}

.mlc-duration-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mlc-duration-card:hover {
    border-color: #3182ce;
    background: #ebf8ff;
}

.mlc-duration-card.selected {
    border-color: #0d6efd;
    background: #f0f7ff;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.15);
}

.mlc-duration-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 6px;
}

.mlc-duration-price {
    font-size: 14px;
    font-weight: 600;
    color: #0d6efd;
}

/* Date & Mobile inputs */
.mlc-date-input-wrap,
.mlc-mobile-input-wrap {
    position: relative;
    max-width: 320px;
    width: 100%;
}

.mlc-mobile-input {
    letter-spacing: 1px;
}

.mlc-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-size: 14px;
    color: #2d3748;
    background: #ffffff;
    transition: border-color 0.2s ease;
}

.mlc-input:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.mlc-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 16px;
}

/* Slots Grid */
.mlc-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
    max-height: 280px;
    overflow-y: auto;
    padding: 4px;
}

.mlc-slot-btn {
    padding: 10px 6px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    background: #ffffff;
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.mlc-slot-btn:hover:not(:disabled) {
    border-color: #0d6efd;
    background: #f0f7ff;
    color: #0d6efd;
}

.mlc-slot-btn.selected {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(13, 110, 253, 0.3);
}

.mlc-slot-btn:disabled {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #a0aec0;
    cursor: not-allowed;
    text-decoration: line-through;
    opacity: 0.6;
}

.mlc-slot-reason {
    font-size: 10px;
    margin-top: 2px;
    font-weight: normal;
}

/* Form Row */
.mlc-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 14px;
}

.mlc-form-group-full {
    grid-column: 1 / -1;
}

@media (max-width: 600px) {
    .mlc-form-row {
        grid-template-columns: 1fr;
    }
}

.mlc-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #4a5568;
}

/* Summary Box */
.mlc-summary-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}

.mlc-summary-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #1a202c;
}

.mlc-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 8px;
    color: #4a5568;
}

.mlc-total-row {
    border-top: 1px dashed #cbd5e0;
    padding-top: 10px;
    margin-top: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #1a202c;
}

.mlc-price-highlight {
    color: #0d6efd;
    font-size: 18px;
}

/* Terms */
.mlc-terms-box {
    margin-bottom: 16px;
}

.mlc-checkbox-label {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #4a5568;
    cursor: pointer;
}

.mlc-checkbox-label input {
    margin-left: 8px;
}

/* Buttons */
.mlc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

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

.mlc-btn-lg {
    padding: 14px 24px;
    font-size: 16px;
}

.mlc-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.mlc-btn-primary {
    background: #0d6efd;
    color: #ffffff;
    border-color: #0d6efd;
}

.mlc-btn-primary:hover {
    background: #0b5ed7;
    color: #ffffff;
}

.mlc-btn-secondary {
    background: #6c757d;
    color: #ffffff;
}

.mlc-btn-outline {
    background: transparent;
    border-color: #cbd5e0;
    color: #4a5568;
}

.mlc-btn-outline:hover {
    border-color: #0d6efd;
    color: #0d6efd;
}

/* Alerts */
.mlc-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}

.mlc-alert-success { background: #def7ec; color: #03543f; border: 1px solid #bcf0da; }
.mlc-alert-danger { background: #fde8e8; color: #9b1c1c; border: 1px solid #fbd5d5; }
.mlc-alert-warning { background: #fef08a; color: #854d0e; border: 1px solid #fde047; }
.mlc-alert-info { background: #e1effe; color: #1e429f; border: 1px solid #b3d7ff; }

/* Tabs */
.mlc-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 20px;
    overflow-x: auto;
}

.mlc-tab-btn {
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #718096;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.mlc-tab-btn.active, .mlc-tab-btn:hover {
    color: #0d6efd;
    border-bottom-color: #0d6efd;
}

/* Panel Header */
.mlc-panel-header {
    margin-bottom: 24px;
}

.mlc-panel-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: #1a202c;
}

.mlc-panel-nav {
    display: flex;
    gap: 12px;
}

.mlc-panel-tab {
    padding: 10px 20px;
    border-radius: 8px;
    background: #edf2f7;
    color: #4a5568;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.mlc-panel-tab.active {
    background: #0d6efd;
    color: #ffffff;
}

/* Table */
.mlc-table-responsive {
    overflow-x: auto;
}

.mlc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.mlc-table th, .mlc-table td {
    padding: 12px 14px;
    text-align: right;
    border-bottom: 1px solid #edf2f7;
}

.mlc-table th {
    background: #f8fafc;
    color: #4a5568;
    font-weight: 600;
}

/* Badges */
.mlc-status-badge, .mlc-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.mlc-status-warning { background: #fef3c7; color: #92400e; }
.mlc-status-success { background: #d1fae5; color: #065f46; }
.mlc-status-danger { background: #fee2e2; color: #991b1b; }
.mlc-status-info { background: #dbeafe; color: #1e40af; }
.mlc-status-secondary { background: #f1f5f9; color: #475569; }

.mlc-badge-warning { background: #fef3c7; color: #92400e; }
.mlc-badge-success { background: #d1fae5; color: #065f46; }
.mlc-badge-danger { background: #fee2e2; color: #991b1b; }
.mlc-badge-secondary { background: #f1f5f9; color: #475569; }

/* Modal */
.mlc-modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mlc-modal-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.5);
}

.mlc-modal-dialog {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    z-index: 1;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.mlc-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #edf2f7;
}

.mlc-modal-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.mlc-modal-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #718096;
}

.mlc-modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.mlc-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px;
    background: #f8fafc;
    border-top: 1px solid #edf2f7;
}

/* Spinner */
.mlc-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: mlc-spin 0.8s linear infinite;
    margin-left: 6px;
}

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

/* Fast Pay */
.mlc-countdown-box {
    text-align: center;
    background: #fffbeb;
    border: 1px solid #fef3c7;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
}

.mlc-timer {
    font-size: 28px;
    font-weight: 800;
    color: #d97706;
    margin-top: 6px;
    font-family: monospace, sans-serif;
}

/* Result Receipt Card */
.mlc-result-header {
    text-align: center;
    margin-bottom: 24px;
}

.mlc-result-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 12px;
}

.mlc-icon-success { background: #d1fae5; color: #059669; }
.mlc-icon-error { background: #fee2e2; color: #dc2626; }
.mlc-icon-warning { background: #fef3c7; color: #d97706; }

/* ===================================================
   Customer Reviews & Testimonials Section Styling
   =================================================== */
.mlc-reviews-card {
    margin-top: 28px;
    padding: 28px;
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

.mlc-reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid #edf2f7;
    margin-bottom: 22px;
}

.mlc-reviews-header-info {
    flex: 1;
    min-width: 250px;
}

.mlc-reviews-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 6px 0;
}

.mlc-reviews-desc {
    font-size: 13.5px;
    color: #64748b;
    margin: 0 0 12px 0;
    line-height: 1.6;
}

.mlc-reviews-summary-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13px;
    color: #334155;
}

.mlc-stars-gold {
    color: #f59e0b;
    letter-spacing: 2px;
    font-size: 15px;
}

.mlc-stars-gray {
    color: #cbd5e1;
    letter-spacing: 2px;
    font-size: 15px;
}

.mlc-rating-num {
    font-weight: 700;
    color: #1e293b;
}

.mlc-rating-sep {
    color: #94a3b8;
}

.mlc-rating-count {
    color: #64748b;
    font-size: 12.5px;
}

.mlc-btn-outline-primary {
    background: #ffffff;
    color: #0d6efd;
    border: 1.5px solid #0d6efd;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mlc-btn-outline-primary:hover {
    background: #0d6efd;
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(13, 110, 253, 0.2);
}

/* Review Form Box */
.mlc-review-form-wrapper {
    margin-bottom: 24px;
}

.mlc-review-form-box {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.mlc-review-form-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px 0;
}

.mlc-review-form-subtitle {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 16px 0;
}

/* Star Rating Interactive Picker */
.mlc-star-rating-picker {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    padding: 8px 14px;
    min-height: 42px;
}

.mlc-stars-interactive {
    display: inline-flex;
    gap: 4px;
    direction: ltr; /* Ensure left-to-right star filling */
}

.mlc-star-item {
    font-size: 22px;
    color: #cbd5e1;
    cursor: pointer;
    transition: transform 0.1s, color 0.15s;
    user-select: none;
    line-height: 1;
}

.mlc-star-item:hover {
    transform: scale(1.2);
}

.mlc-star-item.active {
    color: #f59e0b;
}

.mlc-rating-text {
    font-size: 12.5px;
    font-weight: 600;
    color: #475569;
}

.mlc-form-actions-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}

/* Reviews List & Cards */
.mlc-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mlc-review-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.mlc-review-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.mlc-review-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.mlc-review-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d6efd, #0284c7);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(13, 110, 253, 0.2);
}

.mlc-review-meta {
    flex: 1;
}

.mlc-review-author-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 3px;
}

.mlc-review-author {
    font-size: 14.5px;
    font-weight: 700;
    color: #1e293b;
}

.mlc-verified-badge {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
    border-radius: 20px;
    font-size: 10.5px;
    font-weight: 600;
    padding: 2px 8px;
    display: inline-flex;
    align-items: center;
}

.mlc-review-date-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
}

.mlc-review-time-ago {
    color: #94a3b8;
}

.mlc-review-rating-stars {
    flex-shrink: 0;
    font-size: 16px;
}

.mlc-review-body p {
    margin: 0;
    font-size: 14px;
    line-height: 1.75;
    color: #334155;
    white-space: pre-line;
}

/* Empty Reviews State */
.mlc-reviews-empty {
    text-align: center;
    padding: 36px 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1.5px dashed #cbd5e1;
}

.mlc-empty-icon {
    font-size: 38px;
    margin-bottom: 8px;
}

.mlc-reviews-empty h4 {
    font-size: 15px;
    font-weight: 700;
    color: #334155;
    margin: 0 0 6px 0;
}

.mlc-reviews-empty p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

@media (max-width: 600px) {
    .mlc-reviews-header {
        flex-direction: column;
        align-items: stretch;
    }
    .mlc-btn-outline-primary {
        justify-content: center;
        width: 100%;
    }
    .mlc-review-card-header {
        flex-wrap: wrap;
    }
    .mlc-review-rating-stars {
        width: 100%;
        margin-top: 4px;
    }
}

