/**
 * Premium Lock Styles
 * Styles für gesperrte Premium-Inhalte mit Blur-Effekt
 */

/* Custom Font Size */
.text-13 {
    font-size: 13px;
}

/* Locked Content - Basis-Styles */
.locked-content {
    position: relative;
    display: inline-block;
    min-width: 70px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Blur-Wrapper für den verwischten Inhalt */
.blur-wrapper {
    filter: blur(5px);
    opacity: 0.4;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none;
}

/* Fake-Wert für den Blur-Effekt */
.fake-value {
    color: #6b7280;
    font-weight: 500;
    font-size: 13px;
}

/* Lock-Overlay mit Icon und Text */
.lock-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.95);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    white-space: nowrap;
    font-size: 11px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Lock Icon */
.lock-overlay svg {
    width: 12px;
    height: 12px;
}

/* Unterschiedliche Styles für Free vs Premium */
.locked-free .lock-overlay {
    color: #10b981;
    border-color: #10b981;
}

.locked-premium .lock-overlay {
    color: #f59e0b;
    border-color: #f59e0b;
}

/* Link-Styles für klickbare Locks */
a.locked-content {
    text-decoration: none;
    color: inherit;
}

/* Hover-Effekte */
.locked-content:hover {
    transform: scale(1.05);
}

.locked-content:hover .blur-wrapper {
    filter: blur(8px);
    opacity: 0.3;
}

.locked-content:hover .lock-overlay {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Tooltip bei Hover */
.locked-content::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: #1f2937;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: normal;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    margin-bottom: 8px;
    z-index: 1000;
}

.locked-content:hover::after {
    transform: translateX(-50%) scale(1);
    opacity: 1;
}

/* Tooltip-Pfeil */
.locked-content::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) scale(0);
    border: 5px solid transparent;
    border-top-color: #1f2937;
    opacity: 0;
    transition: all 0.3s ease;
    margin-bottom: 3px;
    z-index: 1001;
}

.locked-content:hover::before {
    transform: translateX(-50%) scale(1);
    opacity: 1;
}

/* Spezifische Tooltips */
.locked-free::after {
    content: "Kostenlos registrieren für Zugriff";
}

.locked-premium::after {
    content: "Premium-Abo für vollen Zugriff";
}

/* Premium CTA Banner */
.premium-cta-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 24px;
    border-radius: 12px;
    margin: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.25);
    position: relative;
    overflow: hidden;
}

.premium-cta-banner::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

.premium-cta-content {
    position: relative;
    z-index: 1;
}

.premium-cta-content h3 {
    margin: 0 0 8px 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.premium-cta-content p {
    margin: 0;
    opacity: 0.95;
    font-size: 0.95rem;
}

.premium-cta-button {
    background: white;
    color: #667eea;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.premium-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    background: #f8f9ff;
}

/* DiviScore Badge Styles */
.diviscore-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.2s ease;
}

.diviscore-high {
    background: #dcfce7;
    color: #166534;
}

.diviscore-medium {
    background: #fef3c7;
    color: #92400e;
}

.diviscore-low {
    background: #fee2e2;
    color: #991b1b;
}

.diviscore-none {
    background: #f3f4f6;
    color: #9ca3af;
}

/* In Tabellen - kompaktere Darstellung */
td .locked-content {
    min-width: 60px;
}

td .lock-overlay {
    font-size: 10px;
    padding: 2px 6px;
}

td .diviscore-badge {
    font-size: 12px;
    padding: 3px 8px;
}

/* Wert-Styles für normale Anzeige */
.value-positive {
    color: #059669;
    font-weight: 500;
}

.value-negative {
    color: #dc2626;
    font-weight: 500;
}

.value-neutral {
    color: #6b7280;
    font-weight: 500;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .premium-cta-banner {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
    }
    
    .premium-cta-content {
        margin-bottom: 16px;
    }
    
    .premium-cta-button {
        width: 100%;
        max-width: 280px;
    }
    
    .locked-content::after,
    .locked-content::before {
        display: none; /* Tooltips auf Mobile ausblenden */
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .lock-overlay {
        background: rgba(31, 41, 55, 0.95);
        color: #e5e7eb;
        border-color: #4b5563;
    }
    
    .locked-free .lock-overlay {
        color: #34d399;
        border-color: #34d399;
    }
    
    .locked-premium .lock-overlay {
        color: #fbbf24;
        border-color: #fbbf24;
    }
    
    .fake-value {
        color: #9ca3af;
    }
}

/* Animation für Premium-Hinweis */
@keyframes pulse-premium {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.highlight-premium {
    animation: pulse-premium 2s ease-in-out infinite;
}

/* Loading State für zukünftige AJAX-Calls */
.loading-premium {
    position: relative;
    opacity: 0.6;
}

.loading-premium::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #667eea;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ============================================
   Feature Preview Modal Styles
   ============================================ */

.feature-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.feature-modal.hidden {
    display: none;
}

/* Modal Overlay (dark background) */
.feature-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(2px);
    animation: fadeIn 0.2s ease;
}

/* Modal Content Box */
.feature-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    animation: slideUp 0.3s ease;
    z-index: 10000;
}

/* Close Button */
.feature-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #6b7280;
    font-size: 16px;
    z-index: 10001;
}

.feature-modal-close:hover {
    background: #e5e7eb;
    color: #111827;
    transform: scale(1.1);
}

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

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

/* Responsive */
@media (max-width: 640px) {
    .feature-modal-content {
        padding: 24px;
        max-height: 85vh;
    }

    .feature-modal-close {
        top: 12px;
        right: 12px;
    }
}

/* Scrollbar styling for modal content */
.feature-modal-content::-webkit-scrollbar {
    width: 8px;
}

.feature-modal-content::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 4px;
}

.feature-modal-content::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.feature-modal-content::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}