/* ================================
   LTX Tanzstudio Plugin Styles - Modern & General
   ================================ */

/* Variables for easy theming */
:root {
    --ltx-primary: #2563eb; /* Modern Blue */
    --ltx-primary-hover: #1d4ed8;
    --ltx-secondary: #64748b;
    --ltx-bg: #f8fafc;
    --ltx-surface: #ffffff;
    --ltx-text: #0f172a;
    --ltx-text-muted: #64748b;
    --ltx-border: #e2e8f0;
    --ltx-radius: 12px;
    --ltx-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --ltx-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ================================
   HIDE DEFAULT ELEMENTS (User Request)
   ================================ */
.gform_wrapper .gform_heading,
.gform_wrapper .gf_progressbar_wrapper {
    display: none !important;
}

/* ================================
   MODERN STEPS INDICATOR
   ================================ */
.ltx-modern-steps {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 40px 20px 10px !important; /* Top padding for spacing inside card */
    margin-bottom: 0 !important;
    width: 100% !important;
    max-width: 600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    background: transparent !important; /* Transparent to blend with card */
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
}

.ltx-step {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    position: relative !important;
    z-index: 2 !important;
    width: 80px !important;
    cursor: pointer !important; /* Make clickable */
}

.ltx-step-icon {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: #ffffff !important; /* White background */
    color: #94a3b8 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    margin-bottom: 8px !important;
    transition: all 0.3s ease !important;
    border: 2px solid #e2e8f0 !important;
}

.ltx-step-label {
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    color: #94a3b8 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    transition: all 0.3s ease !important;
}

/* Active State */
.ltx-step.active .ltx-step-icon {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2) !important;
    transform: scale(1.1) !important;
}

.ltx-step.active .ltx-step-label {
    color: #2563eb !important;
}

/* Hover State */
.ltx-step:hover .ltx-step-icon {
    border-color: #2563eb !important;
    color: #2563eb !important;
}

.ltx-step:hover .ltx-step-label {
    color: #2563eb !important;
}

/* Completed State */
.ltx-step.completed .ltx-step-icon {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
}

.ltx-step.completed .ltx-step-label {
    color: #2563eb !important;
}

/* Connector Line */
.ltx-step-line {
    flex: 1 !important;
    height: 2px !important;
    background: #e2e8f0 !important;
    margin: 0 -10px 25px -10px !important; /* Negative margin to connect, adjust for label height */
    position: relative !important;
    z-index: 1 !important;
}

.ltx-step-line.active {
    background: #2563eb !important;
}

/* Global Reset & Typography within Wrapper */
.gform_wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    color: var(--ltx-text) !important;
    max-width: 1200px;
    margin: 40px auto;
    overflow: visible !important; /* Ensure sticky works */
}

/* Main Container */
.gform_wrapper form {
    background: transparent !important;
    padding: 0;
    border-radius: var(--ltx-radius);
}

/* Header */
.gform_wrapper .gform_heading {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 20px;
}

.gform_wrapper .gform_title {
    font-size: 2.5rem !important;
    font-weight: 800 !important;
    color: var(--ltx-text) !important;
    letter-spacing: -0.025em !important;
    margin-bottom: 1rem !important;
}

.gform_wrapper .gform_description {
    font-size: 1.1rem !important;
    color: var(--ltx-text-muted) !important;
    max-width: 600px;
    margin: 0 auto !important;
    line-height: 1.6 !important;
}

/* Progress Bar / Steps */
.gform_wrapper .gf_progressbar_wrapper {
    margin-bottom: 40px !important;
}

.gform_wrapper .gf_progressbar {
    background: var(--ltx-border) !important;
    border-radius: 100px !important;
    height: 8px !important;
    overflow: hidden !important;
}

.gform_wrapper .gf_progressbar_percentage {
    background: var(--ltx-primary) !important;
    border-radius: 100px !important;
    height: 8px !important;
}

.gform_wrapper .gf_progressbar_title {
    font-size: 0.875rem !important;
    color: var(--ltx-text-muted) !important;
    margin-bottom: 8px !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

/* Form Body */
.gform_body {
    background: var(--ltx-surface);
    padding: 0; /* Removed padding completely */
    border-radius: var(--ltx-radius);
    box-shadow: var(--ltx-shadow);
    border: 1px solid var(--ltx-border);
    overflow: visible !important; /* Changed from hidden to visible for sticky */
}

/* Layout with Sidebar */
.gform_wrapper.has-sidebar .gform_body {
    display: flex;
    align-items: flex-start; /* Important for sticky sidebar */
    gap: 0; /* Reduced from 10px */
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
    overflow: visible;
}

.gform_wrapper.has-sidebar .gform_body > .gform_page {
    flex: 1;
    background: var(--ltx-surface);
    padding: 0; /* Removed padding completely */
    border-radius: var(--ltx-radius);
    box-shadow: var(--ltx-shadow);
    border: 1px solid var(--ltx-border);
    overflow: hidden;
}

/* Add padding to internal container instead to ensure content doesn't touch edges */
.gform_wrapper .gform_page_fields {
    padding: 20px;
}

.gform-theme--foundation .gform_fields {
    row-gap: 20px !important;
}

/* Section Titles (Dein Paket, Tanzkurs wählen) */
.gform_wrapper .gsection_title {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: var(--ltx-primary) !important; /* Our Blue */
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    margin-bottom: 0px !important;
    margin-top: 10px !important;
    padding-left: 0px !important;
    padding-right: 20px;
    border-bottom: none !important; /* Remove underline */
}

.gform_wrapper .gsection {
    border-bottom: none !important; /* Remove underline from section wrapper */
}

/* Inputs & Fields */
.gform_wrapper .gfield {
    margin-bottom: 0px !important;
    padding-left: 20px; /* Align with content */
    padding-right: 20px;
}

.gform_wrapper .gfield_label {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: var(--ltx-text) !important;
    margin-bottom: 8px !important;
    display: block !important;
}

.gform_wrapper input[type="text"],
.gform_wrapper input[type="email"],
.gform_wrapper input[type="tel"],
.gform_wrapper input[type="number"],
.gform_wrapper input[type="password"],
.gform_wrapper select,
.gform_wrapper textarea {
    width: 100% !important;
    padding: 12px 16px !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
    color: var(--ltx-text) !important;
    background-color: var(--ltx-surface) !important;
    border: 1px solid var(--ltx-border) !important;
    border-radius: 8px !important;
    transition: all 0.2s ease-in-out !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
}

.gform_wrapper input:focus,
.gform_wrapper select:focus,
.gform_wrapper textarea:focus {
    border-color: var(--ltx-primary) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
    outline: none !important;
}

/* Buttons */
.gform_footer {
    margin-top: 40px !important;
    text-align: center !important;
    padding: 0 !important;
}

.gform_button,
.gform_next_button,
.gform_previous_button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 14px 32px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-transform: none !important;
    min-width: 120px !important;
}

.gform_button,
.gform_next_button {
    background-color: var(--ltx-primary) !important;
    color: white !important;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2) !important;
}

.gform_button:hover,
.gform_next_button:hover {
    background-color: var(--ltx-primary-hover) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 8px -1px rgba(37, 99, 235, 0.3) !important;
}

.gform_previous_button {
    background-color: white !important;
    color: var(--ltx-text-muted) !important;
    border: 1px solid var(--ltx-border) !important;
    margin-right: 16px !important;
}

.gform_previous_button:hover {
    background-color: var(--ltx-bg) !important;
    color: var(--ltx-text) !important;
    border-color: var(--ltx-text-muted) !important;
}

/* ================================
   MODERN SIDEBAR STYLING
   ================================ */
.ltx-booking-sidebar {
    flex: 0 0 300px;
    background: #ffffff !important; /* Fallback for var(--ltx-surface) */
    border: 1px solid #e2e8f0 !important; /* Fallback for var(--ltx-border) */
    border-radius: 24px !important; /* More rounded corners */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important; /* Fallback for var(--ltx-shadow-lg) */
    display: none; /* Initial versteckt */
    font-family: 'Inter', sans-serif;
    overflow: hidden !important; /* Changed to hidden to fix footer bleed */
    padding: 0 !important; /* Ensure no padding */
    height: fit-content;
    position: -webkit-sticky !important; /* Safari support */
    position: sticky !important;
    top: 40px !important; /* Increased top spacing */
    align-self: flex-start !important; /* Ensure it doesn't stretch */
    transition: all 0.3s ease;
    z-index: 100;
    font-size: 0.9rem;
    margin-left: 20px !important; /* Spacing from content */
}

.ltx-booking-sidebar.show {
    display: block !important;
    animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Header */
.ltx-sidebar-header {
    padding: 20px 20px 12px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
    border-radius: 24px 24px 0 0 !important;
}

.ltx-sidebar-header h3 {
    margin: 0 !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

/* Content */
.ltx-sidebar-content {
    padding: 20px !important;
}

.ltx-summary-group {
    display: flex !important;
    gap: 12px !important;
    margin-bottom: 20px !important;
    align-items: flex-start !important;
}

.ltx-summary-group:last-child {
    margin-bottom: 0 !important;
}

.ltx-summary-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: #eff6ff !important;
    color: #2563eb !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.ltx-summary-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

.ltx-summary-details {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
}

.ltx-label {
    font-size: 0.7rem !important;
    text-transform: uppercase !important;
    color: #64748b !important;
    font-weight: 600 !important;
    margin-bottom: 2px !important;
    letter-spacing: 0.02em !important;
    display: block !important;
}

.ltx-value {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    line-height: 1.4 !important;
    display: block !important;
}

.ltx-value.empty {
    color: #cbd5e1 !important;
    font-weight: 400 !important;
    font-style: italic !important;
}

.ltx-subvalue {
    font-size: 0.8rem !important;
    color: #64748b !important;
    margin-top: 2px !important;
    display: block !important;
}

/* Course Level Highlight */
.ltx-course-level {
    color: #2563eb !important; /* Primary Blue */
    font-weight: 700 !important;
    margin-left: 4px !important;
}

/* Divider */
.ltx-divider {
    height: 1px !important;
    background: #e2e8f0 !important;
    margin: 20px 0 !important;
    border: none !important;
}

/* Cost Row (Anmeldegebühr) */
.ltx-cost-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-size: 0.85rem !important;
    color: #64748b !important;
}

.ltx-cost-value {
    font-weight: 600 !important;
    color: #0f172a !important;
}

/* Footer (Total Price) */
.ltx-sidebar-footer {
    background: #2563eb !important;
    padding: 20px !important;
    color: white !important;
    margin-top: 0 !important;
    border-radius: 0 0 12px 12px !important;
}

.ltx-price-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: baseline !important;
    margin-bottom: 4px !important;
}

.ltx-price-label {
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    opacity: 0.9 !important;
    color: white !important;
}

.ltx-price-amount {
    font-size: 1.75rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    color: white !important;
}

.ltx-price-note {
    font-size: 0.7rem !important;
    opacity: 0.7 !important;
    text-align: right !important;
    color: white !important;
}

/* Responsive */
@media (max-width: 900px) {
    .ltx-booking-sidebar {
        position: static;
        width: 100%;
        margin-bottom: 30px;
    }
    
    .ltx-booking-sidebar.show {
        animation: fadeInUp 0.4s ease;
    }
}

/* ================================
   MODERN STEP 1: LOCATION SELECTION
   ================================ */

/* Section Title for Step 1 (Large & Centered) */
.gform_wrapper.ltx-step-1 h3.gsection_title,
.gform_wrapper.ltx-step-1 .gsection_title {
    text-align: center !important;
}

.gform_wrapper h3.gsection_title,
.gform_wrapper .gsection_title {
    font-size: 1.5rem !important;
    text-align: left !important;
    margin-bottom: 0px !important;
    color: var(--ltx-primary) !important;
    font-weight: 600 !important;
    width: 100% !important;
    display: block !important;
    text-transform: inherit !important;
    letter-spacing: -0.02em !important;
}

/* Grid Container - Wider & Centered */
.gform_wrapper .ginput_container_radio {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 auto !important;
}

/* Increased Specificity to override Framework Styles */
body .gform_wrapper .gfield_radio,
body .gform_wrapper .gfield--type-image_choice .gfield_radio {
    display: flex !important; /* Use Flexbox for better centering */
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 40px !important; /* Gap between cards */
    max-width: 1200px !important; /* Constrain max width for better centering */
    margin: 0 auto !important; /* Center the container */
    justify-content: center !important; /* Center the items inside */
    align-items: center !important;
    width: 100% !important;
    padding: 0 !important;
    list-style: none !important;
    box-sizing: border-box !important;
    text-align: center !important; /* Ensure text alignment doesn't interfere */
}

/* Ensure the field wrapper itself is full width and centered */
.gform_wrapper .gfield {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Grid Item - Default (Step 1 & 2 Cards) */
.gform_wrapper .gchoice {
    display: flex !important;
    margin: 0 !important;
    padding: 0 !important;
    justify-content: center !important;
    flex: 0 0 380px !important; /* Reduced width */
    width: 380px !important; /* Reduced width */
    max-width: 90% !important; /* Responsive safety */
    box-sizing: border-box !important;
    float: none !important; /* Ensure no floats */
}

/* Step 3 Specific: Standard List Layout */
.gform_wrapper.ltx-step-3 .gchoice {
    display: flex !important;
    margin: 0 !important;
    padding: 0 !important;
    justify-content: left !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    float: none !important;
}

/* Step 3: Ensure Checkboxes are Visible & Modern */
body .gform_wrapper.ltx-step-3 input[type="checkbox"],
body .gform_wrapper.ltx-step-3 input[type="radio"] {
    opacity: 1 !important;
    position: static !important;
    width: 20px !important;
    height: 20px !important;
    margin-right: 8px !important; /* Small gap between box and text */
    margin-left: 0px !important;
    margin-top: 2px !important;
    display: inline-block !important;
    appearance: none !important; /* Custom styling */
    -webkit-appearance: none !important;
    vertical-align: top !important;
    cursor: pointer !important;
    z-index: 10 !important;
    visibility: visible !important;
    border: 2px solid #cbd5e1 !important;
    border-radius: 6px !important; /* Softer corners */
    background-color: white !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important; /* Prevent shrinking */
    outline: none !important;
    box-shadow: none !important;
}

/* Checked State */
body .gform_wrapper.ltx-step-3 input[type="checkbox"]:checked,
body .gform_wrapper.ltx-step-3 input[type="radio"]:checked {
    background-color: var(--ltx-primary) !important;
    border-color: var(--ltx-primary) !important;
    /* Only ONE checkmark - the SVG one */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-size: 14px !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

/* Remove any pseudo-elements that might cause double checkmarks */
body .gform_wrapper.ltx-step-3 input[type="checkbox"]::before,
body .gform_wrapper.ltx-step-3 input[type="checkbox"]::after,
body .gform_wrapper.ltx-step-3 input[type="radio"]::before,
body .gform_wrapper.ltx-step-3 input[type="radio"]::after {
    display: none !important;
    content: none !important;
}

/* Radio specific rounded */
body .gform_wrapper.ltx-step-3 input[type="radio"] {
    border-radius: 50% !important;
}

/* Ensure label is next to it - Aggressive Override */
body .gform_wrapper.ltx-step-3 .gchoice label,
body .pt_plus_gravity_form .gform_wrapper.ltx-step-3 .gfield_checkbox label,
body .pt_plus_gravity_form .gform_wrapper.ltx-step-3 .gfield_radio label {
    display: inline-block !important;
    width: auto !important;
    max-width: calc(100% - 35px) !important;
    vertical-align: top !important;
    cursor: pointer !important;
    font-weight: 400 !important;
    color: var(--ltx-text) !important;
    line-height: 1.4 !important;
    margin-top: 1px !important;
    margin-left: 0px !important; /* Force 0px margin */
    padding-left: 0px !important; /* Force 0px padding */
}

/* Step 3: Modern Upload Fields */
.gform_wrapper.ltx-step-3 .ginput_container_fileupload {
    background-color: #ffffff !important; /* White background for cleaner look */
    border: 2px dashed #cbd5e1 !important;
    border-radius: 16px !important; /* More rounded */
    padding: 32px 24px !important;
    text-align: center !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    cursor: pointer !important;
    /* Icon via background */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'%3E%3C/path%3E%3Cpolyline points='17 8 12 3 7 8'%3E%3C/polyline%3E%3Cline x1='12' y1='3' x2='12' y2='15'%3E%3C/line%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center 24px !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
}

.gform_wrapper.ltx-step-3 .ginput_container_fileupload:hover {
    border-color: var(--ltx-primary) !important;
    background-color: #f8fafc !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'%3E%3C/path%3E%3Cpolyline points='17 8 12 3 7 8'%3E%3C/polyline%3E%3Cline x1='12' y1='3' x2='12' y2='15'%3E%3C/line%3E%3C/svg%3E") !important;
}

.gform_wrapper.ltx-step-3 .ginput_container_fileupload input[type="file"] {
    width: 100% !important;
    height: 100% !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    opacity: 0 !important; /* Hide default input but keep clickable */
    cursor: pointer !important;
    z-index: 10 !important;
}

/* Hide original text from Gravity Forms */
.gform_wrapper.ltx-step-3 .ginput_container_fileupload .gform_fileupload_rules,
.gform_wrapper.ltx-step-3 .ginput_container_fileupload span:not(.gform_fileupload_rules) {
    display: none !important;
}

/* Custom Upload Content (Pseudo-element or JS injected) */
.gform_wrapper.ltx-step-3 .ginput_container_fileupload::before {
    content: attr(data-file-label); /* Use JS attribute if available */
    display: block;
    font-weight: 600;
    color: var(--ltx-text);
    margin-top: 48px; /* Space for icon */
    margin-bottom: 4px;
    font-size: 0.95rem;
}

/* Default text if attribute is missing */
.gform_wrapper.ltx-step-3 .ginput_container_fileupload:not([data-file-label])::before {
    content: 'Datei auswählen oder hier ablegen';
}

.gform_wrapper.ltx-step-3 .ginput_container_fileupload::after {
    content: 'Max. 64 MB (PDF, JPG, PNG)';
    display: block;
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 500;
}

/* Upload States */
.gform_wrapper.ltx-step-3 .ginput_container_fileupload.drag-over {
    border-color: var(--ltx-primary) !important;
    background-color: #eff6ff !important;
    transform: scale(1.02);
}

.gform_wrapper.ltx-step-3 .ginput_container_fileupload.has-file {
    border-color: #10b981 !important; /* Green */
    background-color: #f0fdf4 !important;
}

.gform_wrapper.ltx-step-3 .ginput_container_fileupload.has-file::before {
    color: #10b981 !important;
}

/* Readonly Lock & Tooltip */
.ltx-readonly-lock {
    background-color: #f1f5f9 !important;
    cursor: not-allowed !important;
    opacity: 0.8;
    pointer-events: none !important; /* Prevent interactions like datepickers */
}

/* Ensure container is relative for absolute tooltip */
.ginput_container {
    position: relative !important;
}

.ltx-tooltip-alert {
    position: absolute !important; /* Force absolute */
    bottom: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: #3b82f6 !important; /* Blue instead of Red */
    color: white !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
    z-index: 9999 !important; /* High z-index */
    margin-bottom: 12px !important;
    display: none;
    pointer-events: none !important; /* Don't interfere with mouse */
}

.ltx-tooltip-alert::after {
    content: '';
    position: absolute !important;
    top: 100% !important;
    left: 50% !important;
    margin-left: -6px !important;
    border-width: 6px !important;
    border-style: solid !important;
    border-color: #3b82f6 transparent transparent transparent !important; /* Blue arrow */
}

/* Reset Framework Styles that interfere (User Request) */
.gform-theme--framework .gfield--type-image_choice.gfield--image-choice-appearance-card .gchoice,
.gform-theme--framework .gfield--type-image_choice.gfield--image-choice-appearance-card .gchoice:hover {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
    transition: none !important;
}

/* Mobile Responsive Adjustment */
@media only screen and (max-width: 600px) {
    .gform_wrapper .gchoice {
        flex: 1 1 100% !important;
        width: 100% !important;
    }
}

/* Hide Footer on Step 1 (controlled by JS class) */
.gform_wrapper.ltx-step-1 .gform_page_footer {
    display: none !important;
}

/* ================================
   LOADING STATE (STEP 1 AUTO-ADVANCE)
   ================================ */

/* Card Loading State */
.ltx-card-loading {
    pointer-events: none !important;
    transform: scale(0.98) !important;
    border-color: #2563eb !important;
}

/* Spinner Overlay */
.ltx-card-spinner {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(255, 255, 255, 0.85) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 20 !important;
    border-radius: 32px !important;
    backdrop-filter: blur(4px) !important;
    animation: fadeIn 0.3s ease !important;
}

/* Spinner Icon */
.ltx-spinner-icon {
    width: 50px !important;
    height: 50px !important;
    border: 4px solid #e2e8f0 !important;
    border-top: 4px solid #2563eb !important;
    border-radius: 50% !important;
    animation: spin 0.8s linear infinite !important;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* The Card (Outer Wrapper) */
.gform_wrapper .gfield-image-choice-wrapper-outer {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 32px !important;
    overflow: hidden !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    cursor: pointer !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02) !important;
    padding: 30px !important; /* Adjusted padding */
}

/* Hover State */
.gform_wrapper .gfield-image-choice-wrapper-outer:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 25px 30px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    border-color: #94a3b8 !important;
}

/* Selected State */
.gform_wrapper .gfield-image-choice-wrapper-outer:has(input:checked) {
    border-color: #2563eb !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 3px #2563eb, 0 20px 25px -5px rgba(37, 99, 235, 0.15) !important;
}

/* Image Wrapper - Reset to allow circle */
.gform_wrapper .gfield-choice-image-wrapper {
    height: 180px !important; /* Smaller image */
    width: 180px !important;
    max-width: 180px !important; /* Force max width to prevent oval */
    min-width: 180px !important; /* Prevent squishing */
    min-height: 180px !important; /* Prevent squishing */
    overflow: hidden !important;
    position: relative !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 0 30px 0 !important; /* Less space below image */
    border-radius: 50% !important; /* Circle */
    box-shadow: none !important; /* No shadow */
    flex: 0 0 180px !important; /* Prevent flex growing/shrinking */
    align-self: center !important; /* Ensure it stays in center of card */
    aspect-ratio: 1 / 1 !important; /* Force square aspect ratio */
}

/* Image Span Container */
.gform_wrapper .gfield-choice-image {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

/* The Image Itself */
.gform_wrapper .gfield-choice-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: block !important;
}

.gform_wrapper .gfield-image-choice-wrapper-outer:hover .gfield-choice-image img {
    transform: scale(1.1) !important;
}

/* Inner Content Wrapper (Text) */
.gform_wrapper .gfield-image-choice-wrapper-inner {
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    width: 100% !important;
}

/* Label Text Container */
.gform_wrapper .gfield-image-choice-wrapper-inner label {
    width: 100% !important;
    cursor: pointer !important;
    text-align: center !important;
}

/* JS Generated Classes for Text Styling */
.ltx-loc-title {
    font-size: 1.4rem !important; /* Larger title */
    font-weight: 800 !important;
    color: #0f172a !important;
    margin-bottom: 12px !important;
    line-height: 1.2 !important;
    display: block !important;
}

.ltx-loc-address {
    font-size: 1rem !important;
    color: #64748b !important;
    font-weight: 500 !important;
    margin-bottom: 6px !important;
    display: block !important;
}

.ltx-loc-supp {
    font-size: 0.95rem !important;
    color: #94a3b8 !important;
    font-weight: 400 !important;
    display: block !important;
}

/* Hide the unwanted span */
.gravity_radio_label {
    display: none !important;
}

/* Hide Default Input - Only for Image Choices */
.gfield--type-image_choice .gfield-choice-input {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
}

/* Checkmark Badge */
.gform_wrapper .gfield-image-choice-wrapper-outer:has(input:checked)::after {
    content: "" !important;
    position: absolute !important;
    top: 24px !important;
    right: 24px !important;
    width: 32px !important;
    height: 32px !important;
    background-color: #2563eb !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-size: 18px !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
    z-index: 10 !important;
    animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

@keyframes scaleIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Footer / Next Button Centering */
.gform_wrapper .gform_page_footer {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important; /* Align items to the right by default */
    margin-top: 60px !important;
    padding-bottom: 20px !important;
    width: 100% !important;
}

/* Previous button pushes everything else to the right */
.gform_wrapper .gform_previous_button {
    margin-right: auto !important;
    order: 1 !important;
}

/* Spinner - Order 2 (Middle) */
.gform_wrapper .gform_ajax_spinner_image {
    order: 2 !important;
    margin-right: 15px !important; /* Space between spinner and button */
    margin-left: 0 !important;
}

/* Next/Submit Button - Order 3 (Right) */
.gform_wrapper .gform_next_button,
.gform_wrapper .gform_button {
    order: 3 !important;
    padding: 16px 64px !important; /* Larger button */
    font-size: 1.1rem !important;
    border-radius: 8px !important; /* Standard rounded */
}

/* ================================
   CONDITIONAL VISIBILITY (FUNCTIONAL)
   ================================ */
/* Keep existing logic but ensure it works with new structure */
.gfield.ltx-kurs2-select,
.gfield.ltx-flatrate-only,
.gfield.ltx-einzelstunde-only,
.gfield.ltx-force-hidden {
    display: none !important;
}

[data-js-interval="2_mal_woche"] .gfield.ltx-kurs2-select,
[data-js-interval="flatrate"] .gfield.ltx-flatrate-only,
[data-js-interval="einzelstunde"] .gfield.ltx-einzelstunde-only {
    display: block !important;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hide-on-flatrate logic */
[data-js-interval="flatrate"] .gfield.ltx-hide-on-flatrate,
[data-js-interval="flatrate"] .gfield.ltx-kurs1-select,
[data-js-interval="flatrate"] .gfield.ltx-kurs2-select {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .gform_wrapper.has-sidebar .gform_body {
        flex-direction: column;
    }
    
    .ltx-booking-sidebar {
        flex: none;
        width: 100%;
        order: -1;
        margin-bottom: 30px;
    }
    
    .gform_wrapper .gfield_radio {
        grid-template-columns: 1fr !important;
    }
}

/* Step 3: Input Styling & Filled State */
.gform_wrapper.ltx-step-3 input[type="text"],
.gform_wrapper.ltx-step-3 input[type="email"],
.gform_wrapper.ltx-step-3 input[type="tel"],
.gform_wrapper.ltx-step-3 input[type="number"],
.gform_wrapper.ltx-step-3 input[type="password"],
.gform_wrapper.ltx-step-3 select,
.gform_wrapper.ltx-step-3 textarea {
    padding: 24px 16px !important;
}

/* Filled State Marker */
.gform_wrapper.ltx-step-3 input.ltx-filled,
.gform_wrapper.ltx-step-3 select.ltx-filled,
.gform_wrapper.ltx-step-3 textarea.ltx-filled {
    background-color: #f0f9ff !important;
    border-color: #3b82f6 !important; /* Blue border to mark as filled */
}

/* Aggressive Override for Field Margins */
body .gform_wrapper .gfield {
    margin-bottom: 0px !important;
    padding-left: 0px !important;
    padding-right: 0px !important;
}
