/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.submit-btn:hover {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(39, 174, 96, 0.4);
}

.submit-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Modal Styles */
.config-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 2px solid #ecf0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.modal-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
}

.close-modal {
    color: #7f8c8d;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #e74c3c;
}

.modal-body {
    padding: 25px;
}

.detailed-config-summary {
    margin-bottom: 25px;
}

.config-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.config-section h4 {
    margin: 0 0 12px 0;
    color: #2c3e50;
    font-size: 16px;
}

.summary-item {
    margin: 8px 0;
    color: #34495e;
    font-size: 14px;
    line-height: 1.4;
}

.technical-details {
    background: #fff5f5;
    border-left-color: #e74c3c;
}

.customer-details h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 16px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 5px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-row input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

#customerNotes {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    font-size: 14px;
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
    margin-bottom: 15px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 2px solid #ecf0f1;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    background: #f8f9fa;
}

.btn-cancel, .btn-submit {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel {
    background: #ecf0f1;
    color: #7f8c8d;
}

.btn-cancel:hover {
    background: #bdc3c7;
    color: #2c3e50;
}

.btn-submit {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.btn-submit:hover {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    transform: translateY(-1px);
}

.btn-submit:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.submission-status {
    padding: 15px 25px;
    margin-top: 15px;
}

.submission-status .success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 15px;
}

.submission-status .error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 15px;
}

.submission-status .loading {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    border-radius: 6px;
    padding: 15px;
}

/* Validation and Thank You Popups */
.validation-popup, .thank-you-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 11000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-content, .thank-you-content {
    background: white;
    padding: 25px;
    border-radius: 8px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.error-content h3, .thank-you-content h2 {
    margin: 0 0 15px 0;
    color: #2c3e50;
}

.error-content ul {
    text-align: left;
    color: #e74c3c;
    margin: 15px 0;
}

.error-content button, .thank-you-content button {
    padding: 8px 16px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10px auto;
    }
    
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .btn-cancel, .btn-submit {
        width: 100%;
    }
}

.modal-content.success-state .modal-header {
    background-color: #27ae60; /* A nice, confident green */
    color: white;
}


#submissionStatus {
    margin: 0 20px 15px 20px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
}

#submissionStatus .error {
    background-color: #fee;
    border-left: 4px solid #f44;
    color: #c33;
}

/* This is our new, unmissable success message container */
.success-takeover {
    text-align: center;
    animation: fadeIn 0.5s ease-in-out;
}

.success-takeover h2 {
    font-size: 24px;
    color: #2c3e50;
    margin: 10px 0;
}

.success-takeover .success-subtitle {
    font-size: 18px;
    font-weight: bold;
    color: #3498db;
}

.success-takeover p {
    font-size: 16px;
    color: #555;
    line-height: 1.6;
}

.success-takeover .success-details {
    margin-top: 20px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
    font-size: 14px;
    color: #7f8c8d;
}

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