/* Calendrone - Appointment Booking Widget CSS */

:root {
    --calendly-blue: #006BFF;
    --calendly-light-blue: #F0F7FF;
    --calendly-dark-blue: #0052CC;
    --calendly-gray: #6B7684;
    --calendly-light-gray: #F8F9FA;
    --calendly-border: #E1E5E9;
    --calendly-text: #2D3748;
    --calendly-white: #FFFFFF;
    --calendly-success: #28A745;
    --calendly-warning: #FFC107;
    --calendly-danger: #DC3545;
    --calendly-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --calendly-radius: 8px;
    --calendly-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Calendrone Block Title */
.calendrone-block-title {
    text-align: center;
    color: var(--calendly-text);
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 30px 0;
    font-family: var(--calendly-font);
}

/* Calendrone Booking Widget */
.calendrone-booking-widget {
    font-family: var(--calendly-font);
    max-width: 800px;
    margin: 0 auto;
    background: var(--calendly-white);
    border-radius: var(--calendly-radius);
    box-shadow: var(--calendly-shadow);
    overflow: hidden;
    position: relative;
}

/* Steps */
.calendrone-step {
    display: none;
    padding: 40px;
    min-height: 500px;
}

.calendrone-step.active {
    display: block;
}

.calendrone-step-header {
    text-align: center;
    margin-bottom: 40px;
}

.calendrone-step-header h3 {
    color: var(--calendly-text);
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.calendrone-step-header p {
    color: var(--calendly-gray);
    font-size: 16px;
    margin: 0 0 20px 0;
}

/* Buttons */
.calendrone-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: var(--calendly-radius);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.calendrone-btn-primary {
    background: var(--calendly-blue);
    color: var(--calendly-white);
}

.calendrone-btn-primary:hover {
    background: var(--calendly-dark-blue);
}

.calendrone-btn-secondary {
    background: var(--calendly-light-gray);
    color: var(--calendly-text);
    border: 1px solid var(--calendly-border);
}

.calendrone-btn-secondary:hover {
    background: var(--calendly-border);
}

.calendrone-btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

.calendrone-btn-icon {
    padding: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Service Selection */
.calendrone-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.calendrone-service-option {
    border: 2px solid var(--calendly-border);
    border-radius: var(--calendly-radius);
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--calendly-white);
}

.calendrone-service-option:hover,
.calendrone-service-option.selected {
    border-color: var(--calendly-blue);
    box-shadow: 0 2px 8px rgba(0, 107, 255, 0.1);
}

.calendrone-service-option .service-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-left: 15px;
}

.calendrone-service-option .service-header h4 {
    margin: 0;
    font-size: 18px;
    color: var(--calendly-text);
}

.calendrone-service-option .service-duration {
    background: var(--calendly-light-blue);
    color: var(--calendly-blue);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.calendrone-service-option .service-description {
    color: var(--calendly-gray);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.calendrone-service-option .service-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendrone-service-option .service-price {
    font-weight: 600;
    color: var(--calendly-text);
}

/* Date & Time Selection */
.calendrone-datetime-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .calendrone-datetime-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Calendar */
.calendrone-calendar-section {
    background: var(--calendly-white);
}

.calendrone-calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendrone-calendar-nav h4 {
    margin: 0;
    font-size: 18px;
    color: var(--calendly-text);
}

.calendrone-calendar-grid {
    border: 1px solid var(--calendly-border);
    border-radius: var(--calendly-radius);
    overflow: hidden;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--calendly-light-gray);
}

.day-name {
    padding: 12px 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--calendly-gray);
    text-transform: uppercase;
}

.calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--calendly-border);
    border-top: none;
    border-left: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    position: relative;
}

.calendar-day:nth-child(7n) {
    border-right: none;
}

.calendar-day.empty {
    background: var(--calendly-light-gray);
    cursor: default;
}

.calendar-day.disabled {
    background: var(--calendly-light-gray);
    color: var(--calendly-gray);
    cursor: not-allowed;
}

.calendar-day.available:hover {
    background: var(--calendly-light-blue);
    color: var(--calendly-blue);
}

.calendar-day.selected {
    background: var(--calendly-blue);
    color: var(--calendly-white);
    font-weight: 600;
}

.calendar-day.checking-availability {
    opacity: 0.7;
    position: relative;
}

.calendar-day.checking-availability::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border: 2px solid var(--calendly-border);
    border-top-color: var(--calendly-blue);
    border-radius: 50%;
    animation: calendrone-spin 1s linear infinite;
}

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

/* Time Slots */
.calendrone-timeslots-section h5 {
    margin: 0 0 20px 0;
    font-size: 16px;
    color: var(--calendly-text);
}

.calendrone-timeslots-container {
    display: grid;
    gap: 10px;
}

.time-slot {
    padding: 12px 16px;
    border: 1px solid var(--calendly-border);
    border-radius: var(--calendly-radius);
    background: var(--calendly-white);
    color: var(--calendly-text);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
}

.time-slot:hover {
    background: var(--calendly-light-blue);
    border-color: var(--calendly-blue);
    color: var(--calendly-blue);
}

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

.select-date-first,
.no-slots {
    text-align: center;
    color: var(--calendly-gray);
    font-style: italic;
    padding: 20px;
}

/* Contact Form */
.calendrone-appointment-summary {
    background: var(--calendly-light-blue);
    border-radius: var(--calendly-radius);
    padding: 20px;
    margin-bottom: 30px;
}

.calendrone-appointment-summary h4 {
    margin: 0 0 15px 0;
    color: var(--calendly-text);
    font-size: 16px;
}

.summary-content {
    display: grid;
    gap: 15px;
}

.summary-item {
    font-size: 14px;
    line-height: 1.5;
}

.summary-item strong {
    color: var(--calendly-text);
}

.summary-item small {
    color: var(--calendly-gray);
}

.calendrone-form-fields {
    display: grid;
    gap: 20px;
}

.calendrone-form-group {
    display: grid;
    gap: 8px;
}

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

.calendrone-form-group input,
.calendrone-form-group textarea {
    padding: 12px 16px;
    border: 1px solid var(--calendly-border);
    border-radius: var(--calendly-radius);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.calendrone-form-group input:focus,
.calendrone-form-group textarea:focus {
    outline: none;
    border-color: var(--calendly-blue);
    box-shadow: 0 0 0 3px rgba(0, 107, 255, 0.1);
}

.calendrone-form-group input.error,
.calendrone-form-group textarea.error {
    border-color: var(--calendly-danger);
}

.calendrone-form-actions {
    margin-top: 30px;
    text-align: center;
}

/* Confirmation */
.calendrone-confirmation-content {
    text-align: center;
    padding: 20px;
}

.calendrone-success-icon {
    width: 80px;
    height: 80px;
    background: var(--calendly-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
}

.calendrone-success-icon .dashicons {
    color: var(--calendly-white);
    font-size: 40px;
    width: 40px;
    height: 40px;
}

.calendrone-confirmation-content h3 {
    color: var(--calendly-text);
    font-size: 24px;
    margin: 0 0 15px 0;
}

.calendrone-confirmation-content p {
    color: var(--calendly-gray);
    font-size: 16px;
    margin: 0 0 30px 0;
}

.calendrone-booking-details {
    background: var(--calendly-light-gray);
    border-radius: var(--calendly-radius);
    padding: 20px;
    margin: 30px 0;
    text-align: left;
}

.booking-confirmation h4 {
    margin: 0 0 20px 0;
    color: var(--calendly-text);
    font-size: 16px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--calendly-border);
    font-size: 14px;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item strong {
    color: var(--calendly-text);
}

/* Loading */
.calendrone-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--calendly-border);
    border-top: 4px solid var(--calendly-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.calendrone-loading p {
    color: var(--calendly-gray);
    font-size: 14px;
    margin: 0;
}

/* Messages */
.calendrone-message {
    padding: 12px 16px;
    border-radius: var(--calendly-radius);
    margin-bottom: 20px;
    font-size: 14px;
}

.calendrone-message-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.calendrone-message-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

/* Services Showcase */
.calendrone-services-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.calendrone-service-card {
    background: var(--calendly-white);
    border: 1px solid var(--calendly-border);
    border-radius: var(--calendly-radius);
    padding: 20px;
    box-shadow: var(--calendly-shadow);
    transition: transform 0.2s ease;
}

.calendrone-service-card:hover {
    transform: translateY(-2px);
}

.calendrone-service-card .service-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-left: 15px;
}

.calendrone-service-card .service-header h3 {
    margin: 0;
    font-size: 20px;
    color: var(--calendly-text);
}

.calendrone-service-card .service-meta {
    display: flex;
    gap: 10px;
    flex-direction: column;
    align-items: flex-end;
}

.calendrone-service-card .service-meta .duration,
.calendrone-service-card .service-meta .price {
    background: var(--calendly-light-blue);
    color: var(--calendly-blue);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.calendrone-service-card .service-description {
    color: var(--calendly-gray);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.calendrone-service-card .service-actions {
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calendrone-step {
        padding: 20px;
        min-height: 400px;
    }
    
    .calendrone-services-grid {
        grid-template-columns: 1fr;
    }
    
    .calendrone-service-option .service-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .calendrone-service-option .service-footer {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .day-name {
        padding: 8px 4px;
        font-size: 10px;
    }
    
    .calendar-day {
        font-size: 12px;
    }
    
    .calendrone-services-showcase {
        grid-template-columns: 1fr;
    }
}

/* Error states */
.calendrone-error {
    text-align: center;
    padding: 40px 20px;
    color: var(--calendly-gray);
    font-style: italic;
}

.calendrone-no-services {
    text-align: center;
    padding: 40px 20px;
    color: var(--calendly-gray);
    font-style: italic;
}