/* style-salento-configurator.css */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

* {
    box-sizing: border-box;
}

body {
    background: #f8f9fa;
    color: #202124;
}

.salento-form-container {
    max-width: 720px;
    margin: 40px auto;
    font-family: 'Roboto', sans-serif;
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

/* Progress Bar */
.salento-progress-bar {
    position: relative;
    display: flex;
    justify-content: space-between;
    height: 40px;
    margin-bottom: 40px;
}

.salento-progress-step {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #757575;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 14px;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    border: 2px solid white;
}

.salento-progress-step.active {
    background: white;
    border: 2px solid #4285f4;
    color: #4285f4;
}

.salento-progress-bar-connector {
    position: absolute;
    top: 18px;
    left: 0;
    right: 0;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    z-index: 1;
}

.salento-progress-bar-connector::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: #4285f4;
    width: 0;
    border-radius: 2px;
    transition: width 0.4s ease;
}

/* Material Input */
.form-group-material {
    position: relative;
    margin: 24px 0;
}

.form-group-material input {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-bottom: 1px solid #9e9e9e;
    outline: none;
    font-size: 16px;
    background: transparent;
    transition: border-color 0.3s;
}

.form-group-material input:focus,
.form-group-material input:valid {
    border-color: #4285f4;
}

.form-group-material label {
    position: absolute;
    top: 12px;
    left: 0;
    font-size: 16px;
    color: #757575;
    pointer-events: none;
    transition: 0.3s ease all;
}

.form-group-material input:focus ~ label,
.form-group-material input:valid ~ label {
    top: -10px;
    font-size: 12px;
    color: #4285f4;
}

/* Step */
.salento-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

.salento-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Pulsanti */
.salento-button-prev,
.salento-button-next,
.salento-button-submit {
    background: #f1f3f4;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.salento-button-next,
.salento-button-submit {
    background: #4285f4;
    color: white;
}

.salento-button-prev {
    background: #dadce0;
    color: #3c4043;
}

.salento-button-submit {
    background: #34a853;
}

.salento-button-prev:hover,
.salento-button-next:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.salento-step-buttons {
    margin-top: 30px;
    text-align: right;
}

.salento-step-buttons .salento-button-prev {
    margin-right: 10px;
}

/* --- Step 2: Selezione Visiva (Card Cliccabili) --- */
.form-group-visual {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin: 24px 0;
}

.selection-card {
    flex: 1 1 200px;
    min-width: 200px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 140px;
    box-sizing: border-box;
}

.selection-card:hover {
    border-color: #4285f4;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(66, 133, 244, 0.15);
}

.selection-card.selected {
    border-color: #4285f4;
    background-color: #f0f8ff;
    box-shadow: 0 0 0 1px #4285f4;
}

.selection-card.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: #4285f4;
    color: white;
    border-radius: 50%;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.card-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 12px;
    background: #f1f3f4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.card-icon svg {
    width: 28px;
    height: 28px;
    fill: #4285f4;
}

.card-label {
    font-size: 15px;
    color: #3c4043;
    font-weight: 500;
    line-height: 1.4;
}

/* Tab Servizi */
.salento-tab-buttons {
    display: flex;
    gap: 8px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.salento-tab-btn {
    padding: 10px 16px;
    background: #f1f3f4;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

.salento-tab-btn.active {
    background: #4285f4;
    color: white;
}

.salento-tab-content {
    display: none;
    margin-top: 16px;
}

.salento-tab-content.active {
    display: block;
}
/* --- Step 1: Form a due colonne con badge stile card (corretto) --- */
.form-row-group {
    margin: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-row {
    display: flex;
    align-items: center;
    min-height: 56px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.form-row:hover {
    border-color: #4285f4;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.1);
}

.form-row:focus-within {
    border-color: #4285f4;
    box-shadow: 0 0 0 1px #4285f4, 0 4px 12px rgba(66, 133, 244, 0.1);
}

/* Colonna sinistra: label in badge */
.form-row-label-container {
    flex: 0 0 200px;
    background: #f8f9fa;
    border-right: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 16px;
    font-weight: 500;
    color: #202124;
    font-size: 14px;
    white-space: nowrap;
}

/* Colonna destra: input */
.form-row-input-container {
    flex: 1;
    padding: 0 12px;
}

.form-row-input-container input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 16px;
    color: #202124;
    padding: 12px 0;
    background: transparent;
}

.form-row-input-container input:focus {
    outline: none;
}

/* Nessuna label sopra: nascondiamo il comportamento Material Design originale */
.form-group-material {
    margin: 0 !important;
}

.form-group-material label {
    display: none !important;
}

/* Responsive: su mobile, una colonna */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }

    .form-row-label {
        text-align: left;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        flex: auto;
        padding: 12px 16px;
    }

    .form-row-input-container {
        padding: 12px 16px;
    }
}
/* Responsive */
@media (max-width: 768px) {
    .salento-form-container {
        padding: 20px;
        margin: 20px;
    }
}