/* Smart Space Fit - Estilos Principales v1.4.0 */

/* ========== WRAPPER ========== */
.ssf-simulator-wrapper {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* ========== HEADER ========== */
.ssf-header {
    text-align: center;
    margin-bottom: 30px;
}

.ssf-header h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    color: #333;
}

.ssf-header p {
    margin: 0;
    color: #666;
}

.ssf-tooltip-hint {
    margin-top: 10px !important;
    font-size: 14px;
    color: #2271b1;
}

/* ========== CONTROLS ========== */
.ssf-controls {
    margin-bottom: 20px;
}

.ssf-space-inputs,
.ssf-product-inputs {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
}

.ssf-space-inputs h3,
.ssf-product-inputs h3 {
    margin: 0 0 15px 0;
    color: #333;
}

.ssf-input-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ssf-input-group input,
.ssf-input-group select {
    flex: 1;
    min-width: 150px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* ========== BUTTONS ========== */
.ssf-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    background: #2271b1;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.ssf-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.ssf-btn.active {
    background: #27ae60;
}

.ssf-btn-primary {
    background: #2271b1;
}

.ssf-btn-success {
    background: #27ae60;
}

.ssf-btn-danger {
    background: #e74c3c;
}

.ssf-btn-info {
    background: #3498db;
}

.ssf-btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.ssf-btn i.dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* ========== TEMPLATES ========== */
.ssf-templates {
    margin: 15px 0;
    padding: 15px;
    background: #f0f8ff;
    border-radius: 6px;
}

.ssf-templates h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.ssf-template-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ssf-template-btn {
    padding: 8px 15px;
    border: 2px solid #3498db;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.ssf-template-btn:hover {
    background: #3498db;
    color: white;
    transform: scale(1.05);
}

/* ========== TOOLBAR ========== */
.ssf-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* ========== VISUALIZATION ========== */
.ssf-visualization {
    position: relative;
    margin: 20px 0;
    min-height: 600px;
}

#ssf-canvas {
    width: 100%;
    height: 600px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #f5f5f5;
    cursor: default;
}

/* ========== PRODUCT TOOLTIP (NEW in v1.4.0) ========== */
.ssf-product-tooltip {
    position: fixed;
    z-index: 99999;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    padding: 0;
    max-width: 280px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.ssf-product-tooltip:not([style*="display: none"]) {
    opacity: 1;
}

.ssf-product-tooltip img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    display: block;
}

.ssf-tooltip-info {
    padding: 12px 15px;
    background: white;
    border-radius: 0 0 8px 8px;
}

.ssf-tooltip-info strong {
    display: block;
    color: #333;
    font-size: 15px;
    margin-bottom: 5px;
    line-height: 1.3;
}

.ssf-tooltip-info span {
    display: block;
    color: #666;
    font-size: 13px;
}

.ssf-tooltip-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    display: none; /* Simplified design without arrow */
}

/* ========== PRODUCTS LIST ========== */
.ssf-products-list {
    margin-top: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
}

.ssf-products-list h3 {
    margin: 0 0 15px 0;
    color: #333;
}

.ssf-empty-state {
    text-align: center;
    color: #999;
    padding: 20px;
}

.ssf-products {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ssf-product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin: 5px 0;
    background: white;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    transition: all 0.2s;
}

.ssf-product-item:hover {
    border-color: #2271b1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ssf-product-name {
    flex: 1;
    color: #333;
}

.ssf-product-actions {
    display: flex;
    gap: 5px;
}

/* ========== FIT RESULT ========== */
.ssf-fit-result {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 9999;
    max-width: 400px;
}

.ssf-fit-result h3 {
    margin: 0 0 15px 0;
    color: #333;
}

.fit-yes {
    color: #27ae60;
    font-weight: 500;
}

.fit-no {
    color: #e74c3c;
    font-weight: 500;
}

/* ========== NOTIFICATIONS ========== */
.ssf-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background: #2271b1;
    color: white;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 99999;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s;
}

.ssf-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.ssf-notif-success {
    background: #27ae60;
}

.ssf-notif-info {
    background: #3498db;
}

.ssf-notif-warning {
    background: #f39c12;
}

.ssf-notif-error {
    background: #e74c3c;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .ssf-simulator-wrapper {
        padding: 10px;
    }
    
    .ssf-input-group {
        flex-direction: column;
    }
    
    .ssf-toolbar {
        justify-content: center;
    }
    
    #ssf-canvas {
        height: 400px;
    }
    
    .ssf-notification {
        right: 10px;
        left: 10px;
        top: 10px;
    }
    
    .ssf-product-tooltip {
        max-width: 240px;
    }
    
    .ssf-product-tooltip img {
        height: 140px;
    }
}

/* ========== LOADING STATE ========== */
.ssf-loading {
    position: relative;
}

.ssf-loading::after {
    content: "Cargando...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255,255,255,0.9);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
