/* EtherTech Subscription Integration Styles */

/* Usage Indicator Styles */
#usage-indicator {
    position: fixed;
    top: 80px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    color: #00ff00;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 12px;
    z-index: 1000;
    border: 1px solid #00ff00;
    box-shadow: 0 4px 12px rgba(0, 255, 0, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

#usage-indicator:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 255, 0, 0.4);
}

/* Upgrade Overlay Styles */
.upgrade-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    z-index: 10;
    border-radius: 4px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.upgrade-overlay:hover {
    background: rgba(0, 0, 0, 0.9);
}

.upgrade-overlay button {
    background: linear-gradient(45deg, #ffc107, #ff8c00);
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.upgrade-overlay button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}

/* Premium Badge Styles */
.premium-badge {
    background: linear-gradient(45deg, #ffc107, #ff8c00);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 1rem;
    animation: premiumGlow 2s ease-in-out infinite alternate;
}

@keyframes premiumGlow {
    from { box-shadow: 0 0 5px rgba(255, 193, 7, 0.3); }
    to { box-shadow: 0 0 15px rgba(255, 193, 7, 0.6); }
}

/* Subscription Plan Cards */
.subscription-plan-card {
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.subscription-plan-card.recommended {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.subscription-plan-card.recommended::before {
    content: 'RECOMMENDED';
    position: absolute;
    top: 15px;
    right: -30px;
    background: var(--primary-color);
    color: white;
    padding: 5px 40px;
    font-size: 0.7rem;
    font-weight: bold;
    transform: rotate(45deg);
    z-index: 1;
}

.subscription-plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Usage Progress Bars */
.usage-progress {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin: 8px 0;
}

.usage-progress-fill {
    height: 100%;
    transition: width 0.5s ease, background-color 0.3s ease;
    border-radius: 4px;
}

.usage-progress-fill.low {
    background: linear-gradient(90deg, #28a745, #20c997);
}

.usage-progress-fill.medium {
    background: linear-gradient(90deg, #ffc107, #fd7e14);
}

.usage-progress-fill.high {
    background: linear-gradient(90deg, #dc3545, #e74c3c);
}

/* Tool Access Status */
.tool-access-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.tool-access-status.full {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.tool-access-status.restricted {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.tool-access-status.blocked {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Dashboard Navigation Enhancement */
.nav__list li a[onclick*="openUserDashboard"] {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white !important;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav__list li a[onclick*="openUserDashboard"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(65, 118, 144, 0.3);
}

/* Subscription Modal Styles */
.subscription-modal {
    backdrop-filter: blur(10px);
}

.subscription-modal .modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.subscription-modal .modal-header {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 12px 12px 0 0;
}

/* Billing History Table */
.billing-table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.billing-table th {
    background: var(--gray-100);
    font-weight: 600;
    border: none;
}

.billing-table td {
    border: none;
    border-bottom: 1px solid var(--gray-200);
}

/* Usage Statistics Cards */
.usage-stat-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.usage-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.usage-stat-number {
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.usage-stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    #usage-indicator {
        top: 60px;
        right: 10px;
        font-size: 10px;
        padding: 8px 12px;
    }
    
    .subscription-plan-card.recommended {
        transform: none;
    }
    
    .upgrade-overlay {
        padding: 1rem;
    }
    
    .upgrade-overlay h3 {
        font-size: 1.2rem;
    }
    
    .upgrade-overlay button {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

/* Animation for new features */
@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

.subscription-feature {
    animation: fadeInUp 0.5s ease-out;
}

.usage-indicator-animate {
    animation: slideInFromRight 0.5s ease-out;
}

/* Tool Card Enhancements */
.tool-card.premium-locked {
    position: relative;
    opacity: 0.7;
}

.tool-card.premium-locked::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 193, 7, 0.1) 10px,
        rgba(255, 193, 7, 0.1) 20px
    );
    pointer-events: none;
}

/* Success/Error Messages */
.subscription-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10001;
    animation: slideInFromRight 0.3s ease-out;
    max-width: 400px;
}

.subscription-message.success {
    background: linear-gradient(45deg, #28a745, #20c997);
}

.subscription-message.error {
    background: linear-gradient(45deg, #dc3545, #e74c3c);
}

.subscription-message.warning {
    background: linear-gradient(45deg, #ffc107, #fd7e14);
}

/* Loading States */
.subscription-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.subscription-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Enhanced Button Styles */
.btn-subscription {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-subscription:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(65, 118, 144, 0.3);
    color: white;
}

.btn-subscription:active {
    transform: translateY(0);
}

/* Dashboard Widget Styles */
.dashboard-widget {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.dashboard-widget:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dashboard-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.dashboard-widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

.dashboard-widget-icon {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}