/**
 * Produtoshow - Estilos Gerais (Porta 8105)
 * Tema: vivo / vitrine de produtos
 */

/* === RESET E BASE === */
:root {
    --ps-primary: #ff6b35;
    --ps-primary-dark: #e85520;
    --ps-bg: #f7f7f9;
    --ps-surface: #ffffff;
    --ps-text: #1f2937;
    --ps-muted: #6b7280;
    --ps-border: #e5e7eb;
    --ps-radius: 14px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    min-height: 100%;
    background-color: var(--ps-bg);
    color: var(--ps-text);
    font-family: 'Inter', 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

a {
    color: var(--ps-primary);
    text-decoration: none;
}

/* === LOGIN === */
body.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #fff5f0 0%, var(--ps-bg) 100%);
}

.ps-login-card {
    background: var(--ps-surface);
    border: 1px solid var(--ps-border);
    border-radius: var(--ps-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    padding: 40px 32px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.ps-login-card img,
.ps-login-logo {
    max-height: 72px;
    width: auto;
    margin-bottom: 16px;
}

.ps-login-card h1 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.ps-login-card .ps-subtitle {
    color: var(--ps-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

/* === LAYOUT APP === */
.ps-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--ps-surface);
    border-bottom: 1px solid var(--ps-border);
    padding: 10px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.ps-topbar .ps-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.05rem;
}

.ps-topbar .ps-brand img {
    height: 36px;
    width: auto;
}

.ps-topbar .ps-user {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ps-muted);
    font-size: 0.9rem;
}

.ps-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px;
}

/* === HOME === */
.ps-home {
    display: flex;
    justify-content: center;
    padding: 48px 16px;
}

.ps-card {
    background: var(--ps-surface);
    border: 1px solid var(--ps-border);
    border-radius: var(--ps-radius);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.05);
    padding: 40px;
    text-align: center;
    width: 100%;
    max-width: 520px;
}

.ps-home-logo {
    max-height: 80px;
    margin-bottom: 16px;
}

.ps-card h1 {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.ps-muted {
    color: var(--ps-muted);
}

/* === BOTÕES === */
.ps-btn {
    display: inline-block;
    background: var(--ps-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.ps-btn:hover {
    background: var(--ps-primary-dark);
}

.ps-btn-outline {
    background: transparent;
    color: var(--ps-primary);
    border: 1px solid var(--ps-primary);
}

.ps-btn-outline:hover {
    background: var(--ps-primary);
    color: #fff;
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #c4c4c4;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* === MODAIS NEGÓCIO-CONTA (Negócio Protagonista) === */
.modal-negocio-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-negocio-content {
    background: var(--ps-surface);
    border-radius: var(--ps-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-negocio-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--ps-border);
}

.modal-negocio-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ps-text);
    margin: 0;
}

.modal-negocio-body {
    padding: 24px;
    color: var(--ps-text);
    line-height: 1.6;
}

.modal-negocio-body p {
    margin-bottom: 12px;
}

.modal-negocio-body p:last-child {
    margin-bottom: 0;
}

.modal-negocio-card {
    background: var(--ps-bg);
    border: 1px solid var(--ps-border);
    border-radius: 10px;
    padding: 16px;
    margin: 16px 0;
    text-align: left;
}

.modal-negocio-card strong {
    color: var(--ps-text);
    font-size: 1rem;
}

.modal-negocio-card small {
    color: var(--ps-muted);
    font-size: 0.85rem;
}

.modal-negocio-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--ps-border);
    border-radius: 10px;
    font-size: 0.95rem;
    background: var(--ps-surface);
    color: var(--ps-text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    margin-top: 8px;
}

.modal-negocio-select:focus {
    border-color: var(--ps-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.modal-negocio-footer {
    display: flex;
    gap: 10px;
    padding: 16px 24px 24px;
    border-top: 1px solid var(--ps-border);
    justify-content: flex-end;
    flex-wrap: wrap;
}

.modal-negocio-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: inherit;
    white-space: nowrap;
}

.modal-negocio-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.modal-negocio-btn-confirmar {
    background: var(--ps-primary);
    color: #fff;
}

.modal-negocio-btn-confirmar:hover:not(:disabled) {
    background: var(--ps-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.modal-negocio-btn-cancelar {
    background: transparent;
    color: var(--ps-muted);
    border: 1px solid var(--ps-border);
}

.modal-negocio-btn-cancelar:hover {
    background: var(--ps-bg);
    color: var(--ps-text);
    border-color: var(--ps-muted);
}

.modal-negocio-btn-outline {
    background: transparent;
    color: var(--ps-primary);
    border: 1px solid var(--ps-primary);
}

.modal-negocio-btn-outline:hover {
    background: var(--ps-primary);
    color: #fff;
}

#box-negocio-logo-placeholder:hover {
    border-color: #ff6b35 !important;
    background: #ffede3 !important;
    transform: scale(1.02);
}

/* Thumb 1:1 do modal de upload */
.upload-thumb {
    width: 160px;
    height: 160px;
    margin: 15px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f8f9fa;
    border: 2px dashed var(--ps-muted, #ccc);
    border-radius: 10px;
}

.upload-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.upload-thumb-placeholder {
    font-size: 0.78rem;
    color: #999;
    padding: 0 10px;
    text-align: center;
}

/* Selects de visibilidade/origem do modal de upload */
.upload-opcoes {
    max-width: 240px;
    margin: 15px auto 0;
    text-align: left;
}

.upload-opcoes-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ps-text, #555);
    margin-bottom: 4px;
}

.upload-opcoes select {
    margin-bottom: 10px;
}

.upload-opcoes select:last-child {
    margin-bottom: 0;
}

/* Toast notifications */
.bf-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 11000;
    animation: bf-toast-slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.bf-toast-success {
    background: #22c55e;
    color: #fff;
}

.bf-toast-error {
    background: #ef4444;
    color: #fff;
}

@keyframes bf-toast-slide-in {
    from {
        opacity: 0;
        transform: translateX(100px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* SweetAlert2 customização para tema Produtoshow */
.swal2-container {
    z-index: 20050 !important;
}

.swal2-popup {
    border-radius: var(--ps-radius) !important;
    font-family: 'Inter', 'Segoe UI', Roboto, Arial, sans-serif !important;
}

.swal2-confirm {
    background: var(--ps-primary) !important;
    border-radius: 8px !important;
    padding: 10px 24px !important;
    font-weight: 600 !important;
}

.swal2-confirm:hover {
    background: var(--ps-primary-dark) !important;
}

.swal2-cancel {
    background: transparent !important;
    color: var(--ps-muted) !important;
    border: 1px solid var(--ps-border) !important;
    border-radius: 8px !important;
    padding: 10px 24px !important;
    font-weight: 600 !important;
}

.swal2-cancel:hover {
    background: var(--ps-bg) !important;
    color: var(--ps-text) !important;
}
