/**
 * HaveCom Booking Styles
 * All sections visible - vertical scroll layout
 */

/* Global box-sizing para evitar overflow */
.havecom-divi-module,
.havecom-booking-container *,
.havecom-booking-container *::before,
.havecom-booking-container *::after {
    box-sizing: border-box;
}

.havecom-divi-module {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

:root {
    --havecom-primary: #00D9D9; /* Cyan */
    --havecom-dark: #0A1E2E; /* Dark blue */
    --havecom-dark-light: #142B3E;
    --havecom-white: #FFFFFF;
    --havecom-gray: #8A9BA8;
    --havecom-gray-light: #E5E7EB;
    --havecom-radius: 20px;
    --havecom-radius-sm: 12px;
}

/* Container */
.havecom-booking-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--havecom-dark);
    color: var(--havecom-white);
    position: relative;
    box-sizing: border-box;
    width: 100%;
    overflow-x: hidden;
}

/* Title */
.havecom-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 30px 0;
    color: var(--havecom-white);
    text-align: center;
}

.havecom-title .highlight {
    color: var(--havecom-primary);
}

/* Section */
.havecom-section {
    margin-bottom: 40px;
}

.havecom-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.havecom-section-header i.fas {
    font-size: 20px;
    color: var(--havecom-white);
}

/* Divi Icons Support */
.havecom-section-header .havecom-icon,
.havecom-section-header .et-pb-icon {
    font-size: 20px;
    color: var(--havecom-white);
    display: inline-block;
    font-family: 'ETmodules' !important;
    speak: never;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.havecom-section-header .havecom-icon::before,
.havecom-section-header .et-pb-icon::before {
    font-family: 'ETmodules' !important;
}


.havecom-section-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--havecom-white);
}

/* Brand Search */
.havecom-section-brand {
    background: #FFFFFF !important;
    padding: 30px;
    border-radius: var(--havecom-radius);
}

.havecom-section-brand .havecom-section-header i,
.havecom-section-brand .havecom-section-header h3 {
    color: #1F2937 !important;
}

.havecom-brand-search {
    position: relative;
    margin-bottom: 20px;
}

.havecom-brand-search input {
    width: 100%;
    padding: 15px 45px 15px 20px;
    border: 2px solid #E5E7EB !important;
    border-radius: var(--havecom-radius);
    background: #FFFFFF !important;
    color: #1F2937 !important;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.havecom-brand-search input::placeholder {
    color: #9CA3AF !important;
}

.havecom-brand-search input:focus {
    border-color: var(--havecom-primary);
}

.havecom-brand-search i {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
    font-size: 18px;
}

/* Brands Grid */
.havecom-brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

/* Hidden brands */
.havecom-brand-item.hidden-brand {
    display: none;
}

/* View All Button */
.havecom-view-all-btn {
    width: 100%;
    margin-top: 20px;
    padding: 15px 30px;
    background: transparent;
    border: 2px solid #1F2937;
    border-radius: var(--havecom-radius);
    color: #1F2937;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.havecom-view-all-btn:hover {
    background: #1F2937;
    color: #FFFFFF;
}

.havecom-view-all-btn::after {
    content: '▼';
    font-size: 12px;
    transition: transform 0.3s ease;
}

.havecom-view-all-btn.expanded::after {
    transform: rotate(180deg);
}

.havecom-brand-item {
    position: relative;
    background: #F3F4F6;
    border-radius: var(--havecom-radius);
    padding: 30px 20px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #E5E7EB;
}

.havecom-brand-item:hover {
    border-color: #D1D5DB;
    transform: translateY(-2px);
}

.havecom-brand-item.selected {
    border-color: var(--havecom-primary);
    background: #F3F4F6;
}

.havecom-brand-item.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: var(--havecom-primary);
    color: var(--havecom-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    line-height: 24px;
}

.brand-logo {
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.brand-logo .brand-letter {
    font-size: 36px;
    font-weight: 700;
    color: #9CA3AF;
}

.brand-name {
    font-size: 14px;
    color: #6B7280;
    font-weight: 600;
    margin-top: 10px;
}

/* Models Grid - Single Dropdown Full Width */
.havecom-models-grid {
    display: block;
    width: 100%;
}

.havecom-models-grid select {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--havecom-dark-light);
    border-radius: var(--havecom-radius-sm);
    background: var(--havecom-dark-light);
    color: var(--havecom-white);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238A9BA8' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

.havecom-models-grid select:focus {
    border-color: var(--havecom-primary);
}

.havecom-models-grid select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.havecom-models-grid select option {
    background: var(--havecom-dark-light);
    color: var(--havecom-white);
}

.havecom-models-grid select option:first-child {
    color: var(--havecom-gray);
}

/* Service Buttons - Horizontal Scroll */
.havecom-service-buttons {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.havecom-service-buttons::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.havecom-service-btn {
    flex: 0 0 auto;
    min-width: 200px;
    padding: 18px 30px;
    border: 2px solid var(--havecom-dark-light);
    border-radius: var(--havecom-radius);
    background: transparent;
    color: var(--havecom-white);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.havecom-service-btn:hover:not(.active) {
    border-color: var(--havecom-primary);
}

.havecom-service-btn.active {
    background: var(--havecom-primary);
    color: var(--havecom-dark);
    border-color: var(--havecom-primary);
}

/* Calendar Grid - Horizontal Scroll */
.havecom-calendar-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.havecom-calendar-grid::-webkit-scrollbar {
    display: none;
}

.havecom-date-item {
    flex: 0 0 auto;
    min-width: 90px;
    background: var(--havecom-dark-light);
    border-radius: var(--havecom-radius-sm);
    padding: 20px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.havecom-date-item:hover:not(.disabled) {
    border-color: var(--havecom-primary);
}

.havecom-date-item.selected {
    background: var(--havecom-primary);
    border-color: var(--havecom-primary);
}

.havecom-date-item .date-day {
    font-size: 32px;
    font-weight: 700;
    color: var(--havecom-white);
    display: block;
    margin-bottom: 5px;
    line-height: 1;
}

.havecom-date-item .date-month {
    font-size: 11px;
    color: var(--havecom-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.havecom-date-item.selected .date-day,
.havecom-date-item.selected .date-month {
    color: var(--havecom-dark);
}

.havecom-date-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.havecom-date-item.placeholder {
    pointer-events: none;
}


.date-day {
    font-size: 32px;
    font-weight: 700;
    color: var(--havecom-white);
    display: block;
    margin-bottom: 5px;
    line-height: 1;
}

.date-month {
    font-size: 11px;
    color: var(--havecom-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Time Grid - Horizontal Scroll */
.havecom-time-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.havecom-time-grid::-webkit-scrollbar {
    display: none;
}

.havecom-time-item {
    flex: 0 0 auto;
    min-width: 110px;
    background: var(--havecom-dark-light);
    border-radius: var(--havecom-radius-sm);
    padding: 18px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-size: 16px;
    font-weight: 600;
    color: var(--havecom-white);
}

.havecom-time-item:hover:not(.disabled) {
    border-color: var(--havecom-primary);
}

.havecom-time-item.selected {
    background: var(--havecom-primary);
    color: var(--havecom-dark);
    border-color: var(--havecom-primary);
}

.havecom-time-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.havecom-time-item.placeholder {
    pointer-events: none;
}


/* Summary */
.havecom-summary {
    background: var(--havecom-dark-light);
    border-radius: var(--havecom-radius);
    padding: 25px;
}

.havecom-service-details {
    margin-bottom: 25px;
    color: var(--havecom-white);
    font-size: 14px;
    line-height: 1.8;
}

.havecom-service-details ul {
    margin: 15px 0 0 0;
    padding: 0 0 0 20px;
    color: var(--havecom-gray);
}

.havecom-service-details li {
    margin-bottom: 8px;
}

.havecom-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 25px;
}

.total-label {
    font-size: 18px;
    color: var(--havecom-white);
    font-weight: 600;
}

.total-amount {
    font-size: 32px;
    font-weight: 700;
    color: var(--havecom-primary);
}

/* Submit Button */
.havecom-submit-btn {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: var(--havecom-radius);
    background: var(--havecom-primary);
    color: var(--havecom-dark);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.havecom-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 217, 217, 0.3);
}

.havecom-submit-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: var(--havecom-gray);
}

/* Loading Overlay */
.havecom-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 30, 46, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 217, 217, 0.2);
    border-top-color: var(--havecom-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.havecom-loading p {
    margin-top: 20px;
    color: var(--havecom-white);
    font-size: 16px;
}

/* Responsive */
@media (max-width: 480px) {
    .havecom-booking-container {
        padding: 15px;
        max-width: 100%;
    }
    
    .havecom-section-brand {
        padding: 20px;
    }
    
    .havecom-title {
        font-size: 24px;
    }
    
    /* Brands grid - 2 columnas con scroll */
    .havecom-brands-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        max-height: 400px;
        overflow-y: auto;
        overflow-x: hidden;
        padding-right: 5px;
    }
    
    /* Scrollbar styling para móvil */
    .havecom-brands-grid::-webkit-scrollbar {
        width: 6px;
    }
    
    .havecom-brands-grid::-webkit-scrollbar-track {
        background: #E5E7EB;
        border-radius: 3px;
    }
    
    .havecom-brands-grid::-webkit-scrollbar-thumb {
        background: #9CA3AF;
        border-radius: 3px;
    }
    
    .havecom-brands-grid::-webkit-scrollbar-thumb:hover {
        background: #6B7280;
    }
    
    .havecom-brand-item {
        padding: 20px 15px 15px;
    }
    
    .brand-logo {
        width: 80px;
        height: 80px;
    }
    
    .havecom-view-all-btn {
        margin-top: 15px;
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .havecom-models-grid {
        grid-template-columns: 1fr;
    }
    
    .havecom-service-btn {
        min-width: 150px;
        font-size: 14px;
    }
    
    .havecom-date-item {
        min-width: 70px;
    }
    
    .havecom-time-item {
        min-width: 90px;
    }
    
    .havecom-brand-search input {
        padding: 12px 40px 12px 15px;
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    .havecom-booking-container {
        padding: 10px;
    }
    
    .havecom-section-brand {
        padding: 15px;
    }
    
    .havecom-title {
        font-size: 20px;
    }
    
    .havecom-brands-grid {
        gap: 8px;
        max-height: 350px;
    }
    
    .havecom-brand-item {
        padding: 15px 10px 10px;
    }
    
    .brand-logo {
        width: 60px;
        height: 60px;
    }
    
    .brand-name {
        font-size: 12px;
    }
    
    .havecom-view-all-btn {
        margin-top: 12px;
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .havecom-service-btn {
        min-width: 130px;
        padding: 15px 20px;
        font-size: 13px;
    }
    
    .havecom-date-item {
        min-width: 60px;
    }
    
    .havecom-time-item {
        min-width: 80px;
    }
}