/* Form validation and error message styling */
.error-message {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-control.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Form message container styling */
.form-message-container {
    display: none;
    text-align: center;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    transition: all 0.4s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.form-message-container.success {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(46, 125, 50, 0.1); /* Using primary color */
    border: 1px solid rgba(46, 125, 50, 0.2);
    color: #2E7D32; /* Primary color */
    animation: fadeIn 0.6s ease-out;
}

.form-message-container.error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
    color: #b91c1c;
    animation: fadeIn 0.6s ease-out;
}

/* Message icon */
.form-message-container::before {
    content: '';
    display: block;
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.form-message-container.success::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' fill='%232E7D32' viewBox='0 0 16 16'%3E%3Cpath d='M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z'/%3E%3C/svg%3E");
}

.form-message-container.error::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' fill='%23b91c1c' viewBox='0 0 16 16'%3E%3Cpath d='M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z'/%3E%3C/svg%3E");
}

/* Center align the message text */
.message-text {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Send Another Message button */
.send-another-btn {
    display: inline-block;
    margin: 0 auto;
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    background-color: #2E7D32; /* Primary color */
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.2); /* Primary color shadow */
}

.send-another-btn:hover {
    background-color: #1B5E20; /* Primary dark color */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3); /* Primary color shadow */
}

.send-another-btn:active {
    transform: translateY(0);
}

.send-another-btn i {
    margin-right: 0.5rem;
}

/* Hide form when success message is shown */
.contact-form-wrapper.hidden {
    display: none;
}

/* Submit button styles and states */
#submitBtn {
    transition: all 0.3s ease;
    position: relative;
    background-color: #2E7D32; /* Primary color */
    border-color: #2E7D32; /* Primary color */
    color: white;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
}

#submitBtn:hover {
    background-color: #1B5E20; /* Primary dark color */
    border-color: #1B5E20; /* Primary dark color */
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.2); /* Primary color shadow */
}

#submitBtn.sending {
    background-color: #673AB7; /* Secondary color */
    border-color: #673AB7; /* Secondary color */
    color: #fff;
    pointer-events: none;
}

#submitBtn.completed {
    background-color: #2E7D32; /* Primary color */
    border-color: #2E7D32; /* Primary color */
    color: #fff;
}

#submitBtn.error {
    background-color: #b91c1c;
    border-color: #991b1b;
    color: #fff;
}

/* reCAPTCHA modal styling */
#recaptchaModal .modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

#recaptchaModal .modal-body {
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

#verifyAndSubmit {
    background-color: #2E7D32; /* Primary color */
    border-color: #2E7D32; /* Primary color */
    padding: 0.5rem 1.25rem;
    font-weight: 500;
}

#verifyAndSubmit:hover {
    background-color: #1B5E20; /* Primary dark color */
    border-color: #1B5E20; /* Primary dark color */
}

/* Form animation keyframes */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.form-control.is-invalid {
    animation: shake 0.5s;
}