/**
 * Contact Form Section Styles
 *
 * @package foukagroup.com
 */

/* ==========================================================================
   Section Container
   ========================================================================== */
.contact-form-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #e8f4fc 0%, #f0f7ff 100%);
}

.contact-form-section .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.contact-form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

@media (max-width: 767px) {
    .contact-form-section {
        padding: 3rem 0;
    }
    
    .contact-form-wrapper {
        padding: 1.5rem;
        border-radius: 1rem;
    }
}

/* ==========================================================================
   Icon
   ========================================================================== */
.contact-form__icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background: var(--color-primary-light, #e8f4fc);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-form__icon svg {
    width: 36px;
    height: 36px;
    color: var(--color-primary, #1a7bbf);
}

/* ==========================================================================
   Header
   ========================================================================== */
.contact-form__header {
    text-align: center;
    margin-bottom: 2rem;
}

.contact-form__subtitle {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--color-primary-light, #e8f4fc);
    color: var(--color-primary, #1a7bbf);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 2rem;
    margin-bottom: 0.75rem;
}

.contact-form__title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text, #1a1a2e);
    margin: 0;
    line-height: 1.3;
}

@media (max-width: 767px) {
    .contact-form__title {
        font-size: 1.5rem;
    }
}

/* ==========================================================================
   Form Base
   ========================================================================== */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row--half .form-group {
    flex: 1;
}

.form-row--phone {
    display: flex;
    gap: 1rem;
}

.form-group--code {
    flex: 0 0 110px;
}

.form-group--phone {
    flex: 1;
}

@media (max-width: 480px) {
    .form-row--half {
        flex-direction: column;
    }
}

/* ==========================================================================
   Form Groups
   ========================================================================== */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-text, #1a1a2e);
}

/* ==========================================================================
   Inputs & Selects
   ========================================================================== */
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form select {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--color-text, #1a1a2e);
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.contact-form input::placeholder {
    color: #94a3b8;
}

.contact-form input:focus,
.contact-form select:focus {
    outline: none;
    border-color: var(--color-primary, #1a7bbf);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26, 123, 191, 0.1);
}

/* Select Arrow */
.contact-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 1rem center;
    background-size: 18px;
    padding-left: 2.75rem;
}

[dir="rtl"] .contact-form select {
    background-position: right 1rem center;
    padding-left: 1.25rem;
    padding-right: 2.75rem;
}

/* ==========================================================================
   Checkboxes
   ========================================================================== */
.form-group--checkbox {
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    position: relative;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkmark {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-top: 2px;
}

.checkbox-label input:checked + .checkmark {
    background: var(--color-primary, #1a7bbf);
    border-color: var(--color-primary, #1a7bbf);
}

.checkbox-label input:checked + .checkmark::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.checkbox-label input:focus + .checkmark {
    box-shadow: 0 0 0 3px rgba(26, 123, 191, 0.1);
}

.checkbox-text {
    font-size: 0.9375rem;
    color: #64748b;
    line-height: 1.5;
}

.checkbox-text a {
    color: var(--color-primary, #1a7bbf);
    text-decoration: none;
    font-weight: 500;
}

.checkbox-text a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Submit Button
   ========================================================================== */
.form-group--submit {
    margin-top: 1rem;
}

.btn--submit {
    width: 100%;
    padding: 1.125rem 2rem;
    font-size: 1.125rem;
    font-weight: 700;
    font-family: inherit;
    color: #fff;
    background: var(--color-primary, #1a7bbf);
    border: none;
    border-radius: 3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    position: relative;
}

.btn--submit:hover {
    background: var(--color-primary-dark, #155d91);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 123, 191, 0.3);
}

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

.btn--submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Loader */
.btn__loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn--submit.is-loading .btn__text {
    opacity: 0.7;
}

.btn--submit.is-loading .btn__loader {
    display: block;
}

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

/* ==========================================================================
   Messages
   ========================================================================== */
.form-message {
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    text-align: center;
    margin-top: 0.5rem;
}

.form-message--success {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.form-message--error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* ==========================================================================
   RTL Support
   ========================================================================== */
[dir="rtl"] .contact-form {
    text-align: right;
}

[dir="rtl"] .checkbox-label {
    flex-direction: row;
}

/* ==========================================================================
   Validation States
   ========================================================================== */
.contact-form input:invalid:not(:placeholder-shown),
.contact-form select:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

.contact-form input:valid:not(:placeholder-shown) {
    border-color: #22c55e;
}
