diff --git a/assets/css/main.css b/assets/css/main.css index a635b56..c7f3d0b 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -2543,7 +2543,8 @@ a:focus-visible { transform: translateX(5px); } -.faq-question[aria-expanded="true"] { +.faq-question[aria-expanded="true"], +.faq-question.active { background: #179e83; color: white; } @@ -2554,19 +2555,27 @@ a:focus-visible { transition: transform 0.3s ease; } -.faq-question[aria-expanded="true"] .faq-icon { - transform: rotate(45deg); +.faq-question[aria-expanded="true"] .faq-icon, +.faq-question.active .faq-icon { + transform: rotate(180deg); } .faq-answer { - display: none; background: white; - padding: 20px; + padding: 0 20px; + max-height: 0; + overflow: hidden; + transition: max-height 0.3s ease, padding 0.3s ease; border-radius: 0 0 8px 8px; border-top: 1px solid #e1e5e9; margin-bottom: 20px; } +.faq-answer.active { + padding: 20px; + max-height: 1000px; +} + .faq-answer p { margin-bottom: 15px; color: #666; diff --git a/quote.php b/quote.php index c3a8e2b..42077dd 100644 --- a/quote.php +++ b/quote.php @@ -966,13 +966,15 @@ $breadcrumbs = [ showMessage('error', 'There was a problem with your submission:', errorMessages); } }) - .catch(error => { - console.error('Error:', error); - showMessage('error', 'Connection Error', 'There was an error sending your quote request. Please check your internet connection and try again, or contact us directly at info@ukdataservices.co.uk'); - }) - .finally(() => { - submitButton.textContent = originalText; - submitButton.disabled = false; + .catch(error => { + console.error('Error:', error); + showMessage('error', 'Connection Error', 'There was an error sending your quote request. Please check your internet connection and try again, or contact us directly at info@ukdataservices.co.uk'); + }) + .finally(() => { + submitButton.textContent = originalText; + submitButton.disabled = false; + }); + }); }); }); });