/**
 * Lead Tracking Main Styles
 * Clean, organized CSS for all form templates
 */

/* ======================
   BASE FORM STYLES
   ====================== */

.lt-form-wrapper {
    width: 100% !important;
    max-width: 400px !important;
    margin: 0 auto !important;
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(40px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(40px) saturate(180%) !important;
    border-radius: 24px !important;
    padding: 32px !important;
    box-sizing: border-box !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
}

.lt-form {
    background: transparent !important;
    backdrop-filter: none !important;
    border: none !important;
    padding: 0 !important;
    position: relative !important;
}

/* ======================
   FORM TITLES
   ====================== */

.lt-form-wrapper .lt-form-title {
    color: #1f2937 !important;
    font-size: 24px !important;
    font-weight: 600 !important;
    margin-bottom: 24px !important;
    text-align: center !important;
}

/* White title for hero forms on dark backgrounds */
.hero-standard .lt-form-wrapper .lt-form-title,
#desktop-form-focus .lt-form-wrapper .lt-form-title,
.hero-video-container .lt-form-wrapper .lt-form-title {
    color: #ffffff !important;
}

/* ======================
   FIX FIELD DUPLICATION - CRITICAL
   ====================== */

/* Form field container - NO STYLING except margin */
.lt-form-field {
    margin-bottom: 16px !important;
    /* CRITICAL: No background, border, or padding on the container */
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* Only style inputs that are DIRECT children of lt-form-field */
.lt-form-field > input[type="text"],
.lt-form-field > input[type="email"],
.lt-form-field > input[type="tel"],
.lt-form-field > textarea {
    width: 100% !important;
    padding: 16px 20px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 12px !important;
    color: #1f2937 !important;
    font-size: 16px !important;
    font-family: inherit !important;
    line-height: 1.5 !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    display: block !important;
    margin: 0 !important;
    outline: none !important;
}

/* Placeholder styles */
.lt-form-field > input::placeholder,
.lt-form-field > textarea::placeholder {
    color: rgba(0, 0, 0, 0.5) !important;
    opacity: 1 !important;
}

/* Focus states */
.lt-form-field > input:focus,
.lt-form-field > textarea:focus {
    outline: none !important;
    background: rgba(255, 255, 255, 0.98) !important;
    border: 1px solid rgba(245, 158, 11, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1) !important;
}

/* Textarea specific */
.lt-form-field > textarea {
    resize: vertical !important;
    min-height: 100px !important;
}

/* ======================
   SUBMIT BUTTON
   ====================== */

.lt-submit-button {
    width: 100% !important;
    padding: 14px 32px !important;
    background: linear-gradient(135deg, #FFEB3B 0%, #FFC107 35%, #FF9800 70%, #F57C00 100%) !important;
    border: 1px solid rgba(255, 193, 7, 0.3) !important;
    border-radius: 50px !important;
    color: #1A1A1A !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    margin-top: 8px !important;
    box-shadow: 0 10px 30px rgba(245, 124, 0, 0.3) !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.lt-submit-button:hover {
    background: linear-gradient(135deg, #FFF176 0%, #FFCA28 35%, #FFA726 70%, #FB8C00 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 15px 35px rgba(245, 124, 0, 0.4) !important;
}

/* ======================
   POPUP FORM STYLES
   ====================== */

/* Popup container - MUST be hidden by default */
#consultationPopup {
    display: none !important; /* Critical: hidden until triggered */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

#consultationPopup.active {
    display: flex !important; /* Only show when .active class is added */
}

/* Popup close button */
.mobile-form-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.mobile-form-close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.1);
}

.mobile-form-close svg {
    width: 20px;
    height: 20px;
    color: #6b7280;
}

.mobile-form-modal-content {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    position: relative;
    border-radius: 20px;
    padding: 10px;
}

#consultationPopup .lt-form-wrapper {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    padding: 30px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
}

#consultationPopup .lt-form-wrapper .lt-form-title {
    color: #1f2937 !important;
    font-size: 26px !important;
    font-weight: 700 !important;
}

/* ======================
   BASIC CONTACT FORM
   ====================== */

.lt-form-wrapper[data-template="basic_contact"] {
    background: rgba(255, 255, 255, 0.98) !important;
    border: none !important;
    border-radius: 16px !important;
    padding: 40px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08) !important;
    max-width: 600px !important;
}

.lt-form-wrapper[data-template="basic_contact"] .lt-form-title {
    font-size: 32px !important;
    color: #1f2937 !important;
    font-weight: 700 !important;
}

.lt-form-wrapper[data-template="basic_contact"] textarea {
    min-height: 120px !important;
    resize: vertical !important;
}

.lt-form-wrapper[data-template="basic_contact"] .lt-privacy label {
    color: #6b7280 !important;
    font-size: 14px !important;
    display: flex !important;
    align-items: flex-start !important;
}

.lt-form-wrapper[data-template="basic_contact"] .lt-privacy input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    margin-right: 10px !important;
    margin-top: 2px !important;
    accent-color: #f97316 !important;
}

/* ======================
   MESSAGES
   ====================== */

.lt-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 12px;
    border-radius: 4px;
    margin-top: 10px;
}

.lt-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 12px;
    border-radius: 4px;
    margin-top: 10px;
}

/* ======================
   HONEYPOT FIELDS
   ====================== */

.lt-honeypot-field {
    position: absolute !important;
    left: -9999px !important;
}

.lt-honeypot-hidden {
    display: none !important;
}

/* ======================
   OVERRIDE TAILWIND FORMS
   ====================== */

/* Reset any Tailwind form styles */
.lt-form-wrapper [type='text'],
.lt-form-wrapper [type='email'],
.lt-form-wrapper [type='tel'],
.lt-form-wrapper [type='url'],
.lt-form-wrapper [type='password'],
.lt-form-wrapper [type='number'],
.lt-form-wrapper [type='date'],
.lt-form-wrapper [type='datetime-local'],
.lt-form-wrapper [type='month'],
.lt-form-wrapper [type='search'],
.lt-form-wrapper [type='time'],
.lt-form-wrapper [type='week'],
.lt-form-wrapper textarea,
.lt-form-wrapper select {
    /* Remove Tailwind defaults */
    background-image: none !important;
    background-position: initial !important;
    background-repeat: initial !important;
    background-size: initial !important;
    padding-right: 20px !important; /* Override Tailwind's 2.5rem */
}

/* Ensure no duplication from Tailwind's focus styles */
.lt-form-wrapper input:focus,
.lt-form-wrapper textarea:focus {
    --tw-ring-offset-shadow: none !important;
    --tw-ring-shadow: none !important;
    --tw-shadow: none !important;
}