/* Contact Forms Styling */

.forms-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.forms-overlay.active {
    display: flex;
    opacity: 1;
}

.form-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    max-height: 95vh;
    overflow-y: auto;
    transform: translateY(30px);
    transition: all 0.3s ease;
    display: none;
}

.form-modal.active {
    display: block;
    transform: translateY(0);
}

.form-content {
    padding: 2rem;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.form-header h2 {
    color: var(--black);
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-header p {
    color: var(--dark-grey);
    font-size: 1rem;
    margin: 0;
}

.close-btn {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    background: var(--light-grey);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--dark-grey);
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: var(--medium-grey);
    color: var(--black);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow: visible;
    min-height: auto;
}

.form-group label {
    font-weight: 500;
    color: var(--black);
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--medium-grey);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.1);
}

.form-group input:invalid {
    border-color: var(--error);
}

.contact-form .btn {
    margin-top: 0.5rem;
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
}

/* Ripple effect on click */
.contact-form .btn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.contact-form .btn:active::after {
    width: 300px;
    height: 300px;
}

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-loading i {
    width: 20px;
    height: 20px;
}

/* Enhanced button states */
.contact-form .btn[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
    background: var(--primary-blue) !important;
}

.contact-form .btn:not([disabled]):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(47, 107, 255, 0.3);
}

.contact-form .btn:active:not([disabled]) {
    transform: scale(0.98);
}

.spin {
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Shake animation for validation errors */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

/* Form submission states */
.contact-form.submitting .btn {
    pointer-events: none;
}

.contact-form.submitting input,
.contact-form.submitting select {
    opacity: 0.6;
    pointer-events: none;
}

.form-note {
    text-align: center;
    font-size: 0.875rem;
    color: var(--dark-grey);
    margin: 1rem 0 0;
}

/* Success Modal */
.success-content {
    text-align: center;
    padding: 3rem 2rem;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #22c55e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    animation: successPulse 0.6s ease-out;
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.3);
}

.success-icon i {
    width: 40px;
    height: 40px;
    color: white;
    stroke-width: 3;
}

.success-content h2 {
    color: var(--black);
    margin-bottom: 1rem;
    font-size: 1.75rem;
    font-weight: 600;
    animation: successSlideUp 0.8s ease-out 0.2s both;
}

.success-content p {
    color: var(--dark-grey);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.6;
    animation: successSlideUp 0.8s ease-out 0.4s both;
}

.success-content .btn {
    animation: successSlideUp 0.8s ease-out 0.6s both;
    padding: 12px 32px;
    font-size: 1rem;
}

/* Success animations */
@keyframes successPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

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

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

/* Checkbox styling */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    cursor: pointer;
    color: var(--dark-grey);
    word-wrap: break-word;
    white-space: normal;
    min-height: auto;
    overflow: visible;
}

.checkbox-label > span:not(.checkmark) {
    flex: 1;
    word-break: break-word;
    hyphens: auto;
}

/* Other use case input styling */
#other-use-case-group {
    margin-top: 0.75rem;
}

#other-use-case-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--black);
    font-size: 0.9rem;
}

#other-use-case-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--medium-grey);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: white;
    box-sizing: border-box;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    min-width: 18px;
    height: 18px;
    border: 2px solid var(--medium-grey);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-top: 1px;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Invalid checkbox styling */
.checkbox-label input[type="checkbox"]:invalid + .checkmark,
.checkbox-label input[type="checkbox"].error + .checkmark {
    border-color: #ef4444;
    animation: shake 0.5s;
}

/* Focus state for checkboxes */
.checkbox-label input[type="checkbox"]:focus + .checkmark {
    box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.1);
}

.checkbox-label a {
    color: var(--primary-blue);
    text-decoration: underline;
}

.checkbox-label a:hover {
    text-decoration: none;
}

/* Privacy link styling */
.privacy-link {
    font-size: 0.875rem;
    color: var(--dark-grey);
    margin: 0.5rem 0 0 0;
    text-align: center;
}

.privacy-link a {
    color: var(--primary-blue);
    text-decoration: underline;
}

.privacy-link a:hover {
    text-decoration: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .form-content {
        padding: 1.5rem;
    }
    
    .form-header h2 {
        font-size: 1.5rem;
    }
    
    .form-modal {
        max-height: 98vh;
        margin: 0.5rem;
        width: calc(100% - 1rem);
    }
    
    .checkbox-label {
        font-size: 0.8rem;
        gap: 0.5rem;
    }
    
    .checkmark {
        min-width: 16px;
        height: 16px;
    }
}