/**
 * InnoSchedule Hero Banner Widget Styles
 * Complete integration with Mediax theme styling
 * Perfected through extensive testing and refinement
 */

/* Base Hero Styles - Fallbacks if theme CSS not available */
.th-hero-wrapper {
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.th-hero-wrapper[data-bg-src] {
    background-image: var(--bg-image);
}

.hero-inner {
    position: relative;
    z-index: 2;
}

.hero-style3 {
    text-align: center;
    padding: 80px 0;
}

.hero-tags {
    margin-bottom: 20px;
}

.hero-tags .tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.9);
    color: #e63131;
    padding: 5px 15px;
    border-radius: 20px;
    margin: 0 5px;
    font-size: 16px;
    font-weight: 600;
}

.hero-title2 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #ffffff;
}

.hero-text {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 40px;
    color: #ffffff;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.th-btn {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.th-btn.th_btn {
    background-color: #04ce78;
    color: #ffffff;
}

.th-btn.th_btn:hover {
    background-color: #03b96b;
    transform: translateY(-2px);
}

.th-btn.th_btn2 {
    background-color: #f5f8fd;
    color: #000000;
}

.th-btn.th_btn2:hover {
    background-color: #e1e7f1;
    transform: translateY(-2px);
}

/* ========================================
 * PERFECTED HERO FORM STYLING
 * Reduced padding, left-aligned content, optimized form
 * ======================================== */

/* FULL WIDTH HERO FORM - REDUCED PADDING, LEFT-ALIGNED CONTENT */
.hero-form-wrap {
    background-color: var(--white-color, #ffffff) !important;
    box-shadow: 0px 6px 50px rgba(0, 0, 0, 0.05) !important;
    border-radius: 60px !important;
    padding: 45px !important; /* REDUCED from 60px */
    max-width: 1522px !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    position: absolute !important;
    /* ADDED BACK: 10px margins */
    bottom: 10px !important;
    right: 10px !important;
    z-index: 9 !important;
    left: auto !important;
    transform: none !important;
    top: auto !important;
    margin-left: auto !important;
    margin-bottom: 0 !important;
    margin-right: 0 !important;
}

/* FORCE LEFT ALIGNMENT FOR HERO CONTENT */
.th-hero-wrapper .hero-inner .container {
    text-align: left !important;
}

.th-hero-wrapper .hero-style3 {
    text-align: left !important;
}

.th-hero-wrapper .btn-group {
    justify-content: flex-start !important; /* LEFT-ALIGN BUTTONS */
}

/* LEFT-ALIGN DESCRIPTION TEXT */
.th-hero-wrapper .hero-text,
.th-hero-wrapper .hero-style3 .hero-text {
    text-align: left !important;
    margin-left: 0 !important;
    margin-right: auto !important;
}

/* Original Mediax responsive breakpoints */
@media (max-width: 1860px) {
    .hero-form-wrap {
        margin-right: 0 !important;
        right: 10px !important;
        margin-left: auto !important;
    }
}

@media (max-width: 1600px) {
    .hero-form-wrap {
        max-width: calc(100% - 34px) !important; /* 24px + 10px margin */
        margin-left: auto !important;
    }
}

@media (max-width: 1299px) {
    .hero-form-wrap {
        padding: 35px !important; /* REDUCED from 45px */
    }
}

/* Form title styling to match original + H1 BLACK STYLING */
.hero-form-wrap .form-title {
    margin: 0 !important;
    max-width: 350px !important;
    padding-right: 55px !important;
    border-right: 2px solid var(--theme-color, #04ce78) !important;
    margin-right: 55px !important;
    font-weight: 700 !important; /* BOLDER for H1 */
    flex-shrink: 0 !important;
    /* H1 STYLING - BLACK */
    font-size: 32px !important; /* H1 size */
    color: #000000 !important; /* BLACK */
    line-height: 1.2 !important;
    letter-spacing: -0.5px !important;
}

/* Override any H2 styling that might conflict */
.hero-form-wrap h1.form-title,
.hero-form-wrap h2.form-title {
    font-size: 32px !important; /* H1 size */
    color: #000000 !important; /* BLACK */
    font-weight: 700 !important; /* BOLDER */
    line-height: 1.2 !important;
    letter-spacing: -0.5px !important;
}

@media (max-width: 1299px) {
    .hero-form-wrap .form-title,
    .hero-form-wrap h1.form-title,
    .hero-form-wrap h2.form-title {
        max-width: 300px !important;
        padding-right: 25px !important;
        margin-right: 20px !important;
        font-size: 28px !important; /* RESPONSIVE H1 size */
    }
}

/* Hero form takes remaining space */
.hero-form {
    flex: 1 !important;
    margin-bottom: -15px !important; /* REDUCED from -20px */
}

/* Quick Widget styling with proper alignment */
.hero-form-wrap .inno-quick-widget {
    width: 100% !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* FULL WIDTH BOOTSTRAP-STYLE GRID - REDUCED GAPS */
.hero-form-wrap .inno-quick-widget .quick-widget-form {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important; /* 3 columns to match original */
    grid-template-rows: auto auto !important;
    gap: 15px !important; /* REDUCED from 20px */
    align-items: start !important;
    width: 100% !important;
}

/* Hide duplicate title */
.hero-form-wrap .inno-quick-widget .widget-title-column {
    display: none !important;
}

/* Each form column spans full width like Bootstrap col-lg-4 */
.hero-form-wrap .inno-quick-widget .form-column {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important; /* REDUCED from 20px */
    width: 100% !important;
}

/* Make sure the last column (phone + button) fills properly */
.hero-form-wrap .inno-quick-widget .form-column-4 {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important; /* REDUCED from 20px */
    width: 100% !important;
}

/* ORIGINAL MEDIAX FORM FIELD STYLING - REDUCED HEIGHT */
.hero-form-wrap .inno-quick-widget .form-field {
    /* SLIGHTLY REDUCED DIMENSIONS */
    height: 52px !important; /* REDUCED from 56px */
    padding: 0 20px !important; /* REDUCED from 25px */
    border: 1px solid #e5e5e5 !important;
    border-radius: 5px !important;
    font-size: 16px !important;
    /* ORIGINAL BACKGROUND STYLING */
    background-color: var(--white-color, #ffffff) !important;
    color: var(--body-color, #5c6574) !important;
    width: 100% !important;
    box-sizing: border-box !important;
    /* FOCUS STYLING */
    transition: all 0.3s ease !important;
    font-family: inherit !important;
    line-height: 1.5 !important;
}

.hero-form-wrap .inno-quick-widget .form-field:focus {
    outline: 0 !important;
    box-shadow: none !important;
    border-color: var(--theme-color, #04ce78) !important;
}

/* PLACEHOLDER STYLING */
.hero-form-wrap .inno-quick-widget .form-field::placeholder {
    color: var(--body-color, #5c6574) !important;
    opacity: 1 !important;
}

/* SELECT DROPDOWN STYLING */
.hero-form-wrap .inno-quick-widget select.form-field {
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") !important;
    background-position: right 12px center !important;
    background-repeat: no-repeat !important;
    background-size: 16px 12px !important;
    padding-right: 40px !important;
}

/* PEBBLE BLUE BUTTON - ROUNDED CORNERS BACK */
.hero-form-wrap .inno-quick-widget .btn-book {
    width: 100% !important;
    height: 52px !important; /* REDUCED to match form field height */
    padding: 0 20px !important; /* REDUCED to match form field padding */
    background: #1F5FFF !important; /* PEBBLE BLUE */
    color: white !important;
    border: none !important;
    border-radius: 50px !important; /* ROUNDED CORNERS BACK */
    font-weight: 700 !important;
    font-size: 16px !important; /* Match form field font size */
    text-transform: uppercase !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    letter-spacing: 0.5px !important;
    /* NO SHADOW on button */
    box-shadow: none !important;
}

.hero-form-wrap .inno-quick-widget .btn-book:hover {
    background: #1A52E6 !important; /* Slightly darker blue on hover */
    transform: translateY(-2px) !important;
}

/* Ensure button text is visible */
.hero-form-wrap .inno-quick-widget .btn-book .btn-text {
    color: white !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    letter-spacing: 0.5px !important;
}

/* Loading state styling for hero banner - only when shown by JavaScript */
.hero-form-wrap .inno-quick-widget .btn-book .btn-loading {
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    color: white !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    /* Let JavaScript control display, don't force it to flex */
}

.hero-form-wrap .inno-quick-widget .btn-book .btn-loading .spinner {
    width: 16px !important;
    height: 16px !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-top-color: white !important;
    border-radius: 50% !important;
    animation: inno-hero-spin 1s linear infinite !important;
}

@keyframes inno-hero-spin {
    to { transform: rotate(360deg); }
}

/* Large devices responsive */
@media (max-width: 1199px) {
    .hero-form-wrap {
        bottom: -90px !important; /* -100px + 10px margin */
        flex-direction: column !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        margin-left: 0 !important;
    }
    
    .hero-form-wrap .form-title,
    .hero-form-wrap h1.form-title,
    .hero-form-wrap h2.form-title {
        border-right: none !important;
        padding: 0 !important;
        margin: 0 0 25px 0 !important;
        max-width: 100% !important;
        text-align: center !important;
        font-size: 28px !important; /* RESPONSIVE H1 */
    }
    
    /* RESPONSIVE GRID - 2 COLUMNS */
    .hero-form-wrap .inno-quick-widget .quick-widget-form {
        grid-template-columns: repeat(2, 1fr) !important;
        grid-template-rows: auto auto auto auto !important;
    }
    
    /* RESPONSIVE LEFT ALIGNMENT OVERRIDE */
    .th-hero-wrapper .hero-style3 {
        text-align: center !important; /* CENTER on mobile */
    }
    
    .th-hero-wrapper .btn-group {
        justify-content: center !important; /* CENTER buttons on mobile */
    }
    
    /* CENTER DESCRIPTION TEXT ON MOBILE */
    .th-hero-wrapper .hero-text,
    .th-hero-wrapper .hero-style3 .hero-text {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* Medium devices */
@media (max-width: 991px) {
    .hero-form-wrap {
        bottom: -170px !important; /* -180px + 10px margin */
    }
}

/* Small devices */
@media (max-width: 767px) {
    .hero-form-wrap {
        position: static !important;
        padding: 25px !important; /* REDUCED from 30px */
        border-radius: 20px !important;
        left: auto !important;
        transform: none !important;
        margin-left: auto !important;
        margin-right: auto !important;
        margin-bottom: 10px !important;
    }
    
    .hero-form-wrap .form-title,
    .hero-form-wrap h1.form-title,
    .hero-form-wrap h2.form-title {
        font-size: 24px !important; /* MOBILE H1 size */
    }
    
    /* MOBILE - SINGLE COLUMN */
    .hero-form-wrap .inno-quick-widget .quick-widget-form {
        grid-template-columns: 1fr !important;
        grid-template-rows: repeat(8, auto) !important;
    }
}

/* ========================================
 * FALLBACK STYLES FOR NON-THEME USAGE
 * ======================================== */

/* Responsive Design Fallbacks */
@media (max-width: 1200px) {
    .hero-style3 {
        padding: 60px 0 20px;
    }
}

@media (max-width: 768px) {
    .hero-title2 {
        font-size: 2.5rem;
    }
    
    .hero-text {
        font-size: 16px;
    }
    
    .th-btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title2 {
        font-size: 2rem;
    }
    
    .hero-tags .tag {
        font-size: 14px;
        padding: 4px 12px;
        margin: 2px;
    }
}

/* Background Image JavaScript Support */
.th-hero-wrapper[data-bg-src] {
    background-image: attr(data-bg-src url);
}

/* Override any conflicting styles */
.th-hero-wrapper * {
    box-sizing: border-box;
}