/**
 * EMWP Consultation Booking — Front-End Styles
 */

/* -----------------------------------------------
   Container
   ----------------------------------------------- */
.emwp-consultation {
    max-width: 600px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #333;
}

.emwp-consultation-loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* -----------------------------------------------
   Step Headers
   ----------------------------------------------- */
.emwp-step-title {
    font-size: 18px;
    font-weight: 600;
    margin: 24px 0 12px;
    color: #1a1a1a;
}

.emwp-step-title:first-child {
    margin-top: 0;
}

/* -----------------------------------------------
   Calendar
   ----------------------------------------------- */
.emwp-calendar {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    user-select: none;
}

.emwp-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

.emwp-calendar-title {
    font-size: 16px;
    font-weight: 600;
}

.emwp-calendar-nav {
    background: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 16px;
    line-height: 30px;
    text-align: center;
    color: #333;
    transition: background 0.15s;
}

.emwp-calendar-nav:hover {
    background: #e0e0e0;
}

.emwp-calendar-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.emwp-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.emwp-calendar-dow {
    padding: 8px 4px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    background: #fafafa;
    border-bottom: 1px solid #e0e0e0;
}

.emwp-calendar-day {
    padding: 10px 4px;
    text-align: center;
    font-size: 14px;
    border: none;
    background: none;
    cursor: default;
    color: #ccc;
    min-height: 40px;
}

.emwp-calendar-day.available {
    color: #333;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.15s;
}

.emwp-calendar-day.available:hover {
    background: #e3f2fd;
    border-radius: 50%;
}

.emwp-calendar-day.selected {
    background: #1565c0;
    color: #fff;
    border-radius: 50%;
    font-weight: 600;
}

.emwp-calendar-day.empty {
    visibility: hidden;
}

/* -----------------------------------------------
   Time Slots
   ----------------------------------------------- */
.emwp-time-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.emwp-time-slot {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fafafa;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background 0.15s, border-color 0.15s;
}

.emwp-time-slot:hover {
    background: #e3f2fd;
    border-color: #1565c0;
}

.emwp-time-slot.selected {
    background: #1565c0;
    color: #fff;
    border-color: #1565c0;
}

.emwp-slots-loading {
    padding: 16px;
    text-align: center;
    color: #999;
}

/* -----------------------------------------------
   Form
   ----------------------------------------------- */
.emwp-consultation-form {
    margin-top: 8px;
}

.emwp-form-group {
    margin-bottom: 16px;
}

.emwp-form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.emwp-form-group input[type="text"],
.emwp-form-group input[type="email"],
.emwp-form-group input[type="tel"],
.emwp-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.emwp-form-group input:focus,
.emwp-form-group textarea:focus {
    border-color: #1565c0;
    outline: none;
    box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.15);
}

.emwp-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.emwp-form-group .emwp-field-error {
    border-color: #d32f2f;
}

.emwp-form-error {
    color: #d32f2f;
    font-size: 12px;
    margin-top: 4px;
}

/* Radio buttons — meeting type */
.emwp-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.emwp-radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

.emwp-radio-option input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

/* Submit button */
.emwp-submit-btn {
    display: inline-block;
    padding: 12px 28px;
    background: #1565c0;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.emwp-submit-btn:hover {
    background: #0d47a1;
}

.emwp-submit-btn:disabled {
    background: #999;
    cursor: not-allowed;
}

/* -----------------------------------------------
   Messages
   ----------------------------------------------- */
.emwp-message {
    padding: 20px;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.5;
}

.emwp-message-success {
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #a5d6a7;
}

.emwp-message-error {
    background: #ffebee;
    color: #b71c1c;
    border: 1px solid #ef9a9a;
}

.emwp-message-info {
    background: #e3f2fd;
    color: #0d47a1;
    border: 1px solid #90caf9;
}

/* -----------------------------------------------
   Cancel/Reschedule
   ----------------------------------------------- */
.emwp-cancel-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.emwp-cancel-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.emwp-cancel-btn-confirm {
    background: #d32f2f;
    color: #fff;
}

.emwp-cancel-btn-confirm:hover {
    background: #b71c1c;
}

.emwp-cancel-btn-back {
    background: #e0e0e0;
    color: #333;
}

.emwp-cancel-btn-back:hover {
    background: #ccc;
}

/* -----------------------------------------------
   Selected Summary
   ----------------------------------------------- */
.emwp-selected-summary {
    background: #f5f5f5;
    padding: 12px 16px;
    border-radius: 6px;
    margin: 12px 0;
    font-size: 14px;
    color: #555;
}

.emwp-selected-summary strong {
    color: #1a1a1a;
}

/* -----------------------------------------------
   Responsive
   ----------------------------------------------- */
@media (max-width: 600px) {
    .emwp-consultation {
        max-width: 100%;
    }

    .emwp-time-slots {
        gap: 6px;
    }

    .emwp-time-slot {
        padding: 8px 12px;
        font-size: 13px;
    }

    .emwp-cancel-actions {
        flex-direction: column;
    }
}
