/* Advanced Contact Form Frontend Styles - Updated for Large Screens */
.acf-contact-form-wrapper {
    max-width: 600px; /* Increased for larger screens */
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.acf-contact-form {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    border-top: 4px solid var(--brand-color, #FE4C17);
}

.acf-form-title {
    text-align: center;
    color: #333;
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 600;
}

.acf-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.acf-form-group {
    flex: 1;
    margin-bottom: 20px;
}

.acf-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.acf-form-group input,
.acf-form-group select,
.acf-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.acf-form-group input:focus,
.acf-form-group select:focus,
.acf-form-group textarea:focus {
    outline: none;
    border-color: var(--brand-color, #FE4C17);
    box-shadow: 0 0 0 3px rgba(254, 76, 23, 0.1);
}

.acf-form-group select:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

.acf-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.acf-submit-button {
    width: 100%;
    background: var(--brand-color, #FE4C17);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.acf-submit-button:hover {
    background: color-mix(in srgb, var(--brand-color, #FE4C17) 85%, black);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(254, 76, 23, 0.3);
}

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

.acf-submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.acf-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: acf-spin 1s ease-in-out infinite;
    margin-left: 10px;
}

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

.acf-form-message {
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    font-weight: 500;
}

.acf-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.acf-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Pin Code Field Styling */
#acf_pin_code {
    letter-spacing: 1px;
    font-weight: 500;
    text-align: center;
    max-width: 150px;
}

#acf_pin_code:focus {
    letter-spacing: 2px;
}

/* Form Validation Styles */
.acf-form-group input.error,
.acf-form-group select.error,
.acf-form-group textarea.error {
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.05);
}

.field-error {
    color: #d63384;
    font-size: 12px;
    display: block;
    margin-top: 4px;
}

/* Large Desktop Screens (2000px width and above) */
@media (min-width: 2000px) {
    .acf-contact-form-wrapper {
        max-width: 800px; /* Larger for very wide screens */
        padding: 30px;
    }

    .acf-contact-form {
        padding: 40px;
    }

    .acf-form-title {
        font-size: 28px;
        margin-bottom: 30px;
    }

    .acf-form-group label {
        font-size: 16px;
    }

    .acf-form-group input,
    .acf-form-group select,
    .acf-form-group textarea {
        font-size: 18px;
        padding: 15px 18px;
    }

    .acf-submit-button {
        font-size: 18px;
        padding: 18px 35px;
    }
}

/* Large Mobile Screens (1080px width) */
@media (min-width: 1080px) and (max-width: 1199px) {
    .acf-contact-form-wrapper {
        max-width: 700px;
        padding: 25px;
    }

    .acf-contact-form {
        padding: 35px;
    }

    .acf-form-title {
        font-size: 26px;
    }

    .acf-form-group input,
    .acf-form-group select,
    .acf-form-group textarea {
        font-size: 17px;
        padding: 14px 16px;
    }

    .acf-submit-button {
        font-size: 17px;
        padding: 16px 32px;
    }
}

/* Standard Desktop (768px to 1999px) */
@media (min-width: 768px) and (max-width: 1999px) {
    .acf-contact-form-wrapper {
        max-width: 600px;
        padding: 20px;
    }
}

/* Mobile Devices (below 768px) */
@media (max-width: 767px) {
    .acf-contact-form-wrapper {
        max-width: 100%;
        padding: 15px;
        margin: 0 10px;
    }

    .acf-contact-form {
        padding: 20px;
    }

    .acf-form-row {
        flex-direction: column;
        gap: 0;
    }

    .acf-form-title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .acf-form-group {
        margin-bottom: 15px;
    }

    .acf-form-group input,
    .acf-form-group select,
    .acf-form-group textarea {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 12px;
    }

    #acf_pin_code {
        max-width: 100%;
    }

    .acf-submit-button {
        font-size: 16px;
        padding: 14px 28px;
        min-height: 50px; /* Better touch target */
    }
}

/* Very small mobile */
@media (max-width: 480px) {
    .acf-contact-form-wrapper {
        margin: 0 5px;
        padding: 10px;
    }

    .acf-contact-form {
        padding: 15px;
    }

    .acf-form-title {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .acf-form-group {
        margin-bottom: 12px;
    }

    .acf-form-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }
}

/* Loading State */
.acf-contact-form.loading {
    position: relative;
    overflow: hidden;
}

.acf-contact-form.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}