/* ============================================
   CALLRAIL FORM - ULTRA PREMIUM DESIGN
   HVAC247PRO Custom Styling
   ============================================ */

/* Form Container - only style when form is loaded */
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4:has(form),
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4:has(.form-group),
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4:has(input) {
    background: linear-gradient(145deg, #0a2540 0%, #1a3a5c 50%, #0d3251 100%);
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    margin: 0 auto;
}

/* Fallback for older browsers */
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 {
    position: relative;
    margin: 0 auto;
}

/* Contact page - ensure form fills its grid column */
.contact-form-section .contact-form-container {
    width: 100%;
    height: 100%;
}

.contact-form-section #cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 {
    height: 100%;
    min-height: 600px;
}

/* Glassmorphism overlay effect */
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(78, 205, 196, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

/* Animated glow orb */
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -30%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, transparent 70%);
    animation: formGlow 8s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes formGlow {
    0% { transform: translate(0, 0) scale(1); opacity: 0.5; }
    100% { transform: translate(20%, -20%) scale(1.2); opacity: 0.8; }
}

/* Form Header/Title */
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 .form-header,
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 h2,
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 h3 {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Labels */
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 .form-label,
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
    position: relative;
    z-index: 1;
}

/* Form Groups */
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 .form-group {
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

/* Input Fields */
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 .form-control,
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 input[type="text"],
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 input[type="email"],
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 input[type="tel"],
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 input[type="number"],
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 select,
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 textarea {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
}

#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 input::placeholder,
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Input Focus State */
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 .form-control:focus,
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 input:focus,
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 select:focus,
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 textarea:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: #4ecdc4;
    box-shadow:
        0 0 0 3px rgba(78, 205, 196, 0.2),
        0 0 20px rgba(78, 205, 196, 0.15);
}

/* Select Dropdown */
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 20px;
    padding-right: 45px;
    cursor: pointer;
}

#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 select option {
    background: #0a2540;
    color: #fff;
    padding: 10px;
}

/* Textarea */
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 textarea {
    min-height: 120px;
    resize: vertical;
}

/* Checkbox & Radio */
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 .form-check,
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 .form-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 input[type="checkbox"],
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: #4ecdc4;
    cursor: pointer;
}

#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 .form-check-label,
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 .form-radio-label {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    margin: 0;
}

/* Submit Button */
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 .btn,
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 button[type="submit"],
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 input[type="submit"] {
    width: 100%;
    padding: 18px 30px;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #0a2540;
    background: linear-gradient(135deg, #4ecdc4 0%, #44a8a0 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    z-index: 1;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 8px 25px rgba(78, 205, 196, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 .btn:hover,
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 button[type="submit"]:hover,
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 input[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow:
        0 15px 35px rgba(78, 205, 196, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #5dd9d1 0%, #4ecdc4 100%);
}

#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 .btn:active,
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 button[type="submit"]:active,
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 input[type="submit"]:active {
    transform: translateY(-1px);
}

/* Button shine effect */
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 .btn::before,
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 .btn:hover::before,
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 button[type="submit"]:hover::before {
    left: 100%;
}

/* Error Messages */
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 .error,
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 .error-message {
    color: #ff6b6b;
    font-size: 13px;
    margin-top: 5px;
    display: block;
}

#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 input.error,
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 .form-control.error {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
}

/* Success Message */
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 .success,
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 .success-message {
    color: #4ecdc4;
    font-size: 16px;
    text-align: center;
    padding: 20px;
    background: rgba(78, 205, 196, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(78, 205, 196, 0.3);
}

/* Footer Text */
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 .footer,
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 .form-footer {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    text-align: center;
    margin-top: 20px;
    float: none !important;
}

/* Row Layout for side-by-side fields */
#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 .row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 0 -7.5px;
}

#cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 .row > * {
    flex: 1;
    min-width: 200px;
    padding: 0 7.5px;
}

/* ============================================
   FORM WRAPPER SECTIONS
   ============================================ */

/* Standalone Form Section */
.callrail-form-section {
    padding: 80px 0;
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
}

.callrail-form-section .section-title {
    text-align: center;
    margin-bottom: 40px;
}

.callrail-form-section .section-title h2 {
    font-size: 36px;
    font-weight: 700;
    color: #0a2540;
    margin-bottom: 15px;
}

.callrail-form-section .section-title p {
    font-size: 18px;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

/* Sidebar Form Widget */
.callrail-sidebar-form {
    margin-bottom: 30px;
}

.callrail-sidebar-form #cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 {
    padding: 30px 25px;
    border-radius: 16px;
}

.callrail-sidebar-form #cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 input,
.callrail-sidebar-form #cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 textarea {
    padding: 14px 16px;
    font-size: 15px;
}

.callrail-sidebar-form #cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 .btn {
    padding: 14px 25px;
    font-size: 16px;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 991px) {
    #cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 {
        padding: 35px 25px;
        border-radius: 16px;
    }

    #cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 .form-header,
    #cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 h2,
    #cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 h3 {
        font-size: 22px;
    }

    #cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 input,
    #cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 textarea,
    #cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 select {
        font-size: 16px !important;
        padding: 14px 16px;
    }

    #cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 .btn,
    #cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 button[type="submit"] {
        font-size: 16px;
        padding: 16px 25px;
    }

    .callrail-form-section {
        padding: 60px 20px;
    }

    .callrail-form-section .section-title h2 {
        font-size: 28px;
    }
}

@media (max-width: 767px) {
    #cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 {
        padding: 30px 20px;
        margin: 0 15px;
    }

    #cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 .row {
        flex-direction: column;
    }

    #cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 .row > * {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    #cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 {
        padding: 25px 18px;
        border-radius: 14px;
    }

    #cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 .form-header,
    #cr-form-FOR019aa85423867c24b4ed2fdb6220eca4 h2 {
        font-size: 20px;
    }
}
