/**
 * Content Access Protection
 * Estilos para conteúdos protegidos por tokens
 */

/* Conteúdo protegido - estilo de cursor */
.protected-content-access {
    cursor: help !important;
    position: relative;
}

.protected-content-access::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 10;
    cursor: pointer;
}

/* Conteúdo desbloqueado */
.content-unlocked {
    cursor: auto !important;
}

.content-unlocked::before {
    display: none;
}

/* Breadcrumb - Token cost */
.breadcrumb-token-cost {
    margin-left: 12px;
    font-size: 0.85em;
    color: #f59e0b;
    font-weight: 600;
    cursor: help;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.breadcrumb-token-cost:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8em;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Toast de sucesso */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Modal de confirmação */
.content-access-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    overflow-y: auto;
    padding: 20px;
    /* Garantir que o modal está sempre visível na viewport */
    overscroll-behavior: contain;
}

/* Container do modal para centralização perfeita */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    overflow-y: auto;
    padding: 20px;
    overscroll-behavior: contain;
}

.modal-content-access {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    /* Centralizar na viewport atual */
    margin: auto;
    position: relative;
}

.modal-header {
    margin-bottom: 20px;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.modal-body {
    margin-bottom: 24px;
}

.modal-info-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.modal-info-label {
    color: #6b7280;
    font-weight: 500;
}

.modal-info-value {
    color: #1f2937;
    font-weight: 600;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-confirm,
.btn-cancel {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    transition: all 0.2s;
}

.btn-confirm {
    background: #10b981;
    color: white;
}

.btn-confirm:hover {
    background: #059669;
}

.btn-confirm:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.btn-cancel {
    background: #e5e7eb;
    color: #374151;
}

.btn-cancel:hover {
    background: #d1d5db;
}

/* Responsive */
@media (max-width: 640px) {
    .modal-content-access {
        padding: 20px;
    }

    .modal-title {
        font-size: 1.25rem;
    }

    .modal-footer {
        flex-direction: column;
    }

    .btn-confirm,
    .btn-cancel {
        width: 100%;
    }
}
