:root {
    --primary: #2563eb;
    --secondary: #64748b;
    --light: #f8fafc;
    --dark: #0f172a;
}

/* Custom Styles */
body {
    background-color: var(--light);
}

.hero-teacher {
    background: linear-gradient(135deg, var(--primary), #1d4ed8);
    padding: 100px 0;
    margin-bottom: 60px;
}

.hero-section img {
    max-width: 100%;
    height: auto;
}

.custom-form {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    margin-top: 0px;
    position: relative;
    z-index: 10;
}

.form-step {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.step-number {
    width: 30px;
    height: 30px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.form-control {
    padding: 12px;
    border-radius: 8px;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}


.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
}

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

.alert-success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #4ade80;
}

/* --- Availability Control Buttons --- */
.availability-controls .btn {
    padding: 6px 16px;
    font-size: 0.9rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.availability-controls .btn-primary-light {
    background-color: #eef2ff;
    color: var(--primary);
    border: 1px solid #c7d2fe;
}

.availability-controls .btn-primary-light:hover {
    background-color: #dbeafe;
    border-color: #a5b4fc;
    transform: translateY(-1px);
}

.availability-controls .btn-danger-outline {
    background-color: transparent;
    color: var(--secondary);
    border: 1px solid #cbd5e1;
}

.availability-controls .btn-danger-outline:hover {
    color: #dc2626;
    border-color: #fecaca;
    background-color: #fee2e2;
    transform: translateY(-1px);
}

/* --- Availability Grid --- */
.availability-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.availability-grid-container {
    position: relative;
    max-height: 60vh;
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.availability-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 2fr);
    gap: 8px;
}

.grid-header,
.grid-day-label,
.grid-slot {
    padding: 12px;
    text-align: center;
    border-radius: 8px;
    font-weight: 500;
}

.grid-header,
.grid-header-gap {
    background-color: #f1f5f9;
    position: sticky;
    top: 0;
    z-index: 2;
    cursor: pointer;
}

.grid-header-gap {
    left: 0;
    z-index: 3;
}

.grid-day-label {
    background-color: #f8fafc;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    left: 0;
    z-index: 1;
}

.grid-slot {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.grid-slot .form-check-input {
    display: none;
}

.grid-slot::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: white;
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.grid-slot.selected {
    background-color: var(--primary);
    border-color: var(--primary);
}

.grid-slot.selected::after {
    transform: translate(-50%, -50%) scale(1);
}

.grid-header:hover,
.grid-day-label:hover {
    background-color: #e2e8f0;
}

.grid-slot:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.availability-grid:hover .grid-slot.highlight-col {
    background-color: #e0e7ff;
}

.availability-grid:hover .grid-slot.highlight-row {
    background-color: #e0e7ff;
}

.grid-slot.selected.highlight-col,
.grid-slot.selected.highlight-row {
    background-color: #4f46e5;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 991px) {

    /* lg breakpoint */
    .hero-section .image-container {
        margin-top: 40px;
    }
}

.interests-group .form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.interests-group .form-check-input {
    width: 1.25em;
    height: 1.25em;
    margin-left: 0; /* Override Bootstrap's negative margin */
}

.interests-group .form-check-label {
    padding-left: 0; /* Reset padding, as gap is now used for spacing */
}

@media (max-width: 767px) {
    .hero-section h1 {
        font-size: 2.1rem;
    }

    .custom-form {
        padding: 20px;
    }

    .form-label {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }

    .interests-group .form-check-input {
        width: 1.25em;
        height: 1.25em;
    }

    .interests-group .form-check-label {
        padding-left: 0.75em;
    }
    .availability-accordion .day-accordion {
        background-color: #fff;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        margin-bottom: 10px;
        overflow: hidden;
    }

    .availability-accordion .day-accordion-summary {
        padding: 15px;
        font-weight: bold;
        cursor: pointer;
        list-style: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .availability-accordion .day-accordion-summary::-webkit-details-marker {
        display: none;
    }

    .availability-accordion .day-accordion-summary::after {
        content: '\f078';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        transition: transform 0.2s ease;
    }

    .availability-accordion .day-accordion[open]>.day-accordion-summary::after {
        transform: rotate(180deg);
    }

    .availability-accordion .day-accordion-content {
        border-top: 1px solid #e2e8f0;
        padding: 5px 0;
    }

    .availability-accordion .time-slot-row {
        padding: 10px 15px;
        cursor: pointer;
    }

    .availability-accordion .time-slot-row .form-check {
        display: flex;
        align-items: center;
        pointer-events: none;
        /* Make children non-interactive */
    }

    .availability-accordion .time-slot-row .form-check-input {
        width: 1.3em;
        height: 1.3em;
        margin-top: 0;
    }

    .availability-accordion .time-slot-row .form-check-label {
        flex-grow: 1;
        padding-left: 15px;
    }
}


.form-check-input {
    width: 1.5em;
    height: 1.5em;
    vertical-align: middle;
}

.form-check-label {
    font-weight: 400;
}

.privacy-checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.privacy-checkbox-container .form-check-input {
    width: 1em;
    height: 1em;
    margin-top: 0.25em;
    border: 2px solid var(--secondary); /* Thicker border */
    flex-shrink: 0;
}

.privacy-checkbox-container .form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary); /* Keep primary color for checked */
}

.privacy-checkbox-container .form-check-label {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
}

/* Modern Tag Styling */
.tag-input-container {
    position: relative;
    border: 1px solid #ced4da;
    border-radius: .25rem;
    padding: .375rem .75rem;
    display: flex;
    flex-wrap: nowrap; /* Force single line */
    align-items: center;
    gap: 5px;
}

/* Apply focus styles to the container when the input inside is focused */
.tag-input-container:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* intl-tel-input alignment and styling */
.iti {
    width: 100% !important; /* Ensure it takes full width of its parent */
}

.iti__flag-container {
    display: flex; /* Use flexbox for alignment */
    align-items: center; /* Vertically center the flag */
    height: 100%;
}

.iti input.form-control, .iti input[type=tel] {
    padding-top: 12px;    /* Match standard form-control padding */
    padding-bottom: 12px; /* Match standard form-control padding */
    padding-left: 55px;
    height: auto; /* Let padding determine the height */
}



.tag-badge .tag-remove {
    margin-left: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2em;
    line-height: 1;
}

.tag-input-container input.tag-search-input {
    border: none;
    outline: none;
    flex-grow: 1;
    padding: 5px 0;
    min-width: 150px;
}

.tag-input-container input.tag-search-input:focus {
    box-shadow: none; /* Prevent inner box-shadow */
}

.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 .25rem .25rem;
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.suggestion-item {
    padding: 10px;
    cursor: pointer;
}

.suggestion-item:hover {
    background-color: #f0f0f0;
}

.selected-tags-area {
    display: flex;
    flex-wrap: wrap;
    gap: 8px; /* Spacing between tags */
    margin-bottom: 10px; /* Space above the input box */
}

.tag-badge.suggestion {
    background-color: #f8fafc;
    border: 1px dashed #cbd5e1;
    color: #475569;
}

.tag-badge.suggestion:hover {
    background-color: #f1f5f9;
    border-color: var(--primary);
    color: var(--primary);
}

.category-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.tag-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.4em 0.8em;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: 1px solid #dee2e6;
    background-color: #f8f9fa;
    color: #495057;
}

.tag-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    border-color: var(--primary);
    color: var(--primary);
    background-color: #eef2ff;
}

.tag-badge.selected {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.2);
}

.tag-badge .tag-icon {
    margin-right: 0.5em;
    font-style: normal; /* To override <i> italics */
    font-weight: 600;
    transition: transform 0.2s ease-in-out, color 0.2s ease-in-out;
    display: inline-block;
    width: 1.2em;
    text-align: center;
}

.tag-badge.selected .tag-icon {
    transform: rotate(360deg);
}