/* Simple Real Estate Quoter Styles - CON INTEGRACIÓN UF */

/* Container */
#srq-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-sizing: border-box;
}

#srq-container * {
    box-sizing: border-box;
}

/* Header */
.srq-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e1e1e1;
}

.srq-header h2 {
    margin: 0;
    color: #333;
}

.srq-cart-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.srq-cart-icon {
    font-size: 24px;
}

.srq-cart-count {
    background: #007cba;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Filters */
.srq-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.srq-filter-group {
    flex: 1;
    min-width: 200px;
}

.srq-filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.srq-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 14px;
}

.srq-filter-actions {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.srq-filter-info {
    background-color: #e9ecef;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.srq-applied-filters {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.srq-applied-filters-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.srq-filter-tag {
    background-color: #007cba;
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.9em;
    white-space: nowrap;
}

/* Buttons */
.srq-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.srq-btn-primary {
    background: #007cba;
    color: white;
}

.srq-btn-primary:hover {
    background: #005a87;
}

.srq-btn-secondary {
    background: #6c757d;
    color: white;
}

.srq-btn-secondary:hover {
    background: #545b62;
}

.srq-btn-success {
    background: #28a745;
    color: white;
}

.srq-btn-danger {
    background: #dc3545;
    color: white;
}

.srq-btn-outline {
    background: white;
    color: #007cba;
    border: 1px solid #007cba;
}

.srq-btn-outline:hover {
    background: #007cba;
    color: white;
}

.srq-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading States */
.srq-btn-loading {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    cursor: not-allowed !important;
    position: relative;
}

.srq-spinner-small {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

.srq-spinner-large {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

/* Loading Overlay */
.srq-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 8px;
}

.srq-loading-content {
    text-align: center;
    padding: 40px;
}

.srq-loading-content p {
    margin: 10px 0 0 0;
    font-size: 18px;
    font-weight: 500;
    color: #333;
}

.srq-loading-subtext {
    font-size: 14px !important;
    color: #6c757d !important;
    font-weight: normal !important;
}

/* Success Overlay */
.srq-success-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 8px;
}

.srq-success-content {
    text-align: center;
    padding: 40px;
    max-width: 400px;
}

.srq-success-icon {
    width: 80px;
    height: 80px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: bold;
    margin: 0 auto 20px;
    animation: successPulse 0.5s ease-out;
}

@keyframes successPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.srq-success-content h3 {
    margin: 0 0 15px 0;
    font-size: 24px;
    color: #28a745;
}

.srq-success-content p {
    margin: 10px 0;
    font-size: 16px;
    color: #333;
    line-height: 1.4;
}

.srq-success-content p strong {
    color: #007cba;
}

.srq-success-subtext {
    font-size: 14px !important;
    color: #6c757d !important;
    margin-top: 15px !important;
}

.srq-success-close {
    margin-top: 20px;
}

/* Units Grid */
.srq-units-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.srq-unit-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
}

.srq-unit-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.srq-unit-image {
    height: 200px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.srq-unit-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.srq-no-image {
    color: #999;
    font-size: 48px;
}

.srq-unit-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.srq-badge-available {
    background: #28a745;
    color: white;
}

.srq-badge-unavailable {
    background: #dc3545;
    color: white;
}

.srq-unit-info {
    padding: 15px;
}

.srq-unit-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
}

.srq-unit-details {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.srq-unit-details p {
    margin: 5px 0;
}

/* PRECIOS UF Y CLP - NUEVOS ESTILOS */
.srq-unit-price {
    font-size: 16px;
    font-weight: bold;
    color: #007cba;
    margin-bottom: 15px;
    text-align: center;
    padding: 10px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 6px;
    border-left: 4px solid #007cba;
}

.srq-price-uf {
    font-size: 18px;
    color: #007cba;
    font-weight: bold;
    margin-bottom: 4px;
}

.srq-price-clp {
    font-size: 14px;
    color: #28a745;
    font-weight: 600;
}

.srq-unit-actions {
    display: flex;
    gap: 10px;
    flex-direction: column;
}

.srq-unit-actions .srq-btn {
    width: 100%;
}

/* Loading */
#srq-loading {
    text-align: center;
    padding: 40px;
}

.srq-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No Results */
.srq-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

/* Pagination */
.srq-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.srq-pagination-wrapper {
    display: flex;
    gap: 5px;
    align-items: center;
}

.srq-page-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
}

.srq-page-btn:hover {
    background: #f5f5f5;
    border-color: #007cba;
    color: #007cba;
}

.srq-page-btn.active {
    background: #007cba;
    color: white;
    border-color: #007cba;
    font-weight: bold;
    cursor: default;
}

.srq-page-btn.active:hover {
    background: #007cba;
    color: white;
}

.srq-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.srq-page-ellipsis {
    padding: 0 10px;
    color: #999;
}

/* Modal */
.srq-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    backdrop-filter: blur(2px);
}

.srq-modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.srq-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    margin: auto;
    animation: modalFadeIn 0.3s ease-out;
}

.srq-modal-large {
    max-width: 900px;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Modal Header específico para evitar conflictos */
.srq-modal-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e9ecef;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    background-color: #f8f9fa;
    position: relative;
}

.srq-modal-header h3 {
    margin: 0 !important;
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: #343a40 !important;
    flex-grow: 1;
}

.srq-close {
    background: none !important;
    border: none !important;
    font-size: 20px !important;
    font-weight: normal !important;
    color: #6c757d !important;
    cursor: pointer;
    padding: 4px !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    transition: all 0.2s ease;
    line-height: 1 !important;
    flex-shrink: 0;
    font-family: inherit !important;
    margin: 0 !important;
}

.srq-close:hover {
    background-color: #f8f9fa !important;
    color: #495057 !important;
}

.srq-close:focus {
    outline: none !important;
    background-color: #e9ecef !important;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.25) !important;
}

.srq-modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
    position: relative;
}

.srq-modal-footer {
    padding: 16px 24px 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background-color: #f8f9fa;
}

/* PRECIOS EN EL CARRITO */
.srq-cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 10px;
}

.srq-cart-item-image {
    width: 60px;
    height: 60px;
    background: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.srq-cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.srq-cart-item-info {
    flex: 1;
}

.srq-cart-item-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.srq-cart-item-details {
    font-size: 14px;
    color: #666;
}

.srq-cart-item-price {
    margin-top: 8px;
    text-align: right;
}

.srq-price-clp-small {
    font-size: 12px;
    color: #28a745;
    font-weight: normal;
}

.srq-cart-summary {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border-left: 5px solid #007cba;
}

.srq-cart-total {
    text-align: center;
    font-size: 20px;
    margin-bottom: 10px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Total del carrito */
#srq-total-price {
    font-size: 18px;
    font-weight: bold;
    color: #007cba;
    line-height: 1.3;
}

.srq-total-clp {
    font-size: 16px;
    color: #28a745;
    font-weight: 600;
    display: block;
    margin-top: 2px;
}

.srq-cart-note {
    text-align: center;
    color: #6c757d;
    font-size: 13px;
    margin: 15px 0 0 0;
    font-style: italic;
}

.srq-empty-cart {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

/* Form */
.srq-form-group {
    margin-bottom: 15px;
}

.srq-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.srq-form-group input,
.srq-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.srq-form-group input:focus,
.srq-form-group textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.srq-form-group input:disabled,
.srq-form-group textarea:disabled {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

.srq-form-intro {
    margin-bottom: 20px;
    color: #666;
}

/* Messages */
.srq-message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.srq-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.srq-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.srq-message-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.srq-message-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
    color: inherit;
    opacity: 0.7;
}

.srq-message-close:hover {
    opacity: 1;
}

/* Modal Details Specific */
.srq-details-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.srq-details-image {
    width: 100%;
    height: 400px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
}

.srq-details-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.srq-no-image-large {
    font-size: 72px;
    color: #999;
}

.srq-details-info h2 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 28px;
}

.srq-details-specs {
    margin-bottom: 30px;
}

.srq-spec-item {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    font-size: 16px;
}

.srq-spec-item:last-child {
    border-bottom: none;
}

.srq-spec-item strong {
    display: inline-block;
    width: 120px;
    color: #666;
}

/* Detalles de precios en modal */
.srq-price-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 5px;
}

.srq-price-large-uf {
    font-size: 24px;
    font-weight: bold;
    color: #007cba;
}

.srq-price-large-clp {
    font-size: 20px;
    font-weight: 600;
    color: #28a745;
}

.srq-text-success {
    color: #28a745;
    font-weight: bold;
}

.srq-text-danger {
    color: #dc3545;
    font-weight: bold;
}

.srq-details-actions {
    margin-top: 30px;
}

.srq-hidden {
    display: none !important;
}

/* Información de UF */
.srq-uf-info {
    background: #e3f2fd;
    color: #1565c0;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
    margin-top: 10px;
    border: 1px solid #bbdefb;
}

/* Indicador de divisa */
.srq-currency-indicator {
    display: inline-block;
    padding: 2px 6px;
    background: #e9ecef;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    color: #495057;
    margin-left: 5px;
    vertical-align: super;
}

/* Estado de carga de precios */
.srq-price-loading {
    color: #6c757d;
    font-style: italic;
    font-size: 14px;
}

.srq-price-error {
    color: #dc3545;
    font-size: 14px;
}

/* Comparador de precios (opcional) */
.srq-price-compare {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin: 10px 0;
}

.srq-price-compare-uf {
    font-weight: bold;
    color: #007cba;
}

.srq-price-compare-clp {
    font-weight: bold;
    color: #28a745;
}

.srq-price-compare-arrow {
    color: #6c757d;
    font-size: 16px;
}

/* Badge para mostrar conversión */
.srq-conversion-badge {
    background: linear-gradient(45deg, #007cba, #28a745);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 8px;
    display: inline-block;
}

/* Resaltado de precio principal */
.srq-price-highlight {
    background: linear-gradient(135deg, #007cba 0%, #0056b3 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin: 15px 0;
    box-shadow: 0 4px 8px rgba(0, 124, 186, 0.3);
}

.srq-price-highlight .srq-price-uf {
    font-size: 22px;
    color: white;
    margin-bottom: 5px;
}

.srq-price-highlight .srq-price-clp {
    font-size: 18px;
    color: #e8f5e8;
}

/* Tooltip para información de UF */
.srq-uf-tooltip {
    position: relative;
    cursor: help;
}

.srq-uf-tooltip:hover::after {
    content: "Valor UF al " attr(data-date) ": " attr(data-value);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
}

.srq-uf-tooltip:hover::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
}

/* Animaciones para cambios de precio */
@keyframes priceUpdate {
    0% {
        background-color: #fff3cd;
        transform: scale(1.02);
    }
    100% {
        background-color: transparent;
        transform: scale(1);
    }
}

.srq-price-updated {
    animation: priceUpdate 0.5s ease-out;
}

/* Indicador de moneda flotante */
.srq-currency-float {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border: 2px solid #007cba;
    border-radius: 8px;
    padding: 10px 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 999;
    font-size: 14px;
}

.srq-currency-float .srq-uf-label {
    font-weight: bold;
    color: #007cba;
}

.srq-currency-float .srq-uf-value {
    color: #28a745;
    font-weight: bold;
}

.srq-currency-float .srq-uf-date {
    font-size: 11px;
    color: #6c757d;
    margin-top: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    .srq-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .srq-filters {
        flex-direction: column;
    }
    
    .srq-filter-group {
        width: 100%;
    }
    
    .srq-filter-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .srq-filter-actions .srq-btn {
        width: 100%;
    }
    
    .srq-units-grid {
        grid-template-columns: 1fr;
    }
    
    .srq-modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .srq-modal-footer {
        flex-direction: column;
    }
    
    .srq-modal-footer .srq-btn {
        width: 100%;
    }
    
    .srq-cart-item {
        flex-direction: column;
        text-align: center;
    }
    
    .srq-cart-item-image {
        width: 80px;
        height: 80px;
    }
    
    .srq-details-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .srq-details-image {
        height: 250px;
    }
    
    .srq-modal-large {
        max-width: 95%;
    }
    
    .srq-spec-item {
        font-size: 14px;
    }
    
    .srq-spec-item strong {
        width: 100px;
    }
    
    /* Responsive para precios */
    .srq-price-details {
        text-align: center;
    }
    
    .srq-price-large-uf {
        font-size: 20px;
    }
    
    .srq-price-large-clp {
        font-size: 16px;
    }
    
    .srq-cart-total {
        font-size: 18px;
    }
    
    .srq-price-compare {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    
    .srq-price-compare-arrow {
        transform: rotate(90deg);
    }
    
    .srq-currency-float {
        position: relative;
        top: auto;
        right: auto;
        margin: 10px 0;
        width: 100%;
        text-align: center;
    }

	.srq-price-consultation {
    font-size: 16px;
    font-weight: bold;
    color: #6c757d;
    text-align: center;
    font-style: italic;
    padding: 5px 0;
	}

}