/**
 * Konnect Contact Form - Frontend Styles
 * Version: 2.0.1
 * High specificity to override Elementor and theme styles
 */

/* ==========================================================================
   Container & Form Base
   ========================================================================== */

.konnect-contact-form {
    max-width: 600px !important;
    margin: 0 auto !important;
    padding: 20px !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
}

.konnect-contact-form #konncofo-form {
    background: #ffffff !important;
    padding: 30px !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* ==========================================================================
   Form Fields - Ultra High Specificity
   ========================================================================== */

.konnect-contact-form #konncofo-form .konncofo-field {
    margin-bottom: 20px !important;
    position: relative !important;
    display: block !important;
    width: 100% !important;
    float: none !important;
    clear: both !important;
}

.konnect-contact-form #konncofo-form .konncofo-field label {
    display: block !important;
    margin-bottom: 8px !important;
    font-weight: 600 !important;
    color: #333333 !important;
    font-size: 14px !important;
    width: 100% !important;
    text-align: left !important;
}

.konnect-contact-form #konncofo-form .konncofo-field input[type="text"],
.konnect-contact-form #konncofo-form .konncofo-field input[type="email"],
.konnect-contact-form #konncofo-form .konncofo-field input[type="tel"],
.konnect-contact-form #konncofo-form .konncofo-field textarea {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 15px !important;
    border: 1px solid #dddddd !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    background-color: #ffffff !important;
    color: #333333 !important;
    display: block !important;
    margin: 0 !important;
    outline: none !important;
    float: none !important;
    line-height: 1.5 !important;
}

.konnect-contact-form #konncofo-form .konncofo-field input[type="text"]:focus,
.konnect-contact-form #konncofo-form .konncofo-field input[type="email"]:focus,
.konnect-contact-form #konncofo-form .konncofo-field input[type="tel"]:focus,
.konnect-contact-form #konncofo-form .konncofo-field textarea:focus {
    outline: none !important;
    border-color: #3498db !important;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15) !important;
    background-color: #ffffff !important;
}

.konnect-contact-form #konncofo-form .konncofo-field textarea {
    resize: vertical !important;
    min-height: 120px !important;
    height: auto !important;
}

/* ==========================================================================
   Error States
   ========================================================================== */

.konnect-contact-form #konncofo-form .konncofo-field input.error-field,
.konnect-contact-form #konncofo-form .konncofo-field textarea.error-field {
    border-color: #e74c3c !important;
    background-color: #fff5f5 !important;
}

.konnect-contact-form #konncofo-form .konncofo-field input.error-field:focus,
.konnect-contact-form #konncofo-form .konncofo-field textarea.error-field:focus {
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15) !important;
}

.konnect-contact-form #konncofo-form .field-error-message {
    display: block !important;
    color: #e74c3c !important;
    font-size: 12px !important;
    margin-top: 5px !important;
    font-weight: 500 !important;
}

/* ==========================================================================
   Submit Button
   ========================================================================== */

.konnect-contact-form #konncofo-form button[type="submit"] {
    background: #3498db !important;
    color: #ffffff !important;
    padding: 12px 30px !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    width: auto !important;
    min-width: 150px !important;
    display: inline-block !important;
    margin-top: 5px !important;
    box-sizing: border-box !important;
    text-align: center !important;
}

.konnect-contact-form #konncofo-form button[type="submit"]:hover {
    background: #2980b9 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3) !important;
    color: #ffffff !important;
}

.konnect-contact-form #konncofo-form button[type="submit"]:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2) !important;
}

.konnect-contact-form #konncofo-form button[type="submit"]:disabled {
    background: #95a5a6 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

/* ==========================================================================
   Response Messages
   ========================================================================== */

.konnect-contact-form #konncofo-form .konncofo-response {
    margin-top: 20px !important;
    padding: 15px 15px 15px 45px !important;
    border-radius: 4px !important;
    display: none !important;
    position: relative !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

.konnect-contact-form #konncofo-form .konncofo-response.success {
    background: #d4edda !important;
    color: #155724 !important;
    border: 1px solid #c3e6cb !important;
    display: block !important;
}

.konnect-contact-form #konncofo-form .konncofo-response.error {
    background: #f8d7da !important;
    color: #721c24 !important;
    border: 1px solid #f5c6cb !important;
    display: block !important;
}

/* ==========================================================================
   Loading States
   ========================================================================== */

.konncofo-loading {
    position: relative !important;
    pointer-events: none !important;
    opacity: 0.6 !important;
}

.konncofo-loading::after {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 20px !important;
    height: 20px !important;
    margin: -10px 0 0 -10px !important;
    border: 3px solid #f3f3f3 !important;
    border-top: 3px solid #3498db !important;
    border-radius: 50% !important;
    animation: konncofo-spin 1s linear infinite !important;
}

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

/* ==========================================================================
   Elementor Widget Wrapper
   ========================================================================== */

.konnect-elementor-widget-wrapper {
    width: 100% !important;
}

.konnect-elementor-widget-wrapper .konnect-form-title {
    margin-bottom: 25px !important;
    color: #333333 !important;
    font-weight: 700 !important;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .konnect-contact-form {
        padding: 15px !important;
    }

    .konnect-contact-form #konncofo-form {
        padding: 20px !important;
    }

    .konnect-contact-form #konncofo-form .konncofo-field input[type="text"],
    .konnect-contact-form #konncofo-form .konncofo-field input[type="email"],
    .konnect-contact-form #konncofo-form .konncofo-field input[type="tel"],
    .konnect-contact-form #konncofo-form .konncofo-field textarea {
        font-size: 16px !important;
    }

    .konnect-contact-form #konncofo-form button[type="submit"] {
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    .konnect-contact-form {
        padding: 10px !important;
    }

    .konnect-contact-form #konncofo-form {
        padding: 15px !important;
    }

    .konnect-contact-form #konncofo-form .konncofo-field {
        margin-bottom: 15px !important;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.konnect-contact-form #konncofo-form .konncofo-field input:focus-visible,
.konnect-contact-form #konncofo-form .konncofo-field textarea:focus-visible {
    outline: 2px solid #3498db !important;
    outline-offset: 2px !important;
}

.konnect-contact-form #konncofo-form button[type="submit"]:focus-visible {
    outline: 2px solid #2980b9 !important;
    outline-offset: 2px !important;
}

/* ==========================================================================
   Dark Mode
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .konnect-contact-form #konncofo-form {
        background: #2c3e50 !important;
        color: #ecf0f1 !important;
    }

    .konnect-contact-form #konncofo-form .konncofo-field label {
        color: #ecf0f1 !important;
    }

    .konnect-contact-form #konncofo-form .konncofo-field input[type="text"],
    .konnect-contact-form #konncofo-form .konncofo-field input[type="email"],
    .konnect-contact-form #konncofo-form .konncofo-field input[type="tel"],
    .konnect-contact-form #konncofo-form .konncofo-field textarea {
        background: #34495e !important;
        border-color: #4a5f7f !important;
        color: #ecf0f1 !important;
    }
}

/* ==========================================================================
   Fade Animation
   ========================================================================== */

@keyframes konncofo-fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.konnect-contact-form #konncofo-form .konncofo-response {
    animation: konncofo-fade-in 0.3s ease-out !important;
}