/**
 * Modal Form Styles
 */

.bespoke-form-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.bespoke-form-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.bespoke-form-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.bespoke-form-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.bespoke-form-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    border-bottom: 1px solid #e0e0e0;
}

.bespoke-form-modal-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: #1d2327;
    margin: 0;
}

.bespoke-form-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #646970;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.bespoke-form-modal-close:hover {
    background: #f0f0f0;
    color: #1d2327;
}

.bespoke-form-modal-body {
    padding: 30px;
}

.bespoke-form-modal .bespoke-form-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.bespoke-form-modal .bespoke-form-fields {
    gap: 16px;
}

.bespoke-form-modal .bespoke-form-field label {
    font-size: 14px;
    margin-bottom: 6px;
}

.bespoke-form-modal .bespoke-form-field input,
.bespoke-form-modal .bespoke-form-field select,
.bespoke-form-modal .bespoke-form-field textarea {
    padding: 10px 14px;
    font-size: 14px;
}

.bespoke-form-modal .bespoke-form-submit {
    padding: 14px 28px;
    font-size: 15px;
}

/* Mobile */
@media (max-width: 768px) {
    .bespoke-form-modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .bespoke-form-modal-header {
        padding: 20px;
    }
    
    .bespoke-form-modal-title {
        font-size: 20px;
    }
    
    .bespoke-form-modal-body {
        padding: 20px;
    }
    
    .bespoke-form-modal .bespoke-form-fields {
        grid-template-columns: 1fr;
    }
}

/* Scrollbar */
.bespoke-form-modal::-webkit-scrollbar {
    width: 8px;
}

.bespoke-form-modal::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 16px 16px 0;
}

.bespoke-form-modal::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.bespoke-form-modal::-webkit-scrollbar-thumb:hover {
    background: #555;
}
