/* App Container */
.fbe-app-container {
    font-family: var(--e-global-typography-text-font-family, sans-serif);
    color: var(--e-global-color-text, #333);
    max-width: 800px;
    margin: 0 auto;
}

/* Accordion Section */
.fbe-section {
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.fbe-accordion-header {
    background: var(--e-global-color-secondary, #f8f9fa);
    padding: 15px 20px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.fbe-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fbe-step-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fbe-step-icon i {
    font-size: 20px;
}
.fbe-step-icon svg {
    width: 24px;
    height: 24px;
}

/* Icon Swap Logic */
.fbe-locked .icon-completed { display: none !important; }
.fbe-locked .icon-pending { display: flex !important; }

.fbe-section:not(.fbe-locked) .icon-pending { display: none !important; }
.fbe-section:not(.fbe-locked) .icon-completed { display: flex !important; }

.fbe-accordion-header:hover {
    background: #f1f3f5;
}

.fbe-accordion-content {
    display: none;
    padding: 20px;
}

/* Step 1: Courts */
.fbe-courts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.fbe-court-card, .fbe-type-card, .fbe-resource-card {
    border: 2px solid #eee;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fbe-court-card:hover, .fbe-type-card:hover, .fbe-resource-card:hover {
    border-color: var(--e-global-color-primary, #00e000);
    transform: translateY(-2px);
}

.fbe-court-card.selected, .fbe-type-card.selected, .fbe-resource-card.selected {
    border-color: var(--e-global-color-primary, #00e000);
    background: rgba(0, 224, 0, 0.05);
}

.fbe-court-icon svg {
    width: 60px;
    height: 60px;
    fill: var(--e-global-color-primary, #00e000);
    margin-bottom: 10px;
}

/* Step 2: Dates */
.fbe-date-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: #f9f9f9;
    padding: 10px 15px;
    border-radius: 8px;
}

.fbe-date-controls span {
    font-weight: 600;
    font-size: 14px;
}

.fbe-date-controls input[type="date"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    outline: none;
}

.fbe-date-scroll {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 5px 5px 15px 5px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.fbe-date-scroll::-webkit-scrollbar {
    height: 4px;
}
.fbe-date-scroll::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 4px;
}

.fbe-date-btn {
    flex: 0 0 auto;
    width: 75px;
    height: 90px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    color: inherit;
}

.fbe-date-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.fbe-date-btn.active {
    background: var(--e-global-color-primary, #00e000);
    border-color: var(--e-global-color-primary, #00e000);
    /* Rimosso color:#fff hardcoded. Elementor lo sovrascrive via active_text_color */
}

.fbe-day-name { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.9; }
.fbe-day-num { font-size: 24px; font-weight: 800; margin: 4px 0; line-height: 1; }
.fbe-month-name { font-size: 11px; font-weight: 600; text-transform: capitalize; opacity: 0.9; }

/* Spinner Caricamento */
.fbe-spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    grid-column: 1 / -1;
}

.fbe-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0,0,0,0.1);
    border-top-color: var(--e-global-color-primary, #00e000);
    border-radius: 50%;
    animation: fbe-spin 1s linear infinite;
}

@keyframes fbe-spin {
    to { transform: rotate(360deg); }
}
.fbe-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.fbe-slot-btn {
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.fbe-slot-btn:hover {
    background: var(--e-global-color-primary, #00e000);
    color: #fff;
    border-color: var(--e-global-color-primary, #00e000);
}

.fbe-slot-btn.selected {
    background: var(--e-global-color-primary, #00e000);
    color: #fff;
    border-color: var(--e-global-color-primary, #00e000);
    transform: scale(1.05);
}

/* Step 4: Summary */
.fbe-summary-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.fbe-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.fbe-summary-row:last-child {
    border-bottom: none;
}

.fbe-btn-confirm {
    background: var(--e-global-color-primary, #00e000);
    color: #fff;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    width: 100%;
    transition: 0.2s;
}

.fbe-btn-confirm:hover {
    filter: brightness(0.9);
}

.fbe-btn-confirm:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.fbe-success-msg {
    text-align: center;
    padding: 40px 20px;
}

.fbe-success-msg h2 {
    color: var(--e-global-color-primary, #00e000);
}

.fbe-success-msg button {
    margin-top: 20px;
    padding: 10px 20px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
