/* css/painel.css */

.painel-main {
    padding: 60px 0;
    min-height: calc(100dvh - 80px);
    min-height: calc(100vh - 80px); /* Fallback */
    position: relative;
    z-index: 1;
}

.painel-header {
    margin-bottom: 40px;
}

.painel-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: 'Playfair Display', serif;
}

.painel-header p {
    color: var(--muted-foreground);
}

.painel-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--muted-foreground);
    padding: 12px 16px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: var(--foreground);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

.presentes-list {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.presentes-list.active {
    display: grid;
}

.presente-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.presente-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.presente-badge {
    background: rgba(255, 77, 109, 0.1);
    color: var(--primary);
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 99px;
    font-weight: 600;
}

.presente-badge.draft {
    background: rgba(255, 255, 255, 0.1);
    color: var(--muted-foreground);
}

.presente-card h3 {
    font-size: 1.25rem;
    margin-top: 8px;
}

.presente-card p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 16px;
}

.presente-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
    border-top: 1px solid var(--glass-border);
    padding-top: 16px;
}

.presente-btn {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.presente-btn-primary {
    background: var(--primary);
    color: #fff;
    border: none;
}
.presente-btn-primary:hover {
    background: var(--primary-dark, #e03153);
    box-shadow: 0 4px 12px rgba(255, 77, 109, 0.3);
}

.presente-btn-outline {
    background: transparent;
    color: var(--foreground);
    border: 1px solid var(--glass-border);
}

.presente-btn-outline:hover {
    background: var(--glass-bg-hover);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--glass-bg);
    border: 1px dashed var(--glass-border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-top: 16px;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--muted-foreground);
}

.nav-user-wrap {
    position: relative;
}

.nav-avatar-btn {
    width: 40px;
    height: 40px;
    border-radius: 20px;
    border: 2px solid var(--primary);
    background: var(--glass-bg);
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   # SKELETON LOADING — Placeholder pulsante enquanto carrega
   ========================================================================== */
.skeleton-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.skeleton-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton-line {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.03) 25%, 
        rgba(255, 255, 255, 0.08) 50%, 
        rgba(255, 255, 255, 0.03) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
}

.skeleton-badge {
    width: 90px;
    height: 24px;
    border-radius: 99px;
}

.skeleton-title {
    width: 60%;
    height: 22px;
}

.skeleton-text {
    width: 40%;
    height: 16px;
}

.skeleton-divider {
    height: 1px;
    background: var(--glass-border);
    margin: 4px 0;
}

.skeleton-actions {
    display: flex;
    gap: 12px;
}

.skeleton-btn {
    flex: 1;
    height: 38px;
    border-radius: 8px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.03) 25%, 
        rgba(255, 255, 255, 0.08) 50%, 
        rgba(255, 255, 255, 0.03) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Cursor pointer para cards interativos */
.presente-card {
    cursor: pointer;
}

/* ==========================================================================
   # QR CODE SHARING PANEL — Layout Horizontal
   ========================================================================== */

/* Toggle button active state */
.qr-toggle-btn.active {
    background: rgba(255, 77, 109, 0.12) !important;
    border-color: rgba(255, 77, 109, 0.4) !important;
    color: var(--primary) !important;
}

/* QR Share Panel - expandable section */
.qr-share-panel {
    margin-top: 12px;
    border-top: 1px solid var(--glass-border);
    padding-top: 14px;
}

.qr-share-inner {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Horizontal body: QR left, buttons right */
.qr-share-body {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* QR Code image preview */
.qr-share-preview {
    flex-shrink: 0;
}

.qr-share-img-wrap {
    position: relative;
    background: linear-gradient(145deg, #fff, #fff5f7);
    padding: 5px;
    border-radius: 16px;
    background-clip: padding-box;
    outline: 3px solid transparent;
    background-image: linear-gradient(145deg, #fff, #fff5f7);
    box-shadow:
        0 0 0 3px #ff8fab,
        0 8px 28px rgba(255, 77, 109, 0.25),
        0 2px 8px rgba(255, 77, 109, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.qr-share-img-wrap:hover {
    transform: scale(1.05);
    box-shadow:
        0 0 0 3px #ff4d6d,
        0 12px 36px rgba(255, 77, 109, 0.35),
        0 2px 8px rgba(255, 77, 109, 0.2);
}

.qr-share-img {
    width: 120px;
    height: 120px;
    display: block;
    border-radius: 10px;
    padding: 6px;
    background: white;
}

.qr-share-heart {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    box-shadow: 0 2px 10px rgba(255, 77, 109, 0.4);
    border: 2px solid rgba(255, 77, 109, 0.25);
}

/* QR Action Buttons — stacked vertically beside QR */
.qr-share-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.qr-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--foreground);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

.qr-action-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 77, 109, 0.06), transparent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.qr-action-btn:hover {
    background: rgba(255, 77, 109, 0.08);
    border-color: rgba(255, 77, 109, 0.25);
    transform: translateX(3px);
}

.qr-action-btn:hover::before {
    opacity: 1;
}

.qr-action-btn:active {
    transform: translateX(1px) scale(0.98);
}

.qr-action-btn i {
    color: var(--primary);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.qr-action-btn span {
    position: relative;
    z-index: 1;
}

/* Download button special style */
.qr-download-btn {
    background: rgba(255, 77, 109, 0.08);
    border-color: rgba(255, 77, 109, 0.2);
}

.qr-download-btn:hover {
    background: rgba(255, 77, 109, 0.15);
    border-color: rgba(255, 77, 109, 0.4);
    box-shadow: 0 4px 12px rgba(255, 77, 109, 0.12);
}

/* Print button */
.qr-print-btn:hover {
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.04);
}

/* Share button — WhatsApp-style green */
.qr-share-btn {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
    border: none !important;
    color: #fff !important;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.2);
}

.qr-share-btn:hover {
    background: linear-gradient(135deg, #2be06f 0%, #15a08e 100%) !important;
    border: none !important;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
    transform: translateX(3px);
}

.qr-share-btn i {
    color: #fff !important;
}

.qr-share-btn span {
    color: #fff;
}

/* Panel entry animation */
.qr-panel-enter {
    animation: qr-panel-slide-in 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes qr-panel-slide-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   # RESPONSIVIDADE — QR Code Panel
   ========================================================================== */
@media (max-width: 480px) {
    .qr-share-body {
        flex-direction: column;
        align-items: stretch;
    }

    .qr-share-preview {
        display: flex;
        justify-content: center;
    }

    .qr-share-img {
        width: 140px;
        height: 140px;
    }

    .qr-share-img-wrap {
        padding: 10px;
    }

    .qr-action-btn {
        padding: 10px 12px;
        font-size: 0.8rem;
        justify-content: center;
    }

    .presente-actions {
        flex-wrap: wrap;
    }
    
    .presente-actions .presente-btn {
        font-size: 0.8rem;
        padding: 8px;
    }
}

/* ==========================================================================
   # ACESSIBILIDADE: prefers-reduced-motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   # DELETE CONFIRMATION MODAL — Custom styled replacement for browser confirm()
   ========================================================================== */
.delete-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.delete-modal-overlay.active {
    opacity: 1;
}

.delete-modal {
    background: linear-gradient(145deg, rgba(30, 15, 20, 0.98), rgba(20, 8, 12, 0.98));
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 20px;
    padding: 32px 28px 24px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(239, 68, 68, 0.08);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.delete-modal-overlay.active .delete-modal {
    transform: scale(1) translateY(0);
}

.delete-modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    margin-bottom: 16px;
}

.delete-modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}

.delete-modal-text {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.6;
    margin-bottom: 24px;
}

.delete-modal-text strong {
    color: rgba(255, 255, 255, 0.85);
}

.delete-modal-actions {
    display: flex;
    gap: 10px;
}

.delete-modal-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.delete-modal-cancel {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.delete-modal-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.delete-modal-confirm {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    color: #fff;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.delete-modal-confirm:hover {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
}

.delete-modal-confirm:active {
    transform: translateY(0) scale(0.98);
}

/* Delete button hover in card */
.delete-btn:hover {
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.08) !important;
}
