/**
 * Contact Page Styles
 * Fixes the broken loader and improves form styling
 */

/* ===== Fix the Loader ===== */
.loader {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 60px !important;
    height: 60px !important;
    border: 4px solid rgba(0, 0, 0, 0.1) !important;
    border-top-color: #af0000 !important;
    border-radius: 50% !important;
    animation: contact-spin 1s linear infinite !important;
    z-index: 99999 !important;
    display: none;
    background: transparent !important;
}

/* Loader backdrop */
.loader::before {
    content: '' !important;
    display: none !important;
}

/* Show loader with backdrop when active */
body.loading-form::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(3px);
    z-index: 99998;
}

@keyframes contact-spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ===== Contact Form Styling ===== */
#contact-form {
    font-family: 'Inter', 'Roboto', sans-serif;
}

#contact-form input[type="text"],
#contact-form input[type="email"],
#contact-form input[type="number"],
#contact-form input[type="tel"],
#contact-form textarea {
    background-color: transparent;
    width: 100%;
    margin: 0 0 20px;
    padding: 14px 16px;
    outline: 0;
    resize: none;
    font-family: inherit;
    font-weight: 400;
    font-size: 15px;
    color: #333;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

#contact-form input[type="text"]:focus,
#contact-form input[type="email"]:focus,
#contact-form input[type="number"]:focus,
#contact-form input[type="tel"]:focus,
#contact-form textarea:focus {
    border-color: #af0000;
    box-shadow: 0 0 0 3px rgba(175, 0, 0, 0.1);
}

#contact-form input.inputError,
#contact-form textarea.inputError {
    border-color: #c62828 !important;
    background-color: rgba(198, 40, 40, 0.05) !important;
}

/* Submit Button */
#contact-form .submit_button {
    display: block;
}

#contact-form input[type="submit"],
#contact-form .button {
    background: linear-gradient(135deg, #af0000 0%, #8b0000 100%);
    color: #fff;
    border: none;
    padding: 14px 40px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

#contact-form input[type="submit"]:hover,
#contact-form .button:hover {
    background: linear-gradient(135deg, #c41e1e 0%, #af0000 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(175, 0, 0, 0.3);
}

#contact-form input[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Error & Success Messages */
.contact-error {
    display: block;
    color: #c62828;
    font-size: 12px;
    font-weight: 500;
    margin-top: -15px;
    margin-bottom: 10px;
    padding-left: 5px;
}

.contact-success {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(76, 175, 80, 0.05) 100%);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-left: 4px solid #4CAF50;
    padding: 20px 25px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.contact-success strong {
    display: block;
    color: #2e7d32;
    font-size: 18px;
    margin-bottom: 8px;
}

.contact-success p {
    color: #33691e;
    margin: 0;
    font-size: 15px;
}

.contact-error-message {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Contact Info Section */
.contact_info {
    padding-left: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .contact_info {
        padding-left: 0;
        margin-top: 40px;
    }

    #contact-form .two_columns_50_50 .column1,
    #contact-form .two_columns_50_50 .column2 {
        width: 100%;
    }
}