/**
 * Estilos para el frontend de Roxvan Cotizaciones
 */

/* General styles for the entire plugin's frontend components */
body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    line-height: 1.6;
}

/* --- Cart Enhancements Section --- */
.roxvan-cart-enhancements {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative; /* Needed for loading overlay */
}

.roxvan-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.roxvan-cart-title {
    font-size: 28px;
    font-weight: bold;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.roxvan-cart-summary {
    display: flex;
    gap: 30px;
    align-items: center;
}

.roxvan-summary-item {
    text-align: center;
}

.roxvan-label {
    display: block;
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.roxvan-value {
    font-size: 20px;
    font-weight: bold;
}

.roxvan-savings .roxvan-value {
    color: #4ade80;
    font-size: 22px;
}

.roxvan-category-filters {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 20px;
}

.roxvan-category-filters h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
}

.roxvan-filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.roxvan-filter-btn {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.roxvan-filter-btn:hover,
.roxvan-filter-btn.active {
    background: rgba(255,255,255,0.3);
    border-color: white;
    transform: translateY(-2px);
}

.roxvan-item-savings {
    margin-top: 5px;
    padding: 5px 10px;
    background: #4ade80;
    color: white;
    border-radius: 5px;
    font-size: 12px;
    text-align: center;
}

.roxvan-saving-badge {
    background: #dc2626;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
    margin-right: 5px;
}

.roxvan-volume-savings {
    margin-top: 3px;
    color: #059669;
    font-size: 11px;
    font-weight: 500;
}

.roxvan-subtotal-savings {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
    font-size: 12px;
}

.roxvan-regular-price {
    text-decoration: line-through;
    color: #6b7280;
}

.roxvan-saving-arrow {
    color: #059669;
    font-weight: bold;
}

.roxvan-sale-price {
    color: #059669;
    font-weight: bold;
}

.roxvan-quotation-section {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 30px;
    margin-top: 30px;
}

.roxvan-quotation-header {
    text-align: center;
    margin-bottom: 30px;
}

.roxvan-quotation-header h3 {
    color: #1e293b;
    font-size: 24px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.roxvan-quotation-header p {
    color: #64748b;
    font-size: 16px;
}

.roxvan-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.roxvan-form-group {
    display: flex;
    flex-direction: column;
}

.roxvan-form-group label {
    color: #374151;
    font-weight: 500;
    margin-bottom: 5px;
}

.roxvan-form-group input,
.roxvan-form-group textarea {
    padding: 10px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.roxvan-form-group input:focus,
.roxvan-form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
}

.roxvan-quotation-actions {
    text-align: center;
    margin-top: 30px;
}

.roxvan-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.roxvan-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.roxvan-quotation-loading {
    text-align: center;
    color: #3b82f6;
    font-size: 16px;
    padding: 20px;
}

.roxvan-quotation-result {
    background: #f0fdf4;
    border: 2px solid #4ade80;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.roxvan-quotation-success {
    text-align: center;
    padding: 20px;
}

.roxvan-success-header {
    margin-bottom: 30px;
}

.roxvan-success-icon {
    font-size: 60px;
    color: #4ade80;
    margin-bottom: 20px;
}

.roxvan-success-header h3 {
    color: #059669;
    font-size: 28px;
    margin-bottom: 10px;
}

.roxvan-quotation-summary {
    background: #f8fafc;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
}

.roxvan-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.roxvan-summary-item {
    text-align: center;
}

.roxvan-summary-item .roxvan-label {
    display: block;
    color: #64748b;
    font-size: 14px;
    margin-bottom: 5px;
}

.roxvan-summary-item .roxvan-value {
    display: block;
    color: #1e293b;
    font-size: 18px;
    font-weight: 600;
}

.roxvan-summary-item .roxvan-savings {
    color: #059669;
}

.roxvan-quotation-info {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 20px;
    text-align: left;
}

.roxvan-quotation-info p {
    margin: 5px 0;
    color: #92400e;
}

.roxvan-note {
    font-style: italic;
    margin-top: 10px !important;
}

/* --- Frontend Quotations List (Customer) --- */
.roxvan-customer-quotations {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #333;
}

.roxvan-quotations-header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 2px solid #eee;
    padding-bottom: 20px;
}

.roxvan-quotations-header h2 {
    font-size: 2.8em;
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-weight: 700;
}

/* Filter Form */
.roxvan-filters-form {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.roxvan-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    align-items: end;
    margin-bottom: 15px;
}

.roxvan-filters input[type="text"],
.roxvan-filters input[type="date"],
.roxvan-filters select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 0.95em;
    box-sizing: border-box;
}

.roxvan-filters button {
    padding: 10px 15px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 0.95em;
    transition: background-color 0.3s ease;
}

.roxvan-filters button[type="submit"] {
    background-color: #3498db;
    color: white;
}

.roxvan-filters button[type="submit"]:hover {
    background-color: #2980b9;
}

#roxvan-clear-filters {
    background-color: #e74c3c;
    color: white;
}

#roxvan-clear-filters:hover {
    background-color: #c0392b;
}

.roxvan-quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    justify-content: center;
}

.roxvan-quick-filter {
    background-color: #95a5a6;
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}

.roxvan-quick-filter:hover {
    background-color: #7f8c8d;
}

/* Quotation List */
.roxvan-quotations-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.roxvan-quotation-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.roxvan-quotation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.roxvan-quotation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: #ecf0f1;
    border-bottom: 1px solid #e0e0e0;
}

.roxvan-quotation-info h3 {
    margin: 0;
    color: #34495e;
    font-size: 1.3em;
    font-weight: 600;
}

.roxvan-quotation-date {
    margin: 0;
    color: #7f8c8d;
    font-size: 0.85em;
}

.roxvan-quotation-status .roxvan-badge {
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8em;
    font-weight: 600;
    color: white;
}

.roxvan-quotation-status .roxvan-badge-warning {
    background-color: #f39c12;
}

.roxvan-quotation-status .roxvan-badge-success {
    background-color: #27ae60;
}

.roxvan-quotation-status .roxvan-badge-danger {
    background-color: #e74c3c;
}

.roxvan-quotation-status .roxvan-badge-secondary {
    background-color: #95a5a6;
}

.roxvan-quotation-body {
    padding: 20px;
    flex-grow: 1;
}

.roxvan-quotation-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.roxvan-detail-item {
    display: flex;
    justify-content: space-between;
    padding-bottom: 5px;
    border-bottom: 1px dashed #eee;
}

.roxvan-detail-item:last-child {
    border-bottom: none;
}

.roxvan-label {
    color: #555;
    font-weight: 500;
    font-size: 0.95em;
}

.roxvan-value {
    color: #333;
    font-weight: 600;
    font-size: 0.95em;
}

.roxvan-quotation-actions {
    padding: 15px 20px;
    background: #f8f8f8;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.roxvan-btn-small {
    padding: 8px 15px;
    font-size: 0.9em;
    border-radius: 6px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background-color: #3498db;
    color: white;
}

.roxvan-btn-small:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}

.roxvan-no-quotations {
    text-align: center;
    padding: 60px 30px;
    background: #fef3c7;
    border: 1px solid #fbc531;
    border-radius: 10px;
    color: #8a6d3b;
    font-size: 1.1em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.roxvan-no-quotations .button {
    margin-top: 20px;
    background-color: #f39c12;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.roxvan-no-quotations .button:hover {
    background-color: #e67e22;
}

.roxvan-login-notice {
    text-align: center;
    padding: 40px;
    background: #d9edf7;
    border: 1px solid #bce8f1;
    border-radius: 10px;
    color: #31708f;
    font-size: 1.1em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.roxvan-login-notice a {
    color: #31708f;
    font-weight: 600;
    text-decoration: underline;
}

.roxvan-pagination {
    margin-top: 30px;
    text-align: center;
}

.roxvan-pagination .page-numbers {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #3498db;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.roxvan-pagination .page-numbers:hover {
    background-color: #f0f0f0;
}

.roxvan-pagination .page-numbers.current {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .roxvan-cart-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .roxvan-cart-summary {
        justify-content: center;
    }
    
    .roxvan-form-row {
        grid-template-columns: 1fr;
    }
    
    .roxvan-filter-buttons {
        justify-content: center;
    }
    
    .roxvan-action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .roxvan-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .roxvan-customer-quotations {
        margin: 20px auto;
        padding: 10px;
    }

    .roxvan-quotations-header h2 {
        font-size: 2em;
    }

    .roxvan-filters {
        grid-template-columns: 1fr;
    }

    .roxvan-quotations-list {
        grid-template-columns: 1fr;
    }
    
    .roxvan-quotation-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .roxvan-quotation-body {
        padding: 15px;
    }

    .roxvan-quotation-actions {
        justify-content: center;
    }
}

/* Loading overlay for AJAX operations */
.roxvan-cart-enhancements.roxvan-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.roxvan-cart-enhancements.roxvan-loading::before {
    content: '⏳';
    font-size: 30px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
}
