/* Main App Container */
.gcal-booking-wrapper,
.gcal-booking-wrapper * {
    box-sizing: border-box;
    /* Ensure padding doesn't increase width */
}

.gcal-booking-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    font-family: 'Outfit', sans-serif;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
    overflow: hidden;
    min-height: 600px;
    border: 1px solid #e5e5e5;
    width: 100%;
}

/* Sidebar */
.gcal-sidebar {
    flex: 0 0 320px;
    width: 320px;
    /* Explicit width */
    background: #f8fbff;
    padding: 30px;
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

/* Profile Info */
.gcal-profile-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 24px;
}

.gcal-profile-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gcal-profile-text {
    display: flex;
    flex-direction: column;
}

.gcal-profile-name {
    font-size: 0.85em;
    color: #777;
    margin-bottom: 2px;
}

.gcal-service-title {
    font-size: 1.1em;
    font-weight: 700;
    color: #333;
    margin: 0;
    line-height: 1.2;
}

.gcal-description {
    font-size: 0.9em;
    color: #666;
    line-height: 1.5;
    margin-top: 15px;
}

/* Type Selector */
.gcal-type-selector {
    margin-bottom: 20px;
}

.gcal-type-selector label {
    display: block;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 5px;
}

#gcal-type-select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    font-size: 0.95em;
    background-color: #fff;
    color: #333;
    appearance: none;
    /* Remove native arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    cursor: pointer;
    transition: border-color 0.2s;
}

#gcal-type-select:focus {
    border-color: #0069ff;
    outline: none;
}

/* Meta Items */
.gcal-meta-item {
    display: flex;
    align-items: start;
    gap: 10px;
    margin-bottom: 12px;
    color: #555;
    font-size: 0.95em;
    font-weight: 500;
}

.gcal-meta-icon {
    width: 20px;
    text-align: center;
    color: #888;
    margin-top: 2px;
}


/* Main Content */
.gcal-main-content {
    flex: 1;
    /* Allow grow */
    width: auto;
    padding: 30px 40px;
    overflow-y: auto;
    margin: 0 auto;
}

/* ... */

.gcal-day {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.95em;
    color: #333;
    position: relative;
    border: 2px solid transparent;
    /* No border by default */
    box-sizing: border-box;
    transition: all 0.2s;
}

.gcal-day.available {
    background: #f3f8fc;
    color: #0060df;
    font-weight: 700;
    /* Border is now optional via Elementor, default here is minimal/none or specific */
    border: 1px solid transparent;
    /* Let elementor override or keep subtle */
}

.gcal-field-error {
    color: #d63031;
    font-size: 0.85em;
    margin-top: 5px;
    display: block;
}

.gcal-section-title {
    font-size: 1.5em;
    font-weight: 700;
    color: #111;
    margin-bottom: 25px;
}

/* Step 1 Grid */
.gcal-step-1-layout {
    display: flex;
    flex-direction: row;
    gap: 30px;
    align-items: flex-start;
}

.gcal-calendar-section {
    flex: 1 1 60%;
    min-width: 300px;
}

.gcal-slots-section {
    flex: 0 0 280px;
    /* Fixed width for slots to prevent jumping */
    min-height: 350px;
    /* Prevent height collapse */
    border-left: 1px solid #eee;
    padding-left: 20px;
    max-height: 400px;
    overflow-y: auto;
    /* Internal scroll for slots if too many */
    box-sizing: border-box;
}

/* Calendar Header & Nav */
.gcal-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
}

.gcal-month-label {
    font-size: 1.1em;
    font-weight: 600;
    text-transform: capitalize;
    margin: 0;
}

.gcal-nav-controls {
    display: flex !important;
    flex-direction: row !important;
    gap: 10px;
    align-items: center;
}

.gcal-nav-btn {
    background: #f2f7ff;
    border: none;
    font-size: 1.2em;
    color: #0069ff;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}

.gcal-nav-btn:hover {
    background: #e0ebff;
    color: #0056d6;
}

/* Responsive */
@media (max-width: 768px) {
    .gcal-step-1-layout {
        flex-direction: column;
    }

    .gcal-calendar-section {
        min-width: 0;
        /* Remove 300px constraint */
        width: 100%;
    }

    .gcal-slots-section {
        width: 100%;
        border-left: none;
        padding-left: 0;
        border-top: 1px solid #eee;
        padding-top: 20px;
        flex: auto;
    }

    .gcal-days-grid {
        column-gap: 3px;
        row-gap: 3px;
    }

    .gcal-day {
        width: 36px;
        height: 36px;
        font-size: 0.9em;
    }
}

/* Extra small screens */
@media (max-width: 400px) {
    .gcal-day {
        width: 32px;
        height: 32px;
        font-size: 0.85em;
    }

    .gcal-days-grid {
        column-gap: 2px;
        row-gap: 2px;
    }

    .gcal-main-content {
        padding: 10px;
    }

    .gcal-sidebar {
        padding: 10px;
    }
}

.gcal-week-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.75em;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.gcal-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    row-gap: 5px;
    column-gap: 5px;
    justify-items: center;
}

.gcal-day {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.95em;
    color: #333;
    position: relative;
    border: 2px solid transparent;
    /* No border by default */
    box-sizing: border-box;
    transition: all 0.2s;
}

.gcal-day.available {
    background: #f3f8fc;
    color: #0060df;
    font-weight: 700;
    /* Border is now optional via Elementor, default here is minimal/none or specific */
    border: 1px solid transparent;
    /* Let elementor override or keep subtle */
}

.gcal-day.available:hover {
    background: #e6f0ff;
}

.gcal-day.selected {
    background: #0060df;
    color: #ffffff;
    /* Removed !important */
    border-color: #0060df;
}

.gcal-day.disabled {
    color: #ccc;
    pointer-events: none;
}


/* Custom Scrollbar for Slots */
.gcal-slots-section::-webkit-scrollbar {
    width: 6px;
}

.gcal-slots-section::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.gcal-slots-section::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.gcal-slots-section::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

.gcal-loading-slots,
.gcal-empty-slots-msg {
    color: #777;
    margin-top: 40px;
    text-align: center;
}

.gcal-slots-title {
    font-size: 1em;
    margin-bottom: 15px;
    font-weight: 600;
}

.gcal-slots-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gcal-slot-btn {
    display: block;
    width: 100%;
    padding: 12px;
    border: 2px solid #0069ff;
    color: #0069ff;
    border-radius: 4px;
    background: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
    text-align: center;
}

.gcal-slot-btn:hover {
    background: #0069ff;
    color: #fff;
}

.gcal-slot-btn.selected {
    background: #0069ff;
    color: #fff;
}


/* Form Step 2 */
.gcal-form {
    max-width: 500px;
    width: 100%;
    /* Ensure it doesn't overflow */
}

.gcal-form-row {
    display: flex;
    gap: 20px;
}

.gcal-form-group {
    margin-bottom: 18px;
}

.gcal-form-group.half {
    flex: 1;
}

.gcal-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9em;
}

.gcal-form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.2s;
}

.gcal-form-group input:focus {
    border-color: #0069ff;
    outline: none;
}

/* Upload Zone */
.gcal-upload-zone {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    position: relative;
    background: #fafafa;
    transition: 0.2s;
}

.gcal-upload-zone:hover {
    border-color: #0069ff;
    background: #f0f7ff;
}

.gcal-upload-zone.error {
    border-color: #d32f2f;
    background: #fff0f0;
}

.gcal-upload-zone input[type="file"] {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
}

.gcal-upload-content i {
    font-size: 2em;
    color: #999;
    margin-bottom: 10px;
    display: block;
}

.gcal-upload-content p {
    margin: 0;
    color: #666;
    font-size: 0.9em;
}

#gcal-file-name {
    margin-top: 10px;
    font-weight: 600;
    color: #333;
}

/* Payment Radio Options - Inline */
#gcal-payment-methods-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;
}

.gcal-radio-option-wrapper {
    background: #fff;
    border: 1px solid #eee;
    padding: 10px 15px;
    border-radius: 6px;
    transition: all 0.2s;
    flex: 1;
    min-width: 150px;
    /* Ensure they don't get too squashed */
    display: flex;
    align-items: center;
}

.gcal-radio-option-wrapper:hover {
    border-color: #bbb;
    background: #fafafa;
}

.gcal-radio-option {
    margin: 0 !important;
    width: 100%;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.gcal-radio-option input[type="radio"] {
    width: 18px !important;
    height: 18px !important;
    accent-color: #0060df;
    margin-right: 8px;
    margin-bottom: 0;
}

.gcal-payment-title {
    font-size: 1em;
    font-weight: 600;
    color: #333;
}

.gcal-actions {
    margin-top: 25px;
}

.gcal-btn {
    background: #0069ff;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s;
}

.gcal-btn:hover {
    background: #0056d6;
}

.gcal-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Success */
.gcal-success-msg {
    text-align: center;
    padding: 50px 0;
}

/* Responsive Mobile */
@media (max-width: 900px) {
    .gcal-booking-wrapper {
        flex-direction: column;
        max-height: none;
        overflow: visible;
        min-height: auto;
        width: 100%;
        /* Ensure wrapper takes full width */
    }

    .gcal-sidebar {
        width: 100%;
        max-width: none;
        flex: auto;
        /* Reset flex */
        border-right: none;
        border-bottom: 1px solid #eee;
        padding: 15px;
    }

    .gcal-main-content {
        width: 100%;
        max-width: none;
        min-width: 0;
        /* Remove 600px constraint */
        flex: auto;
        padding: 15px;
    }

    .gcal-form {
        max-width: 100%;
    }

    .gcal-step-1-layout {
        flex-direction: column;
        gap: 20px;
    }

    .gcal-calendar-section {
        border-right: none;
    }

    .gcal-slots-section {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid #eee;
        padding-top: 20px;
    }

    .gcal-form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Mobile Header-like Sidebar (< 720px) */
/* Mobile Header-like Sidebar (< 720px) */
@media (max-width: 720px) {
    .gcal-wrapper {
        flex-direction: column;
    }

    .gcal-sidebar {
        width: 100%;
        max-width: 100%;
        min-height: auto;
        padding: 15px;
        border-right: none;
        border-bottom: 1px solid #eee;
        order: -1;

        /* 2 Column Layout for Header */
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        align-items: center;
    }

    /* Col 1: Profile */
    .gcal-sidebar .gcal-profile-header {
        flex-direction: row;
        text-align: left;
        margin-bottom: 0;
        width: 100%;
        justify-content: flex-start;
        align-items: center;
        grid-column: 1;
    }

    .gcal-sidebar .gcal-profile-image {
        width: 50px;
        height: 50px;
        /* Smaller for header */
        margin-bottom: 0;
        margin-right: 12px;
    }

    /* Col 2: Summary Details */
    .gcal-sidebar-summary {
        grid-column: 2;
        text-align: right;
        /* Align right to balance */
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
    }

    /* Ensure summary items are visible and styled for header */
    .gcal-selected-service,
    .gcal-selected-datetime {
        display: block !important;
        /* Force show */
        font-size: 0.85em;
        line-height: 1.2;
    }

    .gcal-selected-service {
        font-weight: 600;
        color: #333;
    }

    .gcal-selected-datetime {
        color: #666;
    }

    /* Adjust profile text size */
    .gcal-sidebar h3 {
        font-size: 1em;
        margin: 0;
    }

    .gcal-sidebar p {
        font-size: 0.85em;
        margin: 0;
        display: none;
        /* Hide description in header to save space? User said "resumen", usually implies selection not static desc. */
    }

    /* Show only Name and Title in profile text */
    .gcal-profile-text .gcal-description {
        display: none;
    }
}

/* Compact Layout (Explicit Control) */
.gcal-booking-wrapper.layout-compact {
    flex-direction: column;
}

.gcal-booking-wrapper.layout-compact .gcal-sidebar {
    width: 100%;
    max-width: 100%;
    flex: 0 0 auto;
    border-right: none;
    border-bottom: 1px solid #eee;
    padding: 15px 30px;

    /* Horizontal Layout */
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    order: -1;
}

/* Profile in Compact */
.gcal-booking-wrapper.layout-compact .gcal-profile-header {
    margin-bottom: 0;
    flex-direction: row;
    align-items: center;
    width: auto;
}

.gcal-booking-wrapper.layout-compact .gcal-profile-img {
    width: 50px;
    height: 50px;
    margin-bottom: 0;
    margin-right: 15px;
}

.gcal-booking-wrapper.layout-compact .gcal-service-title {
    font-size: 1.1em;
    margin: 0;
}

.gcal-booking-wrapper.layout-compact .gcal-profile-name {
    display: none;
    /* Often cleaner to hide name in compact, or keep small */
}

.gcal-booking-wrapper.layout-compact .gcal-description {
    display: none;
}

/* Summary in Compact: Horizontal Row */
.gcal-booking-wrapper.layout-compact .gcal-sidebar-summary {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    /* allow wrap if tight */
}

/* Adjust items in summary row */
.gcal-booking-wrapper.layout-compact .gcal-type-selector {
    margin-bottom: 0;
    margin-right: 10px;
}

.gcal-booking-wrapper.layout-compact .gcal-type-selector label {
    display: none;
    /* Hide label to save space */
}

.gcal-booking-wrapper.layout-compact #gcal-type-select {
    padding: 6px 10px;
    font-size: 0.9em;
    width: auto;
}

.gcal-booking-wrapper.layout-compact .gcal-meta-item {
    margin-bottom: 0;
    font-size: 0.9em;
    background: #f0f7ff;
    padding: 6px 12px;
    border-radius: 20px;
    color: #0069ff;
    width: auto;
    /* auto width */
}

.gcal-booking-wrapper.layout-compact .gcal-meta-icon {
    color: #0069ff;
    margin-top: 0;
    width: auto;
    margin-right: 6px;
}

/* Response for Compact on very small screens */
@media (max-width: 600px) {
    .gcal-booking-wrapper.layout-compact .gcal-sidebar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .gcal-booking-wrapper.layout-compact .gcal-sidebar-summary {
        width: 100%;
        justify-content: flex-start;
    }
}