/**
 * ICONGYM Client Booking Styles
 *
 * @package ICONGYM\Intro
 */

/* ==========================================================================
   Variables (inherit from trainer.css if loaded, otherwise define)
   ========================================================================== */
:root {
    --icg-primary: #6158a6;
    --icg-primary-hover: #1d4ed8;
    --icg-secondary: #64748b;
    --icg-success: #22c55e;
    --icg-warning: #f59e0b;
    --icg-error: #ef4444;
    --icg-info: #3b82f6;
    --icg-text: #1e293b;
    --icg-text-light: #64748b;
    --icg-border: #e2e8f0;
    --icg-bg: #f8fafc;
    --icg-white: #ffffff;
    --icg-radius: 6px;
    --icg-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Client Container
   ========================================================================== */
.icg-client-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
}

/* ==========================================================================
   Notices (same as trainer)
   ========================================================================== */
.icg-notice {
    padding: 15px 20px;
    border-radius: var(--icg-radius);
    margin-bottom: 20px;
    border-left: 4px solid;
    transition: opacity 0.3s ease;
}

.icg-notice p {
    margin: 0;
}

.icg-notice-error {
    background-color: #fef2f2;
    border-left-color: var(--icg-error);
    color: #991b1b;
}

.icg-notice-success {
    background-color: #f0fdf4;
    border-left-color: var(--icg-success);
    color: #166534;
}

.icg-notice-warning {
    background-color: #fffbeb;
    border-left-color: var(--icg-warning);
    color: #92400e;
}

.icg-notice-info {
    background-color: #eff6ff;
    border-left-color: var(--icg-info);
    color: #1e40af;
}

/* ==========================================================================
   Client Header
   ========================================================================== */
.icg-client-header {
    text-align: center;
    margin-bottom: 30px;
}

.icg-client-header h2 {
    margin: 0 0 10px;
    color: var(--icg-text);
    font-size: 26px;
    font-weight: 600;
}

.icg-client-greeting {
    margin: 0;
    color: var(--icg-text-light);
    font-size: 16px;
}

.icg-client-back {
    text-align: center;
    margin-top: 20px;
}

.icg-client-back p {
    margin: 0;
    color: var(--icg-text-light);
    font-size: 14px;
}

/* ==========================================================================
   Booking Section
   ========================================================================== */
.icg-booking-section {
    background: var(--icg-white);
    padding: 25px;
    border-radius: var(--icg-radius);
    box-shadow: var(--icg-shadow);
    margin-bottom: 20px;
}

.icg-booking-section h3 {
    margin: 0 0 20px;
    color: var(--icg-text);
    font-size: 18px;
    font-weight: 600;
}

.icg-client-messages {
    margin-bottom: 15px;
}

/* ==========================================================================
   Loading State
   ========================================================================== */
.icg-loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--icg-text-light);
    font-size: 15px;
}

.icg-no-times {
    text-align: center;
    padding: 40px 20px;
    color: var(--icg-text-light);
    background: var(--icg-bg);
    border-radius: var(--icg-radius);
    font-size: 15px;
}

/* ==========================================================================
   Available Times List
   ========================================================================== */
.icg-times-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.icg-date-group {
    border: 1px solid var(--icg-border);
    border-radius: var(--icg-radius);
    overflow: hidden;
}

.icg-date-header {
    background: var(--icg-bg);
    padding: 12px 15px;
    border-bottom: 1px solid var(--icg-border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.icg-date-weekday {
    font-weight: 600;
    color: var(--icg-text);
    font-size: 15px;
}

.icg-date-formatted {
    color: var(--icg-text-light);
    font-size: 14px;
}

.icg-time-slots {
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ==========================================================================
   Time Slot Buttons
   ========================================================================== */
.icg-time-slot {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 16px;
    background: var(--icg-white);
    border: 2px solid var(--icg-border);
    border-radius: var(--icg-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-family: inherit;
    color: var(--icg-text);
}

.icg-time-slot:hover {
    border-color: var(--icg-primary);
    background: #f0f7ff;
}

.icg-time-slot:focus {
    outline: none;
    border-color: var(--icg-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.icg-time-slot.selected {
    border-color: var(--icg-primary);
    background: var(--icg-primary);
    color: var(--icg-white);
}

.icg-time-slot.selected:hover {
    background: var(--icg-primary-hover);
    border-color: var(--icg-primary-hover);
}

.icg-time-value {
    font-weight: 600;
}

.icg-time-separator {
    color: var(--icg-text-light);
}

.icg-time-slot.selected .icg-time-separator {
    color: rgba(255, 255, 255, 0.7);
}

.icg-time-end {
    font-weight: 500;
}

/* ==========================================================================
   Booking Info
   ========================================================================== */
.icg-booking-info {
    text-align: center;
}

.icg-info-text {
    margin: 0;
    color: var(--icg-text-light);
    font-size: 14px;
}

/* ==========================================================================
   Booking Form Container
   ========================================================================== */
.icg-booking-form-container {
    margin-top: 25px;
}

.icg-booking-form {
    background: var(--icg-white);
    padding: 25px;
    border-radius: var(--icg-radius);
    box-shadow: var(--icg-shadow);
    border: 2px solid var(--icg-primary);
}

.icg-booking-form h4 {
    margin: 0 0 15px;
    color: var(--icg-text);
    font-size: 16px;
    font-weight: 600;
}

/* ==========================================================================
   Selected Time Display
   ========================================================================== */
.icg-selected-time-display {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
    background: var(--icg-bg);
    border-radius: var(--icg-radius);
    margin-bottom: 20px;
}

.icg-selected-weekday {
    font-weight: 600;
    color: var(--icg-text);
}

.icg-selected-date {
    color: var(--icg-text-light);
}

.icg-selected-time {
    font-weight: 600;
    color: var(--icg-primary);
    padding: 4px 10px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 4px;
}

.icg-change-time-btn {
    margin-left: auto;
    padding: 6px 12px;
    font-size: 13px;
    background: var(--icg-white);
    border: 1px solid var(--icg-border);
    border-radius: var(--icg-radius);
    color: var(--icg-text-light);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.icg-change-time-btn:hover {
    border-color: var(--icg-text-light);
    color: var(--icg-text);
}

/* ==========================================================================
   Confirm Form
   ========================================================================== */
.icg-confirm-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.icg-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.icg-form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--icg-text);
}

.icg-required {
    color: var(--icg-error);
}

.icg-optional {
    font-weight: 400;
    color: var(--icg-text-light);
    font-size: 12px;
}

.icg-form-group input[type="text"],
.icg-form-group input[type="email"],
.icg-form-group input[type="tel"] {
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid var(--icg-border);
    border-radius: var(--icg-radius);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}

.icg-form-group input[type="text"]:focus,
.icg-form-group input[type="email"]:focus,
.icg-form-group input[type="tel"]:focus {
    outline: none;
    border-color: var(--icg-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.icg-form-checkbox {
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
}

.icg-form-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}

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

.icg-form-hint {
    font-size: 12px;
    color: var(--icg-text-light);
    margin-left: auto;
}

.icg-form-actions {
    margin-top: 10px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.icg-button {
    display: inline-block;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    border: none;
    border-radius: var(--icg-radius);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    font-family: inherit;
}

.icg-button:hover {
    transform: translateY(-1px);
}

.icg-button:active {
    transform: translateY(0);
}

.icg-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.icg-button-primary {
    background-color: var(--icg-primary);
    color: var(--icg-white);
    width: 100%;
}

.icg-button-primary:hover {
    background-color: var(--icg-primary-hover);
}

/* ==========================================================================
   Booking Success
   ========================================================================== */
.icg-booking-success {
    text-align: center;
    padding: 40px 20px;
    background: var(--icg-white);
    border-radius: var(--icg-radius);
    box-shadow: var(--icg-shadow);
}

.icg-success-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: var(--icg-success);
    color: var(--icg-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: bold;
}

.icg-booking-success h3 {
    margin: 0 0 15px;
    color: var(--icg-text);
    font-size: 22px;
    font-weight: 600;
}

.icg-trainer-info {
    margin: 0 0 20px;
    color: var(--icg-text);
    font-size: 16px;
}

.icg-trainer-info strong {
    color: var(--icg-primary);
}

.icg-booking-details {
    padding: 15px;
    background: var(--icg-bg);
    border-radius: var(--icg-radius);
    display: inline-block;
    text-align: left;
}

.icg-booking-details p {
    margin: 0 0 5px;
    color: var(--icg-text);
    font-size: 14px;
}

.icg-booking-details p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 600px) {
    .icg-client-container {
        padding: 15px;
    }

    .icg-client-header h2 {
        font-size: 22px;
    }

    .icg-booking-section {
        padding: 20px;
    }

    .icg-date-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .icg-time-slots {
        padding: 12px;
        gap: 8px;
    }

    .icg-time-slot {
        padding: 8px 12px;
        font-size: 13px;
        flex: 1 1 calc(50% - 4px);
        justify-content: center;
        min-width: 100px;
    }

    .icg-booking-form {
        padding: 20px;
    }

    .icg-selected-time-display {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .icg-change-time-btn {
        margin-left: 0;
        margin-top: 5px;
    }

    .icg-form-checkbox {
        flex-direction: column;
        align-items: flex-start;
    }

    .icg-form-hint {
        margin-left: 0;
    }

    .icg-booking-success {
        padding: 30px 15px;
    }

    .icg-success-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .icg-booking-success h3 {
        font-size: 18px;
    }

    .icg-booking-details {
        width: 100%;
        box-sizing: border-box;
    }
}

/* ==================================================================
   CASE 05 FIX 01: Fixed-time invitation confirmation card
   ================================================================== */
.icg-fixed-confirm {
    max-width: 560px;
    margin: 0 auto;
    padding: 4px 0;
}
.icg-fixed-trainer {
    font-size: 16px;
    color: #1e293b;
    margin: 0 0 16px;
}
.icg-fixed-details {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #2563eb;
    border-radius: 8px;
    padding: 16px 18px;
    margin: 0 0 18px;
}
.icg-fixed-date {
    margin: 0 0 4px;
    color: #334155;
    text-transform: capitalize;
}
.icg-fixed-time {
    margin: 0;
    font-size: 22px;
    color: #1e293b;
}
.icg-fixed-client-summary {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px 18px;
    margin: 0 0 16px;
}
.icg-fixed-client-summary h3 {
    margin: 0 0 10px;
    font-size: 15px;
}
.icg-fixed-client-summary p {
    margin: 0 0 6px;
    color: #1e293b;
}
.icg-fixed-label {
    color: #64748b;
    font-weight: 600;
}
.icg-fixed-consent {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 16px;
    line-height: 1.5;
}
.icg-fixed-messages {
    margin: 12px 0;
    font-size: 14px;
    min-height: 1em;
}
.icg-fixed-messages.icg-message-error {
    color: #b91c1c;
}
.icg-fixed-actions {
    margin-top: 8px;
}
.icg-fixed-confirm-btn {
    width: 100%;
    min-height: 48px;
    font-size: 16px;
}
.icg-fixed-confirm-btn[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}
