/**
 * Jurassic Parties Quote Modal Styles
 * Styling for the Get Quote modal
 */

/* Modal Overlay & Container */
.jpp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jpp-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    cursor: pointer;
}

.jpp-modal-container {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 550px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1000000;
    animation: jppModalSlideIn 0.3s ease-out;
}

.jpp-modal-container.jpp-modal-large {
    max-width: 800px;
}

@keyframes jppModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Header */
.jpp-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    border-bottom: 1px solid #e5e7eb;
}

.jpp-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.jpp-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.jpp-modal-close:hover {
    background: #f3f4f6;
    color: #111827;
}

/* Modal Body */
.jpp-modal-body {
    padding: 28px;
}

/* Form Styles */
.jpp-quote-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.jpp-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.jpp-form-row {
    display: flex;
    gap: 16px;
}

.jpp-form-group-half {
    flex: 1;
    min-width: 0;
}

.jpp-form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.jpp-required {
    color: #ef4444;
}

.jpp-form-group input,
.jpp-form-group select {
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.jpp-form-group input:focus,
.jpp-form-group select:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.jpp-form-group input::placeholder {
    color: #9ca3af;
}

/* Select2 Custom Styling to Match Input Design */
.jpp-quote-form .select2-container {
    width: 100% !important;
    z-index: 100;
}

.jpp-quote-form .select2-container .select2-selection--single {
    height: auto;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-family: inherit;
    background: white;
}

.jpp-quote-form .select2-container .select2-selection--single .select2-selection__rendered {
    padding: 0;
    line-height: normal;
    color: #111827;
}

.jpp-quote-form .select2-container .select2-selection--single .select2-selection__placeholder {
    color: #9ca3af;
}

.jpp-quote-form .select2-container .select2-selection--single .select2-selection__arrow {
    height: 100%;
    right: 12px;
}

.jpp-quote-form .select2-container--open .select2-selection--single {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.jpp-quote-form .select2-container--focus .select2-selection--single {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

/* Select2 Dropdown - High z-index to appear above modal */
.select2-container--default .select2-dropdown {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000002 !important;
}

.select2-dropdown {
    z-index: 1000002 !important;
}

.select2-container--open {
    z-index: 10000000 !important;
}

.select2-container--default .select2-results__option {
    padding: 12px 16px;
    font-size: 16px;
    font-family: inherit;
    color: #111827;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #16a34a;
    color: white;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #f3f4f6;
    color: #111827;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: inherit;
    margin: 8px;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    outline: none;
    border-color: #16a34a;
}

/* Clear button styling */
.select2-container--default .select2-selection--single .select2-selection__clear {
    margin-right: 20px;
    font-size: 18px;
    color: #6b7280;
    cursor: pointer;
}

.select2-container--default .select2-selection--single .select2-selection__clear:hover {
    color: #111827;
}

/* Form Actions */
.jpp-form-actions {
    margin-top: 8px;
}

.jpp-btn {
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    width: 100%;
}

.jpp-btn-primary {
    background: #16a34a;
    color: #ffffff;
}

.jpp-btn-primary:hover {
    background: #15803d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.jpp-btn-primary:active {
    transform: translateY(0);
}

/* Loading State */
.jpp-loading {
    text-align: center;
    padding: 40px 20px;
}

.jpp-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 20px;
    border: 4px solid #e5e7eb;
    border-top-color: #16a34a;
    border-radius: 50%;
    animation: jppSpin 0.8s linear infinite;
}

@keyframes jppSpin {
    to {
        transform: rotate(360deg);
    }
}

.jpp-loading p {
    margin: 0;
    font-size: 16px;
    color: #6b7280;
    font-weight: 500;
}

/* Quote Result */
.jpp-quote-result {
    text-align: center;
}

.jpp-result-icon {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.jpp-result-message {
    font-size: 18px;
    line-height: 1.6;
    color: #111827;
}

.jpp-result-message strong {
    color: #16a34a;
    font-weight: 700;
}

.jpp-booking-link {
    color: #2563eb;
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.2s ease;
}

.jpp-booking-link:hover {
    color: #1d4ed8;
}

/* Result Actions */
.jpp-result-actions {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.jpp-modify-quote-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 8px 16px;
    border-radius: 6px;
    background: #f3f4f6;
}

.jpp-modify-quote-link:hover {
    color: #111827;
    background: #e5e7eb;
}

.jpp-modify-quote-link svg {
    flex-shrink: 0;
}

.jpp-modify-quote-link-alt {
    background: transparent;
    border: 1px solid #d1d5db;
}

.jpp-modify-quote-link-alt:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

/* Error Message */
.jpp-error-message {
    padding: 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #b91c1c;
    margin-top: 16px;
}

.jpp-error-message strong {
    font-weight: 600;
}

/* No Service Result */
.jpp-no-service-result {
    text-align: center;
}

.jpp-no-service-icon {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.jpp-no-service-message {
    font-size: 17px;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 20px;
}

.jpp-no-service-actions {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.jpp-btn-contact {
    display: inline-block;
    padding: 14px 32px;
    background: #FBB03B;
    color: #ffffff !important;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none !important;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.jpp-btn-contact:hover {
    background: #96D1D2;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(150, 209, 210, 0.3);
}

.jpp-btn-contact:active {
    transform: translateY(0);
}

.jpp-btn-hover-blue:hover {
    background: #96D1D2;
    box-shadow: 0 4px 12px rgba(150, 209, 210, 0.3);
}

/* Responsive Design */
@media (max-width: 640px) {
    .jpp-modal-container {
        max-width: 95%;
        width: 95%;
        margin: 20px auto;
    }

    .jpp-modal-header {
        padding: 20px;
    }

    .jpp-modal-header h2 {
        font-size: 20px;
    }

    .jpp-modal-body {
        padding: 20px;
    }

    .jpp-form-group input,
    .jpp-form-group select {
        font-size: 14px;
    }

    .jpp-btn {
        font-size: 14px;
        padding: 12px 20px;
    }

    .jpp-result-message {
        font-size: 16px;
    }

    .jpp-form-row {
        flex-direction: column;
        gap: 20px;
    }

    .jpp-form-group-half {
        width: 100%;
    }
}

/* Accessibility */
.jpp-modal button:focus {
    outline: 2px solid #16a34a;
    outline-offset: 2px;
}

/* Print */
@media print {
    .jpp-modal {
        display: none !important;
    }
}
