/* Form Preventivo Ristrutturazioni - Mobile First */

/* Container */
.fpr-wrapper {
    width: 100%;
    max-width: 650px;
    margin: 30px auto;
    padding: 0 15px;
}

.fpr-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 25px 20px;
}

/* Progress Bar */
.fpr-progress {
    margin-bottom: 30px;
}

.fpr-progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.fpr-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #9e8952 0%, #9e8959 100%);
    width: 14.28%;
    transition: width 0.4s ease;
}

.fpr-progress-text {
    text-align: center;
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

/* Steps */
.fpr-step {
    display: none;
}

.fpr-step.fpr-active {
    display: block;
    animation: fadeSlideIn 0.4s ease;
}

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

/* Typography */
.fpr-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.2;
    color: black !important;
}

.fpr-subtitle {
    font-size: 16px;
    margin: 0 0 25px 0;
    line-height: 1.5;
    color: black !important;
}

/* Option Buttons */
.fpr-buttons {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.fpr-btn-option {
    width: 100%;
    padding: 18px 20px;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    text-align: left;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    display: block;
}

.fpr-btn-option:hover {
    border-color: #9e8952;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
}

.fpr-btn-option.fpr-selected {
    border-color: #9e8952;
    background: #e5e7eb;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.fpr-btn-option strong {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
    line-height: 1.3;
}

.fpr-btn-option span {
    display: block;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.4;
}

/* Form Fields */
.fpr-field {
    margin-bottom: 20px;
}

.fpr-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.fpr-input,
.fpr-textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: inherit;
    transition: border-color 0.2s ease;
    background: #ffffff;
}

.fpr-input:focus,
.fpr-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.fpr-input.fpr-error,
.fpr-textarea.fpr-error {
    border-color: #ef4444;
}

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

/* Action Buttons */
.fpr-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.fpr-btn-back,
.fpr-btn-next,
.fpr-btn-submit {
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.fpr-btn-back {
    background: #f3f4f6;
    color: #374151;
    flex-shrink: 0;
}

.fpr-btn-back:hover {
    background: #e5e7eb;
}

.fpr-btn-next,
.fpr-btn-submit {
    flex: 1;
    background: linear-gradient(135deg, #9e8952 0%, #9e8952 100%);
    color: white;
}

.fpr-btn-next:hover,
.fpr-btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.fpr-btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Success Message */
.fpr-success {
    text-align: center;
    padding: 40px 20px;
}

.fpr-success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 24px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.fpr-success-title {
    font-size: 28px;
    font-weight: 700;
    color: black !important;
    margin: 0 0 12px 0;
}

.fpr-success-text {
    font-size: 16px;
    color: black !important;
    margin: 0;
    line-height: 1.6;
}

/* Alert */
.fpr-alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.fpr-alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Mobile Fix - Bottoni */
@media (max-width: 767px) {
    .fpr-actions {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }
    
    .fpr-btn-back,
    .fpr-btn-next,
    .fpr-btn-submit {
        width: 100%;
        padding: 14px 20px;
        font-size: 16px;
        box-sizing: border-box;
    }
    
    .fpr-btn-back {
        order: 2;
    }
    
    .fpr-btn-next,
    .fpr-btn-submit {
        order: 1;
    }
}


/* Tablet */
@media (min-width: 768px) {
    .fpr-wrapper {
        padding: 0 20px;
        margin: 40px auto;
    }
    
    .fpr-container {
        padding: 35px 30px;
    }
    
    .fpr-title {
        font-size: 30px;
    }
    
    .fpr-subtitle {
        font-size: 17px;
    }
    
    .fpr-btn-option strong {
        font-size: 19px;
    }
    
    .fpr-btn-option span {
        font-size: 15px;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .fpr-container {
        padding: 40px;
    }
}
