/*
|==========================================================================
| 1. PROGRESS BAR STYLES (fl-progress-*)
|==========================================================================
| Cleaned, subtle, and responsive styles for the step-by-step indicator.
*/

.fl-progress-container {
    display: flex;
    justify-content: space-between;
    margin: 20px 0 30px;
    padding: 0 5px;
    max-width: 900px; /* Standardized max width */
}

.fl-progress-step {
    flex: 1;
    text-align: center;
    opacity: 0.4;
    transition: all 0.25s ease;
}

.fl-progress-step.active {
    opacity: 1;
}

.fl-step-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    /* Inactive Colors */
    background: #f3f4f6;
    border: 2px solid #d1d5db;
    margin-bottom: 6px;
}

.fl-progress-step.active .fl-step-circle {
    /* Active Colors (Using a clean purple/indigo) */
    background: #4f46e5;
    border-color: #4f46e5;
    color: #fff;
}

.fl-step-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #374151;
}


/*
|==========================================================================
| 2. SUBJECT SELECTION STYLES (fl-subject-*)
|==========================================================================
| Styles for the responsive subject choice cards and grid.
*/

.fl-subject-grid {
    display: grid !important;
    /* Optimized for high density, allowing subjects down to 180px wide */
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    gap: 14px;
    margin: 20px 0;
}

.fl-subject-card {
    /* Base Card Style (Consolidated) */
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px; /* Standardized Padding */
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e4e4e4;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fl-subject-card:hover {
    border-color: #4f46e5;
}

.fl-subject-card.selected {
    /* Most specific selected state */
    border: 2px solid #6E30FF;
    background: #FAF8FF;
}

/* Icon Replacement (Using the :before pseudo-element method) */
.fl-subject-card::before {
    content: "Ã¢ÂÂ"; /* Placeholder for an icon/bullet */
    position: absolute;
    left: 22px;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    background: #f4f5fb;
    color: #7b8190;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.fl-subject-name {
    padding-left: 60px;
    font-size: 16px;
    font-weight: 600;
    color: #171C2A;
}

/* Confirmation Box */
.fl-confirm-box {
    margin-top: 18px;
    text-align: center;
}

.fl-confirm-inner {
    display: inline-block;
    background: #f9fafb;
    padding: 18px 24px;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
}

.fl-confirm-btn {
    display: inline-block;
    margin-top: 10px;
    background: #4f46e5;
    padding: 10px 24px;
    border-radius: 999px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}


/*
|==========================================================================
| 3. TUTOR CARD & GRID STYLES (fl-tutor-*)
|==========================================================================
| Styles for the responsive tutor card grid and elements.
*/

.fl-tutor-grid-wrapper {
    margin-top: 24px;
}

/* Card Grid (Optimized for 2-3 Columns) */
.fl-tutor-grid {
    display: grid;
    /* Allows for two columns on standard desktop, or more if space permits */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: 18px;
}

/* Tutor Card Base */
.fl-tutor-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px; /* Using the larger radius */
    padding: 16px 18px 14px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    transition: all 0.18s ease;
}

.fl-tutor-card:hover {
    border-color: #4f46e5;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.12);
    transform: translateY(-3px);
}

.fl-tutor-card-match {
    border-color: #22c55e;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.35), 0 14px 32px rgba(15, 23, 42, 0.1);
}

/* Header Row */
.fl-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

/* Avatar */
.fl-card-avatar,
.fl-modal-avatar { /* Combined with modal avatar */
    width: 50px; /* Standardized size */
    height: 50px;
    border-radius: 999px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.fl-card-avatar img,
.fl-modal-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fl-card-avatar-fallback {
    font-size: 1.4rem;
    font-weight: 600;
    color: #555;
}

.fl-tutor-card:hover .fl-card-avatar {
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
    transform: translateY(-1px);
}

.fl-card-main {
    flex: 1;
    min-width: 0;
}

/* Name and Pill */
.fl-tutor-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.fl-tutor-name {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
}

.fl-top-rated-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

/* Subject Tags/Chips */
.fl-tutor-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.fl-subject-chip,
.fl-tag { /* Consolidated tag/chip styles */
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    background: #eff6ff;
    color: #1d4ed8;
}

.fl-subject-chip-match {
    background: #ecfdf5;
    color: #15803d;
    border: 1px solid #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}

.fl-tag-muted {
    background: #f3f3f3;
    color: #555;
    border: none;
}


/* Body Meta */
.fl-card-body {
    margin-bottom: 12px;
}

.fl-tutor-bio {
    font-size: 0.85rem;
    color: #555;
    margin: 0 0 10px;
}

.fl-tutor-meta {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fl-tutor-meta li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 0.8rem;
}

.fl-tutor-meta span {
    color: #777;
}

.fl-tutor-meta strong {
    font-weight: 600;
}

/* More Info Panel (New Style) */
.fl-more-info-panel {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e5e7eb;
    font-size: 0.78rem;
    color: #4b5563;
}

.fl-more-info {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.2s ease, opacity 0.2s ease;
    margin-top: 0;
}

.fl-more-info.open {
    max-height: 600px;
    opacity: 1;
    margin-top: 10px;
}

.fl-more-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px 16px;
    font-size: 0.8rem;
}

@media (min-width: 700px) {
    .fl-more-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.fl-more-item {
    padding: 6px 8px;
    border-radius: 8px;
    background: #f9fafb;
}

.fl-more-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    margin-bottom: 2px;
}

.fl-more-value {
    font-size: 0.8rem;
    color: #111827;
}


/* Actions and Buttons */
.fl-card-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.fl-btn-primary,
.fl-btn-secondary,
.fl-btn-outline {
    border-radius: 999px;
    font-size: 0.85rem; /* Standardized size */
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-align: center;
    flex: 1;
    padding: 9px 18px; /* Standardized padding */
}

/* Primary (Book me) - Using a standard blue/indigo */
.fl-btn-primary {
    background: #4338ca;
    color: #ffffff;
}

.fl-btn-primary:hover {
    filter: brightness(1.06);
}

/* Secondary (More info) */
.fl-btn-secondary {
    background: #f3f4ff;
    color: #111827;
}

.fl-btn-secondary:hover {
    background: #e0e7ff;
}

/* Outline (View Profile, etc.) */
.fl-btn-outline {
    background: transparent;
    color: #0b6fb8;
    border: 1px solid #0b6fb8;
    width: auto;
    flex: none; /* Do not stretch */
    padding-inline: 20px;
    padding-block: 7px; /* Adjust padding to match primary/secondary height */
    font-size: 0.8rem;
}

/* Load more */
.fl-load-more-wrap {
    text-align: center;
    margin-top: 18px;
}


/*
|==========================================================================
| 4. MODAL STYLES (fl-modal-*)
|==========================================================================
| Styles for the tutor profile modal pop-up.
*/

.fl-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 9999;
    overflow-y: auto; /* Allow scrolling within the modal backdrop */
}

.fl-modal[aria-hidden="false"] {
    display: block;
}

.fl-modal-backdrop {
    position: fixed; /* Fixed to cover the whole screen */
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.fl-modal-dialog {
    position: relative;
    max-width: 520px;
    margin: 40px auto;
    background: #fff;
    border-radius: 18px;
    padding: 18px 18px 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.fl-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 10000;
}

.fl-modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.fl-modal-name {
    font-size: 1.2rem;
    margin: 0 0 4px;
    font-weight: 600;
}

.fl-modal-city {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
}

.fl-modal-body {
    font-size: 0.9rem;
}

.fl-modal-bio {
    margin: 0 0 10px;
}

.fl-modal-meta {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.8rem;
}

.fl-modal-meta li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.fl-modal-meta span {
    color: #777;
}

.fl-modal-open {
    overflow: hidden; /* Prevents background scroll when modal is open */
}

/* Modal Responsive */
@media (max-width: 600px) {
    .fl-modal-dialog {
        margin: 30px 12px;
        max-width: 100%;
    }
}
.fl-subject-card {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 14px;
    padding: 18px;
    margin: 12px 0;
    cursor: pointer;
    transition: all .15s ease-in-out;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.fl-subject-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.10);
}

.fl-subject-card.selected {
    border-color: #6366f1 !important;
    background: #eef2ff;
    box-shadow: 0 8px 20px rgba(99,102,241,0.15);
}

.fl-subject-card .icon {
    font-size: 20px;
    margin-bottom: 8px;
}

.fl-confirm-inner {
    margin-top: 18px;
    background: #ffffff;
    padding: 18px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}
/* ============================================================
   FUTURE LEGACY Ã¢ÂÂ STEP 3 CLEANUP FOR PAGE ID 1658
   Applies only to the Confirm Booking page
   Page URL contains post=1658
============================================================ */
body.page-id-1658 form.frm-show-form {
    max-width: 100% !important;
}

/* Hide all unnecessary fields (based on your list) */
body.page-id-1658 .frm_field_280_container,  /* Session Link */
body.page-id-1658 .frm_field_281_container,  /* Tutor Notes */
body.page-id-1658 .frm_field_282_container,  /* Rating */
body.page-id-1658 .frm_field_113_container,  /* Duration */
body.page-id-1658 .frm_field_114_container,  /* Tutor Rate */
body.page-id-1658 .frm_field_115_container,  /* Total */
body.page-id-1658 .frm_field_116_container,  /* Status */
body.page-id-1658 .frm_field_262_container,  /* Credit Used */
body.page-id-1658 .frm_field_263_container,  /* Free Session Used */
body.page-id-1658 .frm_field_264_container,  /* Credits Before */
body.page-id-1658 .frm_field_265_container,  /* Credits After */
body.page-id-1658 .frm_field_249_container,  /* Hidden Scholar Name */
body.page-id-1658 .frm_field_248_container,  /* Tutor Name */
body.page-id-1658 .frm_field_250_container,  /* Subject Name */
body.page-id-1658 .frm_field_251_container,  /* Booking Summary */
body.page-id-1658 .frm_field_108_container,  /* ParentID */
body.page-id-1658 .frm_field_279_container,  /* TutorID */
body.page-id-1658 .frm_field_109_container,  /* Scholar */
body.page-id-1658 .frm_field_110_container,  /* Tutor */
body.page-id-1658 .frm_field_247_container,  /* First Free Session */
body.page-id-1658 .frm_field_278_container   /* Hidden */
{
    display: none !important;
}

/* Remove the default Formidable submit button */
body.page-id-1658 .frm_submit {
    display: none !important;
}

/* Layout for the custom Confirm Booking button */
#fl-custom-submit-wrapper {
    margin-top: 20px;
    text-align: right;
}

/* Styling the replacement button */
#fl-custom-submit {
    background: #1e3a8a;
    color: #fff;
    padding: 12px 26px;
    font-size: 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

#fl-custom-submit:hover {
    background: #142a5c;
}

/* Left summary + right form spacing fix */
body.page-id-1658 .fl-booking-screen {
    padding-top: 0 !important;
}
#fl-custom-submit-wrapper {
    margin-top: 20px;
    text-align: right;
}
#fl-custom-submit {
    background: #3629e8;
    color: white;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
}
.with_frm_style legend + h3, .with_frm_style h3.frm_form_title {
    font-size: var(--title-size);
    color: var(--title-color);
    margin-top: var(--title-margin-top);
    margin-bottom: var(--title-margin-bottom);
    display: none;
}