/* Request Modal Styles - Professional and Airy Design */

/* Modal Overlay */
.request-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.request-modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* Modal Container */
.request-modal {
    background: #ffffff;
    border-radius: 24px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    position: relative;
}

.request-modal-overlay.active .request-modal {
    transform: scale(1);
}

/* Modal Header */
.request-modal-header {
    padding: 32px 32px 0;
    border-bottom: none;
    position: relative;
}

.request-modal-title {
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.3;
    padding-right: 40px;
}

.request-modal-subtitle {
    font-size: 16px;
    color: #6b7280;
    margin-top: 8px;
}

/* Close Button */
.request-modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.request-modal-close:hover {
    background: #e5e7eb;
    transform: rotate(90deg);
}

.request-modal-close svg {
    width: 20px;
    height: 20px;
    stroke: #6b7280;
    stroke-width: 2;
}

/* Modal Body */
.request-modal-body {
    padding: 32px;
    overflow-y: auto;
    max-height: calc(90vh - 200px);
}

/* Custom Orange Scrollbar */
.request-modal-body::-webkit-scrollbar {
    width: 8px;
}

.request-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.request-modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #f43a09 0%, #ff6b35 100%);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.request-modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #e6330a 0%, #ff5722 100%);
}

.request-modal-body::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg, #d32f08 0%, #e64a19 100%);
}

/* Firefox */
.request-modal-body {
    scrollbar-width: thin;
    scrollbar-color: #f43a09 #f1f1f1;
}

/* Form Styles */
.request-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    animation: fadeInUp 0.4s ease forwards;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.15s; }
.form-group:nth-child(3) { animation-delay: 0.2s; }
.form-group:nth-child(4) { animation-delay: 0.25s; }
.form-group:nth-child(5) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 4px;
}

.form-label .required {
    color: #ef4444;
    font-size: 16px;
}

.form-input,
.form-select,
.form-textarea {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s ease;
    background: #ffffff;
    width: 100%;
    box-sizing: border-box;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color, #f43a09);
    box-shadow: 0 0 0 4px rgba(244, 58, 9, 0.1);
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
    border-color: #d1d5db;
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

/* Form Row for 2 columns */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Date and Time Inputs */
.form-input[type="date"],
.form-input[type="time"] {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 40px;
}

/* Checkbox and Radio */
.form-checkbox-group,
.form-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 8px;
}

.form-checkbox-item,
.form-radio-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.form-checkbox,
.form-radio {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
}

.form-radio {
    border-radius: 50%;
}

.form-checkbox:checked,
.form-radio:checked {
    background: var(--primary-color, #f43a09);
    border-color: var(--primary-color, #f43a09);
}

/* File Upload */
.form-file-upload {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-file-upload:hover {
    border-color: var(--primary-color, #f43a09);
    background: rgba(244, 58, 9, 0.02);
}

.form-file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.form-file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #6b7280;
}

.form-file-icon {
    width: 40px;
    height: 40px;
    stroke: #9ca3af;
}

/* Submit Button */
.form-submit-wrapper {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.form-submit {
    flex: 1;
    padding: 14px 24px;
    background: var(--primary-color, #f43a09);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.form-submit:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(244, 58, 9, 0.3);
}

.form-submit:hover:before {
    width: 300px;
    height: 300px;
}

.form-submit:active {
    transform: translateY(0);
}

.form-cancel {
    padding: 14px 24px;
    background: transparent;
    color: #6b7280;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-cancel:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

/* Loading State */
.form-submit.loading {
    pointer-events: none;
    color: transparent;
}

.form-submit.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Success Notification */
.request-success {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 32px;
    min-height: 400px;
}

.request-success.active {
    display: flex;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-icon svg {
    width: 40px;
    height: 40px;
    stroke: white;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    animation: checkmark 0.6s ease 0.3s forwards;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
}

@keyframes checkmark {
    to {
        stroke-dashoffset: 0;
    }
}

.success-title {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.success-message {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 32px;
    line-height: 1.5;
}

.success-button {
    padding: 14px 32px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.success-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

/* Error State */
.form-error {
    color: #ef4444;
    font-size: 13px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: #ef4444;
}

.form-input.error:focus,
.form-select.error:focus,
.form-textarea.error:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

/* Consent Section Styles */
.form-consent-section {
    margin-top: 24px;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-consent-section .form-checkbox-item {
    align-items: flex-start;
    gap: 12px;
}

.form-consent-section .form-checkbox {
    margin-top: 2px; /* Align with first line of text */
    flex-shrink: 0;
}

.form-consent-section .form-label {
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
    margin: 0;
}

.privacy-link {
    color: var(--primary-color, #f43a09);
    text-decoration: none;
    font-weight: 500;
}

.privacy-link:hover {
    text-decoration: underline;
}

.required {
    color: #ef4444;
    font-weight: 600;
    margin-left: 2px;
}

/* Dark Theme Support */
@media (prefers-color-scheme: dark) {
    .request-modal {
        background: #1f2937;
    }

    .request-modal-title {
        color: #f9fafb;
    }

    .request-modal-subtitle {
        color: #9ca3af;
    }

    .form-label {
        color: #d1d5db;
    }

    .form-input,
    .form-select,
    .form-textarea {
        background: #111827;
        border-color: #374151;
        color: #f9fafb;
    }

    .form-input:hover,
    .form-select:hover,
    .form-textarea:hover {
        border-color: #4b5563;
    }

    .form-file-upload {
        background: #111827;
        border-color: #374151;
    }

    .success-title {
        color: #f9fafb;
    }

    .success-message {
        color: #9ca3af;
    }

    .request-modal-close {
        background: #374151;
    }

    .request-modal-close:hover {
        background: #4b5563;
    }

    .request-modal-close svg {
        stroke: #9ca3af;
    }

    .form-consent-section {
        background: #111827;
        border-color: #374151;
    }

    .form-consent-section .form-label {
        color: #d1d5db;
    }

    .privacy-link {
        color: #fbbf24;
    }
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .request-modal {
        max-width: 100%;
        margin: 0 10px;
    }

    .request-modal-header {
        padding: 24px 24px 0;
    }

    .request-modal-body {
        padding: 24px;
    }

    .request-modal-title {
        font-size: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-submit-wrapper {
        flex-direction: column;
    }
}

/* Selected Service Details Styles */
.selected-service-details {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.selected-service-details::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f43a09 0%, #ffb766 100%);
}

.service-details-title {
    color: #1f2937;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
}

.service-details-title::before {
    content: '✓';
    display: inline-block;
    width: 24px;
    height: 24px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    line-height: 24px;
    margin-right: 12px;
}

.service-description {
    color: #374151;
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 16px 0;
    font-weight: 500;
}

.service-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.service-spec {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    color: #374151;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.service-spec strong {
    color: #1f2937;
}

/* Dark theme support for service details */
[data-theme="dark"] .selected-service-details {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-color: #475569;
}

[data-theme="dark"] .service-details-title {
    color: #f1f5f9;
}

[data-theme="dark"] .service-description {
    color: #cbd5e1;
}

[data-theme="dark"] .service-spec {
    background: #0f172a;
    border-color: #475569;
    color: #cbd5e1;
}

[data-theme="dark"] .service-spec strong {
    color: #f1f5f9;
}

/* Mobile responsive for service details */
@media (max-width: 640px) {
    .selected-service-details {
        padding: 16px;
        margin-bottom: 20px;
    }

    .service-details-title {
        font-size: 16px;
    }

    .service-description {
        font-size: 14px;
    }

    .service-specs {
        flex-direction: column;
        gap: 8px;
    }

    .service-spec {
        font-size: 13px;
        padding: 6px 10px;
    }
}