/* ============================================================
   LVW — SC Enviar a Externo
   ============================================================ */

/* BOTÓN — integrado visualmente con wpsc-filter-actions */
#lvw-ext-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: #2271b1;
    color: #fff !important;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
    line-height: 1.4;
    vertical-align: middle;
    margin-left: 8px;
}

#lvw-ext-btn:hover {
    background: #135e96;
}

/* OVERLAY */
#lvw-ext-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

#lvw-ext-overlay.visible {
    display: flex;
}

/* MODAL */
#lvw-ext-modal {
    background: #fff;
    border-radius: 8px;
    width: 500px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    animation: lvw-ext-appear 0.18s ease;
}

@keyframes lvw-ext-appear {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* HEADER */
#lvw-ext-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

#lvw-ext-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #1d2327;
}

#lvw-ext-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 22px;
    color: #888;
    line-height: 1;
    padding: 0;
    transition: color 0.15s;
}

#lvw-ext-close:hover {
    color: #333;
}

/* BODY */
#lvw-ext-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#lvw-ext-body label {
    font-size: 13px;
    font-weight: 600;
    color: #1d2327;
}

#lvw-ext-body input[type="email"],
#lvw-ext-body textarea,
#lvw-ext-body select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #c8ccd0;
    border-radius: 4px;
    font-size: 14px;
    color: #1d2327;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
    background: #fff;
}

#lvw-ext-body input[type="email"]:focus,
#lvw-ext-body textarea:focus,
#lvw-ext-body select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.15);
}

#lvw-ext-body textarea {
    resize: vertical;
    min-height: 110px;
    margin-bottom: 4px;
}

#lvw-ext-body select {
    margin-bottom: 8px;
    cursor: pointer;
}

.lvw-ext-hint {
    margin: 2px 0 0;
    font-size: 12px;
    color: #888;
}

/* FEEDBACK */
#lvw-ext-feedback {
    margin: 0 20px;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.lvw-ext-success {
    background: #d1e7dd;
    color: #0a3622;
    border: 1px solid #a3cfbb;
}

.lvw-ext-error {
    background: #f8d7da;
    color: #58151c;
    border: 1px solid #f1aeb5;
}

/* FOOTER */
#lvw-ext-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid #eee;
}

#lvw-ext-footer button {
    padding: 8px 18px;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.15s;
}

#lvw-ext-cancel {
    background: #f6f7f7;
    color: #1d2327;
    border-color: #c8ccd0;
}

#lvw-ext-cancel:hover {
    background: #e9e9e9;
}

#lvw-ext-submit {
    background: #2271b1;
    color: #fff;
}

#lvw-ext-submit:hover {
    background: #135e96;
}

#lvw-ext-submit:disabled {
    background: #9bbdd6;
    cursor: not-allowed;
}

/* RESPONSIVE — bottom sheet en móvil */
@media (max-width: 540px) {
    #lvw-ext-overlay.visible {
        align-items: flex-end;
    }

    #lvw-ext-modal {
        width: 100%;
        border-radius: 12px 12px 0 0;
        position: fixed;
        bottom: 0;
        max-height: 85vh;
    }
}
