/* Sus Finanzas Dynamic Pages - Frontend Styles */

/* ============================================
   Vendor Header Bar Styles
   ============================================ */
.sf-vendor-header-bar {
    background: linear-gradient(135deg, #003d82 0%, #0056b3 100%);
    color: #ffffff;
    padding: 15px 0;
    position: relative;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.sf-vendor-header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.sf-vendor-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sf-vendor-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sf-vendor-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.sf-vendor-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.sf-vendor-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sf-vendor-label {
    font-size: 12px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sf-vendor-name {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

.sf-vendor-id {
    font-size: 11px;
    opacity: 0.8;
    font-weight: 500;
}

.sf-vendor-contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sf-vendor-contact-item a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.3s;
}

.sf-vendor-contact-item a:hover {
    opacity: 0.8;
}

.sf-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
}

.sf-icon-phone::before {
    content: "📞";
    font-size: 16px;
}

.sf-icon-email::before {
    content: "✉️";
    font-size: 16px;
}

/* ============================================
   Vendor Footer Info Styles
   ============================================ */
.sf-vendor-footer-info {
    background: #f8f9fa;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 8px;
    border: 2px solid #003d82;
}

.sf-vendor-footer-info h3 {
    color: #003d82;
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: 700;
}

.sf-vendor-footer-details {
    display: flex;
    align-items: center;
    gap: 25px;
}

.sf-vendor-footer-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #003d82;
    flex-shrink: 0;
}

.sf-vendor-footer-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sf-vendor-footer-contact {
    flex: 1;
}

.sf-vendor-footer-name {
    font-size: 20px;
    color: #003d82;
    margin: 0 0 8px;
}

.sf-vendor-footer-id {
    font-size: 14px;
    color: #666;
    margin: 0 0 12px;
}

.sf-vendor-footer-phone,
.sf-vendor-footer-email {
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sf-vendor-footer-phone a,
.sf-vendor-footer-email a {
    color: #003d82;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.sf-vendor-footer-phone a:hover,
.sf-vendor-footer-email a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* ============================================
   Contact Form Styles
   ============================================ */
.sf-contact-form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.sf-contact-form-title {
    margin-top: 0;
    margin-bottom: 25px;
    color: #333;
    font-size: 28px;
    text-align: center;
}

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

.sf-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.sf-form-group .required {
    color: #e74c3c;
}

.sf-form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.sf-form-control:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.1);
}

.sf-submit-btn {
    width: 100%;
    padding: 15px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.sf-submit-btn:hover {
    background: #005a87;
}

.sf-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.sf-form-messages {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 4px;
    display: none;
}

.sf-form-messages.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    display: block;
}

.sf-form-messages.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    display: block;
}

/* Vendor Info Widget Styles */
.sf-vendor-info {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
}

/* ── Vertical layout ───────────────────────────────────────────────────── */
.sf-vendor-info-vertical {
    flex-direction: column;
    align-items: stretch;
}

/* Fila 1: foto a la izquierda, nombre+ID a la derecha */
.sf-vendor-info-vertical .sf-vendor-top {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.sf-vendor-info-vertical .sf-vendor-top .sf-vendor-col-1 {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
}

/* Fila 2: teléfono y email en la misma fila */
.sf-vendor-info-vertical .sf-vendor-bottom {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px 16px;
    align-items: center;
}

.sf-vendor-photo-svg {
    display: block;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.sf-vendor-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 16px;
    flex: 1;
    min-width: 0;
}

.sf-vendor-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.sf-vendor-contact-item {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.sf-vendor-contact-item a,
.sf-vendor-contact-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sf-vendor-name {
    margin: 0;
    white-space: nowrap;
}

.sf-vendor-icon {
    flex-shrink: 0;
    display: inline-block;
    color: #FDC400;
    fill: #FDC400;
}

.sf-vendor-email a,
.sf-vendor-phone a {
    text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
    /* Vendor Header Responsive */
    .sf-vendor-header-bar {
        padding: 10px 0;
    }
    
    .sf-vendor-header-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .sf-vendor-header-left {
        width: 100%;
        justify-content: center;
    }
    
    .sf-vendor-header-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .sf-vendor-photo {
        width: 50px;
        height: 50px;
    }
    
    .sf-vendor-name {
        font-size: 16px;
    }
    
    .sf-vendor-contact-item {
        font-size: 13px;
    }
    
    /* Vendor Footer Responsive */
    .sf-vendor-footer-info {
        padding: 20px;
    }
    
    .sf-vendor-footer-details {
        flex-direction: column;
        text-align: center;
    }
    
    .sf-vendor-footer-photo {
        width: 80px;
        height: 80px;
    }
    
    /* Contact Form Responsive */
    .sf-contact-form-wrapper {
        padding: 20px;
    }
    
    .sf-vendor-info-horizontal {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .sf-vendor-header-right {
        flex-direction: column;
        gap: 8px;
    }

    .sf-vendor-contact-item a {
        font-size: 13px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Widget: Formulario de Contacto Vendedor (Nombre + WhatsApp)
   ═══════════════════════════════════════════════════════════════════════════ */

.sf-vcf-wrapper {
    width: 100%;
}

/* Fila de campos */
.sf-vcf-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Dos columnas */
.sf-vcf-fields.sf-vcf-cols-2 .sf-vcf-field {
    flex: 1 1 0;
    min-width: 0;
}

/* Una columna */
.sf-vcf-fields.sf-vcf-cols-1 .sf-vcf-field {
    flex: 0 0 100%;
    width: 100%;
}

/* Campo individual */
.sf-vcf-field {
    display: flex;
    flex-direction: column;
}

.sf-vcf-field input {
    width: 100%;
    display: block;
    box-sizing: border-box;
    outline: none;
    border: none;
    background-color: #f0f0f0;
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 15px;
    color: #333;
    transition: background-color 0.2s;
}

.sf-vcf-field input::placeholder {
    color: #999;
}

.sf-vcf-field input:focus {
    background-color: #e8e8e8;
}

/* Etiqueta */
.sf-vcf-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #555;
}

/* Botón */
.sf-vcf-submit {
    margin-top: 12px;
}

.sf-vcf-align-left   { text-align: left;   }
.sf-vcf-align-center { text-align: center; }
.sf-vcf-align-right  { text-align: right;  }

.sf-vcf-btn {
    display: inline-block;
    cursor: pointer;
    border: none;
    background-color: #1e3a8a;
    color: #ffffff;
    border-radius: 10px;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    transition: background-color 0.2s ease;
}

.sf-vcf-btn:hover {
    opacity: 0.9;
}

.sf-vcf-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sf-vcf-btn-fullwidth {
    width: 100%;
    display: block;
    text-align: center;
}

/* Mensajes de éxito/error */
.sf-vcf-messages {
    display: none;
    margin-bottom: 12px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.sf-vcf-messages.success {
    display: block;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.sf-vcf-messages.error {
    display: block;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive: apilar a una columna en móvil */
@media (max-width: 600px) {
    .sf-vcf-fields.sf-vcf-cols-2 .sf-vcf-field {
        flex: 0 0 100%;
    }
}
