/**
 * WorkZen Connector - Online Booking Styles
 *
 * Styles for the booking modal, calendar, time slots, and job selection.
 */

/* Booking Modal Specific Styles */
.wzc-booking-modal {
    max-width: 720px;
    max-height: 90vh;
    overflow-y: auto;
}

/* Booking Steps */
.wzc-booking-step {
    display: none;
    animation: wzc-fade-in 0.3s ease-in-out;
}

.wzc-booking-step.active {
    display: block;
}

.wzc-booking-step-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e5e7eb;
}

/* Job Type Cards */
.wzc-job-types {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.wzc-job-type-card {
    padding: 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 60px;
}

.wzc-job-type-card:hover {
    border-color: var(--wzc-button-color, #667eea);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.wzc-job-type-card.selected {
    border-color: var(--wzc-button-color, #667eea);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.wzc-job-type-card h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
}

.wzc-job-type-card p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
}

/* Calendar Container */
.wzc-calendar-container {
    background: #f9fafb;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.wzc-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.wzc-calendar-month {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
}

.wzc-calendar-prev,
.wzc-calendar-next {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.wzc-calendar-prev:hover:not(:disabled),
.wzc-calendar-next:hover:not(:disabled) {
    background: var(--wzc-button-color, #667eea);
    border-color: var(--wzc-button-color, #667eea);
    color: #fff;
}

.wzc-calendar-prev:disabled,
.wzc-calendar-next:disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    background: #f3f4f6 !important;
    border-color: #e5e7eb !important;
    color: #9ca3af !important;
}

.wzc-calendar-prev svg,
.wzc-calendar-next svg {
    width: 20px;
    height: 20px;
}

.wzc-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.wzc-calendar-weekday {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    padding: 0.5rem 0;
}

.wzc-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.wzc-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #1f2937;
}

.wzc-calendar-day.empty {
    background: transparent;
    border: none;
    cursor: default;
}

.wzc-calendar-day.today {
    border-color: var(--wzc-button-color, #667eea);
    color: var(--wzc-button-color, #667eea);
    font-weight: 600;
}

.wzc-calendar-day.disabled {
    background: #f3f4f6;
    color: #d1d5db;
    cursor: not-allowed;
    border-color: #f3f4f6;
}

.wzc-calendar-day:not(.empty):not(.disabled):hover {
    background: var(--wzc-button-color, #667eea);
    border-color: var(--wzc-button-color, #667eea);
    color: #fff;
    transform: scale(1.05);
}

.wzc-calendar-day.selected {
    background: var(--wzc-button-color, #667eea);
    border-color: var(--wzc-button-color, #667eea);
    color: #fff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Time Slots */
.wzc-selected-date {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-radius: 8px;
    border-left: 4px solid var(--wzc-button-color, #667eea);
}

.wzc-time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
}

.wzc-time-slot {
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    color: #1f2937;
}

.wzc-time-slot:hover {
    border-color: var(--wzc-button-color, #667eea);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    transform: translateY(-2px);
}

.wzc-time-slot.selected {
    background: var(--wzc-button-color, #667eea);
    border-color: var(--wzc-button-color, #667eea);
    color: #fff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.wzc-no-slots {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
    font-style: italic;
}

/* Booking Summary */
.wzc-booking-summary {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--wzc-button-color, #667eea);
}

.wzc-summary-item {
    margin-bottom: 0.75rem;
}

.wzc-summary-item:last-child {
    margin-bottom: 0;
}

.wzc-summary-item strong {
    display: inline-block;
    min-width: 100px;
    color: #1f2937;
    font-weight: 600;
}

.wzc-summary-item span {
    color: #4b5563;
}

/* Booking Actions */
.wzc-booking-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.wzc-back-btn,
.wzc-skip-btn {
    padding: 18px 24px !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 12px !important;
    background: #fff !important;
    background-color: #fff !important;
    color: #6b7280 !important;
    font-size: 0.9375rem !important;
    font-weight: 500 !important;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s ease;
    outline: none !important;
    box-shadow: none !important;
}

.wzc-back-btn:hover,
.wzc-skip-btn:hover {
    border-color: #d1d5db !important;
    background: #f9fafb !important;
    background-color: #f9fafb !important;
    color: #1f2937 !important;
    outline: none !important;
    box-shadow: none !important;
}

.wzc-back-btn:focus,
.wzc-skip-btn:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Submit Button - Black with strong overrides to prevent theme conflicts */
.wzc-booking-modal .wzc-submit-btn {
    width: 100%;
    padding: 18px 24px !important;
    background: #000000 !important;
    background-color: #000000 !important;
    color: white !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
}

.wzc-booking-modal .wzc-submit-btn:hover {
    background: #1a1a1a !important;
    background-color: #1a1a1a !important;
    color: white !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.wzc-booking-modal .wzc-submit-btn:focus {
    background: #000000 !important;
    background-color: #000000 !important;
    color: white !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.wzc-booking-modal .wzc-submit-btn:active {
    transform: translateY(0);
    background: #000000 !important;
    background-color: #000000 !important;
    color: white !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.wzc-booking-modal .wzc-submit-btn:disabled,
.wzc-booking-modal .wzc-submit-btn.loading {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    background: #000000 !important;
    background-color: #000000 !important;
    color: white !important;
    border: none !important;
}

/* Message Styles */
.wzc-message {
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    animation: wzc-slide-down 0.3s ease-out;
}

.wzc-message.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    border-left: 4px solid #10b981;
    color: #065f46;
}

.wzc-message.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.wzc-message h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.wzc-message p {
    margin: 0;
    font-size: 0.9375rem;
}

/* Animation */
@keyframes wzc-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wzc-slide-down {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .wzc-booking-modal {
        max-width: 95%;
        margin: 1rem;
    }

    .wzc-booking-step-title {
        font-size: 1.125rem;
    }

    .wzc-calendar-container {
        padding: 1rem;
    }

    .wzc-calendar-day {
        font-size: 0.875rem;
    }

    .wzc-time-slots {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.5rem;
    }

    .wzc-time-slot {
        padding: 0.75rem;
        font-size: 0.875rem;
    }

    .wzc-booking-actions {
        flex-direction: column;
    }

    .wzc-back-btn,
    .wzc-skip-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .wzc-booking-modal {
        max-width: 100%;
        margin: 0.5rem;
        border-radius: 16px;
    }

    .wzc-job-types {
        grid-template-columns: 1fr;
    }

    .wzc-job-type-card {
        padding: 1rem;
    }

    .wzc-job-type-card h4 {
        font-size: 1rem;
    }

    .wzc-job-type-card p {
        font-size: 0.8125rem;
    }

    .wzc-calendar-month {
        font-size: 1rem;
    }

    .wzc-calendar-weekday {
        font-size: 0.6875rem;
    }

    .wzc-calendar-day {
        font-size: 0.8125rem;
    }

    .wzc-time-slots {
        grid-template-columns: repeat(2, 1fr);
    }

    .wzc-summary-item strong {
        display: block;
        margin-bottom: 0.25rem;
    }
}

/* Loading State - Updated for black button */
.wzc-booking-modal .wzc-submit-btn.loading {
    position: relative;
    color: transparent !important;
}

.wzc-booking-modal .wzc-submit-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: wzc-spin 0.8s linear infinite;
}

@keyframes wzc-spin {
    to { transform: rotate(360deg); }
}

/* Scrollbar Styling for Time Slots */
.wzc-time-slots::-webkit-scrollbar {
    width: 6px;
}

.wzc-time-slots::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.wzc-time-slots::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.wzc-time-slots::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}
