/**
 * FFM Booking Forms Styling
 */

/* Form Layout */
.ffm-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.ffm-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ffm-form-group--full {
    grid-column: 1 / -1;
}

.ffm-form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ffm-gray);
}

/* Inputs */
.ffm-input,
.ffm-select,
.ffm-textarea {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--ffm-gray-dark);
    background: var(--ffm-dark-alt);
    color: var(--ffm-white);
    font-size: 1rem;
    font-family: var(--ffm-font);
    transition: all 0.3s ease;
    width: 100%;
}

.ffm-input:focus,
.ffm-select:focus,
.ffm-textarea:focus {
    outline: none;
    border-color: var(--ffm-green);
    box-shadow: 0 0 0 3px rgba(29, 185, 84, 0.15);
}

.ffm-input::placeholder { color: var(--ffm-gray); }

.ffm-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238B949E' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.ffm-textarea { min-height: 80px; resize: vertical; }

input[type="date"].ffm-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

/* Checkbox */
.ffm-checkbox-input {
    width: 20px;
    height: 20px;
    accent-color: var(--ffm-green);
    cursor: pointer;
}

/* Error States */
.errorlist {
    list-style: none;
    padding: 0;
    margin: 0.25rem 0 0;
}

.errorlist li {
    color: var(--ffm-red);
    font-size: 0.8rem;
}

/* Form Actions */
.ffm-form-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--ffm-gray-dark);
}

/* Booking Step Container */
.ffm-booking-step {
    background: var(--ffm-dark-alt);
    border-radius: 24px;
    padding: 2.5rem;
    margin-top: 3rem;
    border: 1px solid var(--ffm-gray-dark);
}

/* Progress */
.ffm-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.ffm-progress__step {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--ffm-dark);
    border: 2px solid var(--ffm-gray-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--ffm-gray);
}

.ffm-progress__step--active {
    background: var(--ffm-green);
    border-color: var(--ffm-green);
    color: var(--ffm-dark);
}

.ffm-progress__step--completed {
    border-color: var(--ffm-green);
    color: var(--ffm-green);
}

.ffm-progress__line {
    width: 30px;
    height: 2px;
    background: var(--ffm-gray-dark);
}

.ffm-progress__line--completed {
    background: var(--ffm-green);
}

/* Summary */
.ffm-summary {
    background: var(--ffm-dark);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.ffm-summary__title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ffm-green);
    margin-bottom: 0.75rem;
}

.ffm-summary__row {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--ffm-gray-dark);
    font-size: 0.9rem;
}

.ffm-summary__row:last-child { border-bottom: none; }
.ffm-summary__label { color: var(--ffm-gray); }
.ffm-summary__value { color: var(--ffm-white); }

.ffm-summary__total {
    display: flex;
    justify-content: space-between;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 2px solid var(--ffm-green);
    font-size: 1.1rem;
}

.ffm-summary__total-value {
    font-family: var(--ffm-font-display);
    font-size: 1.4rem;
    color: var(--ffm-green);
}

/* Success */
.ffm-booking-success {
    text-align: center;
    padding: 2rem;
}

.ffm-booking-success__icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background: var(--ffm-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    animation: successPop 0.4s ease;
}

@keyframes successPop {
    0% { transform: scale(0); }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* Alert */
.ffm-alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.ffm-alert--error {
    background: rgba(230, 57, 70, 0.1);
    border: 1px solid var(--ffm-red);
    color: var(--ffm-red);
}

/* Loading */
.htmx-request .ffm-btn--primary {
    opacity: 0.7;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
    .ffm-form-grid { grid-template-columns: 1fr; }
    .ffm-booking-step { padding: 1.5rem; }
    .ffm-form-actions { flex-direction: column-reverse; }
    .ffm-form-actions .ffm-btn { width: 100%; justify-content: center; }
}
