/**
 * Estilos públicos para el plugin
 *
 * @package    Bathroom_Renovation_Quote
 * @subpackage Bathroom_Renovation_Quote/public/css
 */

/* Contenedor principal */
.bathroom-quote-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.bathroom-quote-title {
    text-align: center;
    margin-bottom: 30px;
}

/* Barra de progreso */
.bathroom-quote-progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.bathroom-quote-progress-bar::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #e1e1e1;
    z-index: 1;
}

.progress-step {
    position: relative;
    text-align: center;
    z-index: 2;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background-color: #e1e1e1;
    color: #555;
    border-radius: 50%;
    margin: 0 auto 10px;
}

.progress-step.active .step-number,
.progress-step.completed .step-number {
    background-color: #0073aa;
    color: #fff;
}

.step-label {
    font-size: 14px;
    display: block;
}

/* Formulario */
.bathroom-quote-form {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
}

.quote-step {
    margin-bottom: 20px;
}

.quote-step h3 {
    margin-top: 0;
    border-bottom: 1px solid #e1e1e1;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

.field-error {
    color: #b32d2e;
    font-size: 13px;
    margin-top: 5px;
    display: none;
}

.required {
    color: #b32d2e;
}

/* Tipos de renovación */
.renovation-types {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.renovation-type {
    flex: 1 0 30%;
    min-width: 200px;
}

.renovation-type input[type="radio"] {
    display: none;
}

.renovation-type-label {
    display: block;
    padding: 15px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.renovation-type input[type="radio"]:checked + .renovation-type-label {
    border-color: #0073aa;
    background-color: #f0f7fb;
}

.renovation-title {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 16px;
}

.renovation-description {
    display: block;
    font-size: 14px;
    color: #666;
}

/* Selección de productos */
.product-selection-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* Atributos de productos */
.product-attributes {
    margin: 10px 0;
    padding: 8px;
    border-top: 1px dotted #e1e1e1;
    border-bottom: 1px dotted #e1e1e1;
    font-size: 13px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.product-attribute {
    margin-bottom: 8px;
}

.attribute-name {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-size: 12px;
    text-transform: uppercase;
}

.attribute-values {
    margin-left: 5px;
}

.attribute-value {
    color: #666;
    display: inline-block;
    padding: 2px 5px;
    background: #fff;
    border-radius: 3px;
    border: 1px solid #e0e0e0;
    margin-right: 3px;
}

.attribute-select {
    width: 100%;
    padding: 6px;
    font-size: 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background-color: #fff;
}

.product-variations {
    margin: 5px 0;
    padding: 5px;
    background-color: #f9f9f9;
    border-radius: 3px;
}

.variation-price {
    font-weight: bold;
    color: #0073aa;
}

.product-categories,
.product-list-container,
.selected-products {
    flex: 1;
    min-width: 300px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
}

.product-categories h4,
.product-list-container h4,
.selected-products h4 {
    margin-top: 0;
    border-bottom: 1px solid #e1e1e1;
    padding-bottom: 10px;
}

.product-categories-list {
    max-height: 400px;
    overflow-y: auto;
}

.product-category {
    padding: 10px;
    border-bottom: 1px solid #f2f2f2;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.product-category:hover {
    background-color: #f9f9f9;
}

.product-category.active {
    background-color: #f0f7fb;
    font-weight: bold;
}

.product-subcategory {
    padding-left: 20px;
}

.product-search {
    margin-bottom: 15px;
}

.product-search input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.product-item {
    background-color: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    padding: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-image {
    margin-bottom: 8px;
    flex: 0 0 auto;
}

.product-image img {
    max-width: 100%;
    height: auto;
    max-height: 80px;
    object-fit: contain;
}

.product-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 13px;
    margin-bottom: 4px;
    min-height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    flex: 0 0 auto;
}

.product-price {
    font-weight: bold;
    margin-bottom: 10px;
}

.product-quantity {
    display: flex;
    justify-content: center;
    align-items: stretch;
    margin-bottom: 10px;
    gap: 0;
    height: 32px;
    border: 1px solid #0073aa;
    border-radius: 4px;
    overflow: hidden;
    max-width: 120px;
    margin-left: auto;
    margin-right: auto;
}

.quantity-input {
    width: 40px;
    text-align: center;
    padding: 4px 2px;
    font-size: 14px;
    border: none;
    border-left: 1px solid #0073aa;
    border-right: 1px solid #0073aa;
    font-weight: bold;
    color: #000000;
    background-color: white;
    -webkit-appearance: none;
}

.quantity-button {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    min-width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    flex: 0 0 30px;
    font-weight: bold;
}

.quantity-button:hover {
    background-color: #005f8b;
}

.quantity-button:active {
    background-color: #004b70;
}

.add-to-quote, .remove-from-quote {
    width: 100%;
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 8px 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 12px;
    margin-top: 5px;
    text-align: center;
    font-weight: 500;
    max-width: 120px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.remove-from-quote {
    background-color: #d9534f;
}

.remove-from-quote:hover {
    background-color: #c9302c;
}

.add-to-quote:hover {
    background-color: #005f8b;
}

.selected-products-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.selected-product {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #f2f2f2;
}

.selected-product-info {
    flex: 1;
}

.selected-product-name {
    font-weight: 500;
}

.selected-product-price {
    font-size: 13px;
    color: #666;
}

.selected-product-actions {
    display: flex;
    align-items: center;
}

.remove-product {
    color: #b32d2e;
    cursor: pointer;
    padding: 5px;
}

.quote-totals {
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
    margin-top: 10px;
}

.quote-total-price {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: bold;
}

.empty-selection {
    padding: 20px;
    text-align: center;
    color: #666;
}

.loading-indicator {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Tabla de productos seleccionados */
.selected-products-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    font-size: 14px;
}

.selected-products-table th {
    background-color: #f0f7fb;
    padding: 8px;
    text-align: left;
    border-bottom: 2px solid #0073aa;
    color: #333;
    font-weight: 600;
}

.selected-products-table td {
    padding: 8px;
    border-bottom: 1px solid #f2f2f2;
    vertical-align: middle;
}

.selected-products-table button {
    background-color: #d9534f;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;
}

.selected-products-table button:hover {
    background-color: #c9302c;
}

/* Resumen de cotización */
.quote-summary {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
}

.summary-section {
    margin-bottom: 20px;
}

.summary-section h4 {
    margin-top: 0;
    border-bottom: 1px solid #e1e1e1;
    padding-bottom: 10px;
}

.summary-content {
    margin-top: 10px;
}

.summary-product {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f2f2f2;
}

.summary-product-name {
    flex: 3;
    width: 100%;
    margin-bottom: 5px;
    font-weight: bold;
}

/* Estilo para los atributos del producto en el resumen */
.summary-product .product-attribute {
    font-size: 0.9em;
    color: #666;
    width: 100%;
    padding-left: 15px;
    margin-bottom: 3px;
}

.summary-product-quantity {
    flex: 1;
    text-align: left;
    margin-top: 8px;
    background-color: #f0f7fb;
    padding: 5px 10px;
    border-radius: 4px;
    display: inline-block;
    font-weight: bold;
    color: #333;
}

.summary-product-price {
    flex: 1;
    text-align: right;
    font-weight: bold;
    margin-top: 8px;
}

.summary-total {
    margin-top: 15px;
    text-align: right;
    font-weight: bold;
}

/* Botones de acción */
.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.prev-step,
.next-step,
.submit-quote {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s ease;
}

.prev-step {
    background-color: #f1f1f1;
    color: #555;
}

.next-step,
.submit-quote {
    background-color: #0073aa;
    color: #fff;
}

.prev-step:hover {
    background-color: #e1e1e1;
}

.next-step:hover,
.submit-quote:hover {
    background-color: #005f8b;
}

/* Resultado de la cotización */
.quote-result {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 5px;
    text-align: center;
}

.success-icon {
    margin-bottom: 20px;
}

.result-content h3 {
    margin-bottom: 10px;
}

.back-to-form {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.back-to-form:hover {
    background-color: #005f8b;
}

/* Responsividad */
@media (max-width: 768px) {
    .renovation-types {
        flex-direction: column;
    }
    
    .product-selection-container {
        flex-direction: column;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .prev-step, .next-step, .submit-quote {
        width: 100%;
    }
    
    .product-list {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .step-label {
        font-size: 12px;
    }
}