/* WP Course Booking – Frontend Styles */

/* -------------------------------------------------------------------------
   Layout
   ------------------------------------------------------------------------- */

.wcb-booking-form {
    max-width: 800px;
    margin: 0 auto;
}

/* -------------------------------------------------------------------------
   Course groups (grouped by type)
   ------------------------------------------------------------------------- */

.wcb-course-group {
    margin-bottom: 40px;
}

.wcb-course-group__title {
    margin: 0 0 6px;
    font-size: 1.4em;
    border-bottom: 2px solid #eee;
    padding-bottom: 8px;
}

.wcb-course-group__description {
    margin: 0 0 4px;
    color: #555;
    font-size: .95em;
}

.wcb-course-group__description p {
    margin: 0;
}

/* -------------------------------------------------------------------------
   Course grid
   ------------------------------------------------------------------------- */

.wcb-course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 16px;
}

.wcb-course-card {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    display: flex;
    flex-direction: column;
}

.wcb-course-card__header {
    margin-bottom: 12px;
}

.wcb-course-card__title {
    margin: 0 0 6px;
    font-size: 1.1em;
}

.wcb-course-card__date {
    font-size: .875em;
    color: #666;
}

.wcb-course-card__dates {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    margin-top: 4px;
    font-size: .875em;
    color: #555;
}

.wcb-dates-icon {
    flex-shrink: 0;
}

.wcb-session-blocks {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: auto auto auto;
    column-gap: 10px;
    row-gap: 0.15em;
    align-items: baseline;
    line-height: 1.6;
}

.wcb-session-blocks li {
    display: contents;
}

.wcb-block-days {
    color: #999;
}

.wcb-block-time {
    color: #999;
}

.wcb-course-card__instructor,
.wcb-course-card__location {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    font-size: .875em;
    color: #555;
}

.wcb-course-card__description {
    font-size: .9em;
    color: #444;
    margin-bottom: 12px;
    flex: 1;
}

.wcb-course-card__description p:first-child { margin-top: 0; }
.wcb-course-card__description p:last-child  { margin-bottom: 0; }

.wcb-course-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: .9em;
}

.wcb-course-card__seats.wcb-full {
    color: #c00;
    font-weight: bold;
}

.wcb-course-card__actions {
    margin-top: auto;
}

/* -------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------- */

.wcb-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: .95em;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background .2s, color .2s;
}

.wcb-btn--primary {
    background: #0073aa;
    color: #fff;
}

.wcb-btn--primary:hover {
    background: #005f8a;
    color: #fff;
}

.wcb-btn--secondary {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
}

.wcb-btn--secondary:hover {
    background: #e0e0e0;
}

/* -------------------------------------------------------------------------
   Booking form
   ------------------------------------------------------------------------- */

.wcb-booking-form {
    margin-top: 32px;
    padding: 24px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fafafa;
}

.wcb-booking-form__header {
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.wcb-booking-form__label {
    margin: 0 0 10px;
    font-size: .8em;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.wcb-booking-form__title {
    font-size: 1.1em;
}

.wcb-booking-form__notice {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
}

.wcb-booking-form__notice--warning {
    background: #fff8e1;
    border-left: 4px solid #f59e0b;
    color: #78350f;
}

.wcb-notice--error {
    background: #fde;
    border-left: 4px solid #c00;
    color: #700;
}

.wcb-notice--info {
    background: #f0f6fc;
    border-left: 4px solid #0073aa;
    color: #1a3a4a;
}

.wcb-notice--success {
    background: #dfd;
    border-left: 4px solid #060;
    color: #030;
}

.wcb-fieldset {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 16px 20px;
    margin-bottom: 20px;
    background: #fff;
}

.wcb-fieldset__legend {
    font-weight: bold;
    padding: 0 8px;
    font-size: .95em;
    color: #333;
}

.wcb-form-row {
    margin-bottom: 14px;
}

.wcb-form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: .9em;
}

.wcb-form-row--checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-weight: normal;
}

.wcb-form-row--checkbox label > span {
    flex: 1;
    min-width: 0;
}

.wcb-form-row--checkbox input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
}

.wcb-input,
.wcb-textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: .9em;
    box-sizing: border-box;
}

input[type="date"].wcb-input {
    width: auto;
    max-width: 100%;
    min-width: 0;
}

.wcb-input:focus,
.wcb-textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,.15);
}

.wcb-textarea {
    resize: vertical;
    min-height: 80px;
}

.wcb-description {
    font-size: .8em;
    color: #666;
    margin: 4px 0 0;
}

.wcb-form-submit {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wcb-submit-btn {
    font-size: 1em;
    padding: 12px 28px;
}

.wcb-spinner {
    font-size: .9em;
    color: #666;
    font-style: italic;
}

.wcb-fieldset--legal {
    background: #fffbe6;
}

/* -------------------------------------------------------------------------
   Return from Stripe
   ------------------------------------------------------------------------- */

.wcb-return-notice {
    padding: 14px 18px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 1em;
}

/* -------------------------------------------------------------------------
   No courses / error
   ------------------------------------------------------------------------- */

.wcb-no-courses,
.wcb-error,
.wcb-full {
    padding: 16px;
    background: #f5f5f5;
    border-radius: 4px;
    text-align: center;
    color: #666;
}

.wcb-error { color: #c00; }

.wcb-input--error {
    border-color: #c00 !important;
    box-shadow: 0 0 0 2px rgba(200,0,0,.15) !important;
}

.wcb-input--valid {
    border-color: #2a9d5c !important;
    box-shadow: 0 0 0 2px rgba(42,157,92,.12) !important;
}

.wcb-input-wrap {
    position: relative;
    display: block;
}

.wcb-valid-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #2a9d5c;
    font-weight: bold;
    font-size: .9em;
    pointer-events: none;
}

.wcb-field-error::before {
    content: '✕\00a0';
}

.wcb-radio-group {
    display: flex;
    gap: 20px;
    margin-top: 4px;
}

.wcb-radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: normal;
    cursor: pointer;
}

.wcb-radio-group.wcb-input--error {
    outline: 2px solid rgba(200,0,0,.4);
    outline-offset: 4px;
    border-radius: 3px;
}

.wcb-form-row--checkbox.wcb-input--error label {
    color: #c00;
}

.wcb-field-error {
    display: block;
    margin-top: 4px;
    font-size: .82em;
    color: #c00;
}

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */

@media ( max-width: 600px ) {
    .wcb-course-grid {
        grid-template-columns: 1fr;
    }

    .wcb-booking-form {
        padding: 16px;
    }

    .wcb-fieldset {
        padding: 12px;
    }
}
