/* css/form2sect2.css for Book Appointment Section */

/* --- Base Styles (Mobile-First Defaults) --- */
.content-section {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
    text-align: center;
}

.content-section h2,
.content-section p {
    margin-bottom: 20px;
}

.booking-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 30px;
    width: 100%;
    box-sizing: border-box;
}

h2,
h3,
h4 {
    color: #ffffff;
    text-align: center;
}

.calendar-section,
.booking-form-section {
    width: 100%;
    background-color: #151524;
    padding: 25px;
    border-radius: 10px;
    box-sizing: border-box;
}

.calendar-container {
    margin-top: 20px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.month-year-display {
    font-size: 1.3em;
    font-weight: bold;
    white-space: nowrap;
    flex-shrink: 1;
    min-width: 0;
}

.arrow-btn {
    background-color: #4b3b80;
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
}

.arrow-btn:hover {
    background-color: #5e4a9e;
}

.arrow-btn:disabled {
    background-color: #2a2a40;
    color: #555;
    cursor: not-allowed;
}

.calendar-weekdays-grid,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-top: 15px;
}

.weekday-name,
.calendar-day {
    padding: 8px 0;
    text-align: center;
    border-radius: 6px;
    font-size: 0.9em;
    box-sizing: border-box;
}

.weekday-name {
    font-weight: bold;
    color: #aaa;
}

.calendar-day {
    cursor: pointer;
    background-color: #2a2a40;
    color: #aaa;
    min-height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day.empty {
    background-color: transparent;
    cursor: default;
}

.calendar-day.available-date {
    background-color: #28a745;
    color: #fff;
}

.calendar-day.unavailable-general {
    background-color: #4a4a58;
    color: #888;
    cursor: not-allowed;
}

.calendar-day.disabled-closed-day:hover::after {
    content: "Closed";
    position: absolute;
    transform: translate(-50%, -120%);
    background-color: #111;
    color: #fff;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 0.8em;
    white-space: nowrap;
    z-index: 10;
}

.calendar-day.selected {
    background-color: #7a47ff;
    color: #fff;
}

.time-slots-container {
    margin-top: 25px;
}

.time-slots-container h4 {
    margin-bottom: 10px;
    text-align: center;
}

.time-slots-container p {
    font-size: 0.9em;
    color: #ccc;
    margin-top: 5px;
}

.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.time-slot {
    padding: 10px;
    background-color: #054c1d;
    color: #00ff9f;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #00ff9f;
    font-weight: bold;
    font-size: 0.95em;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.time-slot:hover {
    background-color: #e9e9e9;
    color: #000;
    border-color: #ccc;
}

.time-slot.unavailable-slot {
    padding: 10px;
    border: 1px solid #e0e0e0;
    background-color: #4a4a58;
    text-align: center;
    color: #888;
    border-color: #3a3a48;
    cursor: not-allowed;
    font-weight: normal;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.7;
}

.time-slot.selected {
    background-color: #007bff;
    color: white;
    border-color: #0056b3;
}

.form-group2 {
    width: 100%;
    margin-bottom: 20px;
}

.form-group2 label {
    display: block;
    margin-bottom: 8px;
    color: #eee;
    text-align: left;
}

.form-group2 input[type="text"],
.form-group2 input[type="email"],
.form-group2 input[type="tel"],
.form-group2 select {
    width: 100%;
    padding: 12px;
    border: 1px solid #555;
    border-radius: 8px;
    background-color: #2a2a40;
    color: #fff;
    box-sizing: border-box;
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group2 input:focus,
.form-group2 select:focus {
    border-color: #7a47ff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(122, 71, 255, 0.3);
}

.terms-privacy-checkbox {
    margin: 20px 0;
    display: flex;
    align-items: center;
    font-size: 1.1em;
    line-height: 1.3;
}

.terms-privacy-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    flex-shrink: 0;
    margin-top: 0;
    transform: scale(1.2);
    cursor: pointer;
}

.terms-privacy-checkbox label {
    text-align: left;
    margin-bottom: 0;
    color: #ffffff;
    cursor: pointer;
    font-weight: 500;
    line-height: 1.3;
}

.terms-privacy-checkbox a {
    color: #7a47ff;
    text-decoration: underline;
    transition: color 0.3s ease;
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 3px;
}

.terms-privacy-checkbox a:hover {
    color: #3ee6d5;
    background-color: rgba(62, 230, 213, 0.1);
}

.btn.book-btn {
    width: 100%;
    padding: 15px 20px;
    background-color: #7a47ff;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn.book-btn:hover {
    background-color: #3ee6d5;
    transform: translateY(-2px);
}

.error-message,
.info-message {
    color: #ff4d4d;
    font-size: 0.95em;
    margin-top: 10px;
    text-align: center;
}

.info-message {
    color: #00ff9f;
}

/* --- Media Queries --- */

/* Small devices (phones, max-width: 576px) */
@media (max-width: 576px) {
    .content-section {
        padding: 30px 10px;
    }

    .calendar-section,
    .booking-form-section {
        padding: 15px;
    }

    .month-year-display {
        font-size: 1em;
    }

    .arrow-btn {
        padding: 6px 8px;
        font-size: 0.8em;
    }

    .calendar-weekdays-grid,
    .calendar-grid {
        gap: 2px;
    }

    .weekday-name {
        font-size: 0.75em;
        padding: 6px 0;
    }

    .calendar-day {
        font-size: 0.75em;
        padding: 6px 0;
        min-height: 28px;
    }

    .time-slots-grid {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        gap: 6px;
    }

    .time-slot {
        padding: 8px;
        font-size: 0.85em;
    }

    .form-group2 input,
    .form-group2 select {
        padding: 8px;
        font-size: 0.9em;
    }

    .terms-privacy-checkbox {
        font-size: 1.0em;
        margin: 25px 0;
    }

    .terms-privacy-checkbox input[type="checkbox"] {
        width: 15px;
        height: 15px;
        transform: scale(1.2);
        margin-right: 10px;
    }

    .terms-privacy-checkbox label {
        line-height: 1;
    }

    .terms-privacy-checkbox a {
        padding: 4px 6px;
        margin: 0 2px;
        display: inline-block;
        /*min-height: 44px;*/
        line-height: 1;
        vertical-align: middle;
    }

    .btn.book-btn {
        padding: 10px 12px;
        font-size: 0.9em;
    }
}

/* Additional breakpoint for extremely small devices (e.g., iPhone 5/SE, older Androids) */
@media (max-width: 400px) {
    .content-section {
        padding: 20px 5px;
    }

    .calendar-section,
    .booking-form-section {
        padding: 10px;
    }

    .month-year-display {
        font-size: 0.9em;
    }

    .arrow-btn {
        padding: 4px 6px;
        font-size: 0.7em;
    }

    .calendar-weekdays-grid,
    .calendar-grid {
        gap: 1px;
    }

    .weekday-name {
        font-size: 0.65em;
        padding: 4px 0;
    }

    .calendar-day {
        font-size: 0.7em;
        padding: 4px 0;
        min-height: 25px;
    }

    .time-slots-grid {
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
        gap: 4px;
    }

    .time-slot {
        padding: 6px;
        font-size: 0.8em;
    }

    .terms-privacy-checkbox {
        font-size: 0.95em;
        margin: 30px 0;
        align-items: center;
        line-height: 1.2;
    }
    
    .terms-privacy-checkbox input[type="checkbox"] {
        width: 20px;
        height: 20px;
        transform: scale(1);
        margin-right: 10px;
        margin-top: 0;
    }

    .terms-privacy-checkbox label {
        line-height: 1.2;
    }

    .terms-privacy-checkbox a {
        padding: 2px 4px;
        margin: 0 1px;
        display: inline;
        vertical-align: baseline;
        line-height: inherit;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .booking-container {
        flex-direction: row;
        align-items: flex-start;
        justify-content: center;
        gap: 40px;
    }

    .calendar-section,
    .booking-form-section {
        flex: 1;
        max-width: 45%;
        min-width: 300px;
        padding: 30px;
    }

    .month-year-display {
        font-size: 1.4em;
    }

    .arrow-btn {
        padding: 10px 15px;
        font-size: 1.1em;
    }

    .calendar-weekdays-grid,
    .calendar-grid {
        gap: 6px;
    }

    .weekday-name {
        font-size: 1em;
        padding: 10px 0;
        margin-right: 10px;
        margin-left: auto;
    }

    .calendar-day {
        font-size: 1em;
        padding: 10px;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .time-slots-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 15px;
    }

    .time-slot {
        padding: 15px;
        font-size: 1em;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .content-section {
        padding: 60px 20px;
    }

    .booking-container {
        gap: 50px;
    }

    .calendar-section,
    .booking-form-section {
        padding: 40px;
    }

    .month-year-display {
        font-size: 1.5em;
    }

    .arrow-btn {
        padding: 12px 18px;
        font-size: 1.2em;
    }

    .calendar-weekdays-grid,
    .calendar-grid {
        gap: 10px;
    }

    .weekday-name {
        font-size: 1em;
        padding: 3px;
    }

    .calendar-day {
        padding: 12px;
        font-size: 1.1em;
        min-height: 50px;
    }

    .time-slots-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

/* Styles for the Barber Selection Form Group */

.booking-container .form-group {
    margin-bottom: 20px;
    width: 100%;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

.booking-container .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
    font-size: 1em;
}

.booking-container .form-group select#barberSelect {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1em;
    color: #555;
    background-color: #fff;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%20viewBox%3D%220%200%20292.4%20292.4%22%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M287%2C197.9c-3.6%2C3.6-7.8%2C5.4-12.4%2C5.4H17.8c-4.6%2C0-8.8-1.8-12.4-5.4S0%2C189.9%2C0%2C185.3c0-4.6%2C1.8-8.8%2C5.4-12.4l130.6-130.6c3.6-3.6%2C7.8-5.4%2C12.4-5.4s8.8%2C1.8%2C12.4%2C5.4l130.6%2C130.6c3.6%2C3.6%2C5.4%2C7.8%2C5.4%2C12.4C292.4%2C189.9%2C290.6%2C194.3%2C287%2C197.9z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.booking-container .form-group select#barberSelect:focus {
    border-color: #7a47ff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(122, 71, 255, 0.2);
}

.booking-container .form-group select#barberSelect option:checked {
    background-color: #f0f0f0;
    color: #333;
}

input#currentBookingAdminId {
    display: none;
}

/* Pending Admin Registration Styles */
.pending-admins-section {
    padding: 20px;
}

.pending-admins-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.pending-admins-header h3 {
    margin: 0;
    color: #ffffff;
}

.refresh-button {
    background: #007cba;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.refresh-button:hover {
    background: #005a8b;
}

.pending-admins-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.pending-admin-card {
    background: #1a1a2e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    transition: border-color 0.3s ease;
}

.pending-admin-card:hover {
    border-color: #007cba;
}

.pending-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.pending-admin-header h4 {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
}

.pending-admin-status {
    display: flex;
    gap: 10px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.status-badge.verified {
    background: #28a745;
    color: white;
}

.status-badge.pending {
    background: #ffc107;
    color: #333;
}

.pending-admin-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.detail-row {
    color: #ccc;
    font-size: 14px;
    line-height: 1.5;
}

.detail-row strong {
    color: #fff;
}

.pending-admin-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.approve-btn, .reject-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.approve-btn {
    background: #28a745;
    color: white;
}

.approve-btn:hover:not(:disabled) {
    background: #218838;
}

.approve-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.reject-btn {
    background: #dc3545;
    color: white;
}

.reject-btn:hover {
    background: #c82333;
}

/* Enhanced signup form styles */
#signUpContainer input[type="text"],
#signUpContainer input[type="email"],
#signUpContainer input[type="tel"],
#signUpContainer input[type="password"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #333;
    border-radius: 5px;
    background: #1a1a2e;
    color: #fff;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

#signUpContainer input[type="text"]:focus,
#signUpContainer input[type="email"]:focus,
#signUpContainer input[type="tel"]:focus,
#signUpContainer input[type="password"]:focus {
    border-color: #007cba;
    outline: none;
}

#signUpContainer input::placeholder {
    color: #888;
}

/* Success and error message styles for signup */
.info-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 12px;
    border-radius: 5px;
    margin-top: 15px;
    display: block;
}

.info-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 12px;
    border-radius: 5px;
    margin-top: 15px;
    display: block;
}

.info-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    padding: 12px;
    border-radius: 5px;
    margin-top: 15px;
    display: block;
}

/* Responsive design for pending admins */
@media (max-width: 768px) {
    .pending-admins-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .pending-admin-actions {
        justify-content: center;
    }
    
    .pending-admin-details {
        grid-template-columns: 1fr;
    }
    
    .approve-btn, .reject-btn {
        flex: 1;
        justify-content: center;
    }
}
