/**
 * Blockchain Subscription Styles
 * Custom styles for CopyrightChains NUT token subscription system
 */

/* Premium Content Badge */
.premium-content-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, var(--ghost-accent-color) 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.premium-content-badge svg {
    width: 16px;
    height: 16px;
}

/* Subscription Status Indicators */
.subscription-status {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    border: 1px solid var(--whitegrey);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 9000;
    max-width: 300px;
}

.subscription-status.hidden {
    display: none;
}

.status-active {
    color: #10b981;
    font-weight: 600;
}

.status-inactive {
    color: #ef4444;
    font-weight: 600;
}

.status-grace-period {
    color: #f59e0b;
    font-weight: 600;
}

/* Balance Display */
.balance-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--whitegrey-l);
    border-radius: 8px;
    margin-top: 0.5rem;
}

.balance-amount {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--ghost-accent-color);
}

.balance-label {
    font-size: 0.875rem;
    color: var(--midgrey);
}

/* Grace Period Warning */
.grace-period-warning {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-left: 4px solid #f59e0b;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
    color: #92400e;
}

.grace-period-warning strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

/* Content Tracking Notifications */
#content-tracker-notifications {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 300px;
}

.tracker-notification {
    background: #10b981;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 0.875rem;
    font-weight: 500;
}

.tracker-notification.error {
    background: #ef4444;
}

.tracker-notification.warning {
    background: #f59e0b;
}

/* Subscription CTA for Non-Subscribers */
.subscription-cta {
    background: linear-gradient(135deg, #667eea 0%, var(--ghost-accent-color) 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    margin: 2rem 0;
}

.subscription-cta h3 {
    color: white;
    margin-bottom: 1rem;
}

.subscription-cta p {
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.subscription-cta .button {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: white;
    color: var(--ghost-accent-color);
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s;
}

.subscription-cta .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Premium Image Overlay */
.premium-image {
    position: relative;
}

.premium-image::before {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: var(--ghost-accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.premium-image::after {
    content: '★';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    z-index: 11;
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .subscription-status {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    #content-tracker-notifications {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .premium-content-badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .subscription-status {
        background: var(--darkgrey);
        border-color: var(--midgrey);
    }

    .balance-display {
        background: rgba(255, 255, 255, 0.05);
    }
}

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Print Styles */
@media print {
    .subscription-status,
    #content-tracker-notifications,
    .subscription-cta,
    .premium-content-badge {
        display: none;
    }
}

/* Premium Content Locking */
.premium-content-wrapper {
    position: relative;
    min-height: 400px;
}

.premium-content {
    transition: filter 0.3s ease;
}

.premium-content.locked {
    filter: blur(5px);
    user-select: none;
    pointer-events: none;
}

.content-lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.content-lock-container {
    text-align: center;
    padding: 3rem 2rem;
    max-width: 500px;
}

.content-lock-icon {
    margin: 0 auto 1.5rem;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.content-lock-icon svg {
    width: 32px;
    height: 32px;
}

.content-lock-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.content-lock-message {
    font-size: 1.125rem;
    color: #4a5568;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.btn-unlock {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-unlock:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.content-lock-subtext {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: #718096;
}

.content-lock-subtext a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.content-lock-subtext a:hover {
    text-decoration: underline;
}

/* Responsive Content Lock */
@media (max-width: 768px) {
    .content-lock-container {
        padding: 2rem 1.5rem;
    }

    .content-lock-title {
        font-size: 1.5rem;
    }

    .content-lock-message {
        font-size: 1rem;
    }

    .btn-unlock {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* Dark Mode Content Lock */
@media (prefers-color-scheme: dark) {
    .content-lock-overlay {
        background: rgba(26, 32, 44, 0.95);
    }

    .content-lock-title {
        color: #f7fafc;
    }

    .content-lock-message {
        color: #cbd5e0;
    }

    .content-lock-subtext {
        color: #a0aec0;
    }
}

/* Premium Card Badge */
.premium-card-image {
    position: relative;
}

.premium-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: rgba(102, 126, 234, 0.95);
    color: white;
    padding: 0.5rem 0.875rem;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.premium-card-badge svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.premium-card-badge span {
    line-height: 1;
}

/* Responsive Premium Card Badge */
@media (max-width: 768px) {
    .premium-card-badge {
        top: 8px;
        right: 8px;
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
    }

    .premium-card-badge svg {
        width: 12px;
        height: 12px;
    }
}
