/**
 * Sureste Herramientas - Frontend Styles
 */

/* Variables CSS */
:root {
    --sh-color-principal: #2c3e50;
    --sh-color-acento: #e67e22;
    --sh-color-exito: #27ae60;
    --sh-color-alerta: #f39c12;
    --sh-color-error: #e74c3c;
    --sh-color-fondo: #f8f9fa;
    --sh-color-borde: #dee2e6;
    --sh-radio-borde: 6px;
    --sh-sombra: 0 2px 8px rgba(0,0,0,0.08);
    --sh-transicion: all 0.3s ease;
}

/* Badge Personalizable - Loop */
.sh-badge-personalizable {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--sh-color-acento);
    color: #fff;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--sh-radio-borde);
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Badge Personalizable - Single */
.sh-badge-personalizable-single {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--sh-color-principal), var(--sh-color-acento));
    color: #fff;
    padding: 8px 16px;
    border-radius: var(--sh-radio-borde);
    margin-bottom: 15px;
    font-size: 14px;
}

.sh-badge-personalizable-single .sh-icon {
    font-size: 18px;
}

/* Contenedor Personalización */
.sh-personalizacion-container {
    background: var(--sh-color-fondo);
    border: 1px solid var(--sh-color-borde);
    border-radius: var(--sh-radio-borde);
    padding: 20px;
    margin: 20px 0;
}

.sh-personalizacion-titulo {
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--sh-color-acento);
    color: var(--sh-color-principal);
    font-size: 18px;
}

.sh-precio-base-info {
    background: #fff3cd;
    color: #856404;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 13px;
}

/* Campos de Personalización */
.sh-campo-wrap {
    margin-bottom: 20px;
}

.sh-campo-wrap label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--sh-color-principal);
}

.sh-campo-wrap label .required {
    color: var(--sh-color-error);
}

.sh-precio-extra {
    font-size: 12px;
    color: var(--sh-color-acento);
    font-weight: 600;
}

.sh-campo-input,
.sh-campo-textarea,
.sh-campo-select,
.sh-campo-number,
.sh-campo-date {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--sh-color-borde);
    border-radius: var(--sh-radio-borde);
    font-size: 14px;
    transition: var(--sh-transicion);
}

.sh-campo-input:focus,
.sh-campo-textarea:focus,
.sh-campo-select:focus,
.sh-campo-number:focus,
.sh-campo-date:focus {
    border-color: var(--sh-color-acento);
    outline: none;
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.1);
}

.sh-campo-textarea {
    resize: vertical;
    min-height: 80px;
}

.sh-campo-color {
    width: 60px;
    height: 40px;
    padding: 2px;
    border: 1px solid var(--sh-color-borde);
    border-radius: var(--sh-radio-borde);
    cursor: pointer;
}

.sh-campo-file {
    padding: 10px;
    background: #fff;
    border: 2px dashed var(--sh-color-borde);
    border-radius: var(--sh-radio-borde);
    cursor: pointer;
    transition: var(--sh-transicion);
}

.sh-campo-file:hover {
    border-color: var(--sh-color-acento);
}

.sh-checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-weight: normal !important;
    cursor: pointer;
}

.sh-campo-descripcion {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #6c757d;
}

/* Info Reservas en Checkout */
.sh-info-acumulados td {
    padding: 0 !important;
}

.sh-reservas-notice {
    background: linear-gradient(135deg, #fdf7e3 0%, #fff9e6 100%);
    border: 1px solid #ebd893;
    border-radius: var(--sh-radio-borde);
    padding: 15px;
}

.sh-reservas-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 15px;
}

.sh-reservas-header .sh-icon {
    font-size: 20px;
}

.sh-reservas-totales {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 12px;
}

.sh-total-item {
    background: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
}

.sh-total-item.sh-falta {
    background: #fff3cd;
    color: #856404;
}

.sh-total-item.sh-gratis {
    background: #d4edda;
    color: #155724;
}

.sh-reservas-instrucciones {
    margin: 0;
    font-size: 13px;
    color: #6c757d;
    line-height: 1.5;
}

/* Carrito - Personalización */
.sh-color-muestra {
    display: inline-block;
    width: 20px;
    height: 20px;
    vertical-align: middle;
    border: 1px solid #ccc;
    border-radius: 3px;
    margin-right: 5px;
}

.sh-mini-cart-personalizado {
    margin-left: 5px;
    font-size: 14px;
}

/* Cuenta - Reservas */
.sh-cuenta-reservas {
    background: var(--sh-color-fondo);
    border: 1px solid var(--sh-color-borde);
    border-radius: var(--sh-radio-borde);
    padding: 20px;
    margin-bottom: 30px;
}

.sh-cuenta-reservas h3 {
    margin: 0 0 15px;
    color: var(--sh-color-principal);
}

.sh-reservas-info {
    margin-bottom: 15px;
}

.sh-falta-envio {
    color: var(--sh-color-alerta);
    font-weight: 600;
}

.sh-envio-gratis {
    color: var(--sh-color-exito);
    font-weight: 600;
}

/* Mis Reservas */
.sh-mis-reservas h2 {
    margin-bottom: 20px;
    color: var(--sh-color-principal);
}

.sh-reservas-resumen {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.sh-resumen-card {
    flex: 1;
    min-width: 150px;
    background: #fff;
    border: 1px solid var(--sh-color-borde);
    border-radius: var(--sh-radio-borde);
    padding: 20px;
    text-align: center;
}

.sh-resumen-card.sh-envio-ok {
    background: #d4edda;
    border-color: #c3e6cb;
}

.sh-resumen-numero {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--sh-color-principal);
    margin-bottom: 5px;
}

.sh-resumen-label {
    font-size: 13px;
    color: #6c757d;
}

.sh-reservas-acciones {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Shortcode Reservas */
.sh-shortcode-reservas {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--sh-color-fondo);
    padding: 10px 15px;
    border-radius: var(--sh-radio-borde);
}

.sh-reservas-mini {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sh-reservas-mini .sh-icon {
    font-size: 20px;
}

.sh-reservas-mini .sh-cantidad {
    font-weight: 700;
    color: var(--sh-color-principal);
}

.sh-reservas-mini .sh-total {
    font-weight: 600;
    color: var(--sh-color-acento);
}

.sh-envio-gratis-badge {
    background: var(--sh-color-exito);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Upload Progress */
.sh-upload-progress {
    margin-top: 8px;
}

.sh-upload-progress-bar {
    height: 4px;
    background: var(--sh-color-borde);
    border-radius: 2px;
    overflow: hidden;
}

.sh-upload-progress-fill {
    height: 100%;
    background: var(--sh-color-acento);
    width: 0;
    transition: width 0.3s ease;
}

.sh-upload-success {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 12px;
    background: #d4edda;
    color: #155724;
    border-radius: 4px;
    font-size: 13px;
}

.sh-upload-error {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    font-size: 13px;
}

/* Precio Dinámico */
.sh-precio-calculado {
    background: var(--sh-color-principal);
    color: #fff;
    padding: 15px;
    border-radius: var(--sh-radio-borde);
    margin-top: 15px;
    text-align: center;
}

.sh-precio-calculado .sh-precio-label {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 5px;
}

.sh-precio-calculado .sh-precio-valor {
    font-size: 24px;
    font-weight: 700;
}

.sh-precio-calculado .sh-precio-detalle {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .sh-reservas-resumen {
        flex-direction: column;
    }
    
    .sh-resumen-card {
        min-width: 100%;
    }
    
    .sh-reservas-totales {
        flex-direction: column;
    }
    
    .sh-reservas-acciones {
        flex-direction: column;
    }
    
    .sh-reservas-acciones .button {
        text-align: center;
    }
}

/* Animaciones */
@keyframes sh-fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.sh-animate-in {
    animation: sh-fadeIn 0.3s ease;
}

/* Estados de validación */
.sh-campo-wrap.sh-error .sh-campo-input,
.sh-campo-wrap.sh-error .sh-campo-textarea,
.sh-campo-wrap.sh-error .sh-campo-select {
    border-color: var(--sh-color-error);
}

.sh-campo-wrap.sh-error .sh-campo-descripcion {
    color: var(--sh-color-error);
}

.sh-campo-wrap.sh-valid .sh-campo-input,
.sh-campo-wrap.sh-valid .sh-campo-textarea,
.sh-campo-wrap.sh-valid .sh-campo-select {
    border-color: var(--sh-color-exito);
}

/* Loading */
.sh-loading {
    position: relative;
    pointer-events: none;
}

.sh-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--sh-color-borde);
    border-top-color: var(--sh-color-acento);
    border-radius: 50%;
    animation: sh-spin 0.8s linear infinite;
}

@keyframes sh-spin {
    to { transform: rotate(360deg); }
}
