/* Toldos Presupuestador - Estilos Frontend */

.toldos-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0,0,0,0.1);
}

.toldos-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.toldos-logo {
    max-width: 250px;
    height: auto;
    margin-bottom: 15px;
}

.toldos-header h2 {
    color: #2c3e50;
    font-size: 28px;
    margin: 0;
}
input[type="radio"]{
    visibility: visible !important;
}
/* Barra de progreso */
.toldos-progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.toldos-progress-bar::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.progress-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    font-weight: bold;
    margin-bottom: 5px;
    transition: all 0.3s;
}

.progress-step.active .step-number {
    background: #007bff;
    color: #fff;
}

.step-label {
    display: block;
    font-size: 12px;
    color: #666;
}

.progress-step.active .step-label {
    color: #007bff;
    font-weight: bold;
}

/* Pasos del formulario */
.toldos-step {
    display: none;
}

.toldos-step.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.toldos-step h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 24px;
}

/* Grupos de formulario */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
}

.form-group input.error,
.form-group select.error {
    border-color: #dc3545;
}

.form-group.error label {
    color: #dc3545;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Radio buttons */
.radio-group {
    display: flex;
    gap: 20px;
}

.radio-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.radio-group input[type="radio"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Productos */
.producto-item {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 2px solid #e9ecef;
}

.producto-item h4 {
    color: #007bff;
    margin-top: 0;
    margin-bottom: 20px;
}

/* Fotos */
.foto-upload {
    border: 2px dashed #ddd;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
}

.fotos-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.foto-preview-item {
    position: relative;
    aspect-ratio: 1;
}

.foto-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
    border: 2px solid #ddd;
}

.btn-remove-foto {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #dc3545;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

/* Botones */
button, .btn-primary, .btn-secondary {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-next, .btn-submit, .btn-primary {
    background: #007bff;
    color: white;
}

.btn-next:hover, .btn-submit:hover, .btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

.btn-prev {
    background: #6c757d;
    color: white;
}

.btn-prev:hover {
    background: #545b62;
}

.btn-secondary, #btn-add-producto {
    background: #28a745;
    color: white;
}

.btn-secondary:hover, #btn-add-producto:hover {
    background: #218838;
}

.btn-remove-producto {
    background: #dc3545;
    color: white;
    margin-top: 15px;
}

.btn-remove-producto:hover {
    background: #c82333;
}

/* Navegación */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

/* Precios */
.precio-item {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    margin-bottom: 20px;
}

.precio-item h4 {
    color: #007bff;
    margin-top: 0;
}

/* Resumen */
.resumen-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.resumen-section h4 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.resumen-table {
    width: 100%;
    border-collapse: collapse;
}

.resumen-table td {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.resumen-table td:first-child {
    width: 150px;
}

.resumen-table .precio {
    color: #28a745;
    font-weight: bold;
    font-size: 18px;
}

.total-presupuesto {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin: 30px 0;
}

.total-presupuesto h3 {
    margin: 0;
    font-size: 28px;
}

/* Loading */
#toldos-loading {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success */
#toldos-success {
    text-align: center;
    padding: 60px 20px;
}

.success-message {
    max-width: 500px;
    margin: 0 auto;
}

.success-icon {
    display: inline-block;
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    background: #28a745;
    color: white;
    font-size: 40px;
    margin-bottom: 20px;
}

.success-message h3 {
    color: #28a745;
    font-size: 32px;
    margin-bottom: 15px;
}

.success-message p {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
}

.success-message a,
.success-message button {
    display: inline-block;
    margin: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .toldos-container {
        padding: 20px;
        margin: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .toldos-progress-bar {
        flex-wrap: wrap;
    }
    
    .step-label {
        font-size: 10px;
    }
    
    .form-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-navigation button {
        width: 100%;
    }
}