/* Modal Overlay */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal.professional-booking-modal {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    position: relative;
}

.professional-modal-content {
    background: white;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalSlideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Progress Steps */
.booking-progress-container {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    padding: 20px 15px;
    border-radius: 20px 20px 0 0;
}

.booking-progress-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 600px;
    margin: 0 auto;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.progress-step.active,
.progress-step.completed {
    opacity: 1;
}

.step-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.progress-step.active .step-circle {
    background: white;
    color: var(--brand-primary);
    border-color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.4);
}

.progress-step.completed .step-circle {
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.6);
}

.step-label {
    font-size: 11px;
    color: white;
    font-weight: 600;
    text-align: center;
}

.progress-line {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 5px;
    align-self: center;
    margin-top: -30px;
}

.progress-step.active~.progress-line {
    background: rgba(255, 255, 255, 0.3);
}

.professional-close {
    position: absolute;
    top: 30px;
    right: 20px;
    font-size: 28px;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.professional-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Booking Steps */
.booking-step {
    padding: 30px 25px;
    animation: stepFadeIn 0.4s ease;
}

@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step-header {
    text-align: center;
    margin-bottom: 30px;
}

.step-header h2 {
    font-size: 22px;
    color: #1a1a1a;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.step-header h2 i {
    color: var(--brand-primary);
}

.step-header p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* Form Sections */
.form-section {
    margin-bottom: 25px;
}

.section-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-size: 15px;
}

.section-label .optional {
    color: #999;
    font-weight: 400;
    font-size: 13px;
}

/* Services Review List */
.services-review-list {
    margin-bottom: 20px;
}

.service-review-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 10px;
}

.service-review-info {
    flex: 1;
}

.service-review-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.service-review-qty {
    font-size: 13px;
    color: #666;
}

.service-review-price {
    font-weight: 700;
    color: var(--brand-primary);
    font-size: 16px;
}

.price-summary-box {
    background: #f0f9ff;
    border: 2px solid #e0f2fe;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #666;
    font-size: 14px;
}

.summary-row.total-row {
    padding-top: 10px;
    border-top: 2px solid #cbd5e1;
    margin-top: 5px;
    font-weight: 700;
    font-size: 16px;
    color: #333;
}

.total-price {
    color: var(--brand-primary);
    font-size: 20px;
}

/* Time Slots Grid */
.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.time-slot {
    padding: 12px 8px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: #475569;
}

.time-slot:hover {
    border-color: var(--brand-primary);
    background: #f8fafc;
}

.time-slot.selected {
    background: var(--brand-primary);
    color: white;
    border-color: var(--brand-primary);
}

.time-slot.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.selected-schedule-display {
    background: #fef3c7;
    border: 1px solid #fde047;
    padding: 12px 15px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.selected-schedule-display i {
    color: #ca8a04;
}

.selected-schedule-display span {
    color: #854d0e;
    font-weight: 500;
}

/* Address Input */
.address-input-group {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.address-input-group textarea {
    flex: 1;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
}

.map-select-btn {
    width: 45px;
    height: 45px;
    background: var(--brand-primary);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    transition: transform 0.2s;
}

.map-select-btn:hover {
    transform: scale(1.05);
}

.input-hint {
    display: block;
    color: #94a3b8;
    font-size: 12px;
    margin-top: 5px;
}

.char-counter {
    display: block;
    text-align: right;
    color: #94a3b8;
    font-size: 12px;
    margin-top: 5px;
}

/* Image Upload */
.image-upload-modern {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.image-upload-modern:hover {
    border-color: var(--brand-primary);
    background: #eff6ff;
}

.upload-placeholder i {
    font-size: 40px;
    color: var(--brand-primary);
    margin-bottom: 10px;
}

.upload-placeholder p {
    margin: 10px 0 5px 0;
    color: #475569;
    font-weight: 500;
}

.upload-placeholder small {
    color: #94a3b8;
}

.image-previews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220, 38, 38, 0.9);
    color: white;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Final Summary Card */
.final-summary-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.summary-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.summary-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.summary-section h3 {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.summary-value {
    color: #1e293b;
    font-size: 15px;
    line-height: 1.5;
}

.total-section h3 {
    font-size: 16px;
    color: #1e293b;
}

.final-total-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--brand-primary);
}

/* Terms Agreement */
.terms-agreement {
    margin-bottom: 20px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #475569;
}

.checkbox-container input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-container a {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 600;
}

/* Step Actions */
.step-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.btn-outline,
.btn-primary,
.btn-success {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-outline {
    background: white;
    border: 2px solid #e2e8f0;
    color: #475569;
}

.btn-outline:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.btn-primary {
    background: var(--brand-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

.btn-success:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .professional-modal-content {
        width: 100%;
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .booking-progress-container {
        border-radius: 0;
    }

    .step-label {
        font-size: 9px;
    }

    .step-circle {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .time-slots-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .image-previews-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}