/**
 * Feature Gating UI Styles
 * Styles for upgrade hints, locked features, and tier indicators
 */

/* Upgrade Hints */
.upgrade-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    color: white;
    font-size: 0.875rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.upgrade-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.upgrade-link {
    margin-left: auto;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}

.upgrade-link:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Upgrade Modal */
.upgrade-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s;
}

.upgrade-modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s;
}

.upgrade-modal h3 {
    margin: 0 0 1rem 0;
    color: #667eea;
    font-size: 1.5rem;
}

.upgrade-modal p {
    margin: 0 0 1.5rem 0;
    color: #555;
    line-height: 1.6;
}

.upgrade-modal-actions {
    display: flex;
    gap: 1rem;
}

.upgrade-modal-actions .btn {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.upgrade-modal-actions .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.upgrade-modal-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.upgrade-modal-actions .btn-secondary {
    background: #f3f4f6;
    color: #666;
}

.upgrade-modal-actions .btn-secondary:hover {
    background: #e5e7eb;
}

/* Disabled Options */
.disabled-option {
    opacity: 0.6;
    font-style: italic;
}

select option.disabled-option {
    color: #999;
}

/* Sequence Length Counter */
#sequence-length {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    background: #f3f4f6;
    border-radius: 4px;
    display: inline-block;
}

#sequence-length.warning {
    background: #fef3c7;
    color: #92400e;
}

#sequence-length.over-limit {
    background: #fee2e2;
    color: #991b1b;
    font-weight: 600;
    animation: pulse 1s infinite;
}

/* Tier Badges */
.tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.tier-badge-free {
    background: #e5e7eb;
    color: #6b7280;
}

.tier-badge-plus {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tier-badge-pro {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.tier-badge-enterprise {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

/* Locked Feature Overlay */
.feature-locked {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.feature-locked::after {
    content: '🔒';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Rate Limit Warning */
.rate-limit-warning {
    padding: 1rem;
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    border-radius: 4px;
    margin: 1rem 0;
}

.rate-limit-warning h4 {
    margin: 0 0 0.5rem 0;
    color: #92400e;
}

.rate-limit-warning p {
    margin: 0;
    color: #78350f;
}

/* Loading State for Tier Check */
.tier-checking {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.tier-checking::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10;
}

.tier-checking::after {
    content: '⟳';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    z-index: 11;
    animation: spin 1s linear infinite;
}

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

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

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

/* Dark Mode Adjustments */
@media (prefers-color-scheme: dark) {
    .upgrade-modal-content {
        background: #1f2937;
        color: #f3f4f6;
    }
    
    .upgrade-modal h3 {
        color: #818cf8;
    }
    
    .upgrade-modal p {
        color: #d1d5db;
    }
    
    .upgrade-modal-actions .btn-secondary {
        background: #374151;
        color: #d1d5db;
    }
    
    .upgrade-modal-actions .btn-secondary:hover {
        background: #4b5563;
    }
    
    #sequence-length {
        background: #374151;
        color: #f3f4f6;
    }
    
    .rate-limit-warning {
        background: #451a03;
        border-color: #f59e0b;
    }
    
    .rate-limit-warning h4 {
        color: #fbbf24;
    }
    
    .rate-limit-warning p {
        color: #fcd34d;
    }
}

/* Responsive Design */
@media (max-width: 640px) {
    .upgrade-modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .upgrade-modal-actions {
        flex-direction: column;
    }
    
    .upgrade-hint {
        flex-direction: column;
        text-align: center;
    }
    
    .upgrade-link {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }
}
