/* Frontend Styles for CPA Contact Forms */

.cpa-cf-form-container {
    max-width: 1200px;
    margin: 20px auto;
}

.cpa-cf-form {
    background-color: #e9eef1;
    padding: 40px;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
}

.cpa-cf-form-header {
    margin-bottom: 30px;
}

.cpa-cf-form-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 400;
    color: #000000;
    margin: 0 0 15px 0;
    line-height: 1.2;
}

.cpa-cf-form-description {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #000000;
    margin: 0 0 10px 0;
}

.cpa-cf-form-instruction {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #000000;
    margin: 0;
}

.cpa-cf-form-body {
    margin-top: 25px;
}

.cpa-cf-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.cpa-cf-field {
    margin-bottom: 0;
}

.cpa-cf-field-full {
    flex: 1 1 100%;
}

.cpa-cf-field-half {
    flex: 1 1 calc(50% - 10px);
}

.cpa-cf-field input[type="text"],
.cpa-cf-field input[type="email"],
.cpa-cf-field input[type="tel"],
.cpa-cf-field textarea {
    width: 100%;
    padding: 15px 20px;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background-color: #ffffff;
    color: #000000;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.cpa-cf-field input[type="text"]::placeholder,
.cpa-cf-field input[type="email"]::placeholder,
.cpa-cf-field input[type="tel"]::placeholder,
.cpa-cf-field textarea::placeholder {
    color: #9ca3af;
    font-family: 'Outfit', sans-serif;
}

.cpa-cf-field input[type="text"]:focus,
.cpa-cf-field input[type="email"]:focus,
.cpa-cf-field input[type="tel"]:focus,
.cpa-cf-field textarea:focus {
    outline: none;
    border-color: #00a2d5;
    box-shadow: 0 0 0 3px rgba(0, 162, 213, 0.1);
}

.cpa-cf-field textarea {
    resize: vertical;
    min-height: 120px;
}

.cpa-cf-submit-btn {
    width: 100%;
    padding: 16px 32px;
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: #ffffff;
    background-color: #2b4c8f;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.cpa-cf-submit-btn:hover {
    background-color: #1e3668;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(43, 76, 143, 0.3);
}

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

.cpa-cf-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.cpa-cf-btn-loading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cpa-cf-spinner {
    animation: cpa-cf-spin 1s linear infinite;
    width: 20px;
    height: 20px;
}

.cpa-cf-spinner circle {
    stroke: #ffffff;
    stroke-linecap: round;
    animation: cpa-cf-dash 1.5s ease-in-out infinite;
}

@keyframes cpa-cf-spin {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes cpa-cf-dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

.cpa-cf-message {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

.cpa-cf-message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.cpa-cf-message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Cloudflare Turnstile */
.cf-turnstile {
    margin: 20px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cpa-cf-form {
        padding: 30px 20px;
    }

    .cpa-cf-field-half {
        flex: 1 1 100%;
    }

    .cpa-cf-form-title {
        font-size: 28px;
    }

    .cpa-cf-row {
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .cpa-cf-form {
        padding: 25px 15px;
    }

    .cpa-cf-form-title {
        font-size: 24px;
    }

    .cpa-cf-field input[type="text"],
    .cpa-cf-field input[type="email"],
    .cpa-cf-field input[type="tel"],
    .cpa-cf-field textarea {
        padding: 12px 15px;
        font-size: 15px;
    }

    .cpa-cf-submit-btn {
        padding: 14px 24px;
        font-size: 16px;
    }
}
