/* Feature Gating Styles */

/* Disabled feature styling */
.feature-disabled {
    opacity: 0.5;
    filter: grayscale(30%);
    transition: opacity 0.2s ease, filter 0.2s ease;
    position: relative;
}

/* Locked feature styling */
.feature-locked {
    cursor: pointer !important;
    user-select: none;
    position: relative;
}

.feature-locked:hover {
    opacity: 0.8;
    transform: translateY(-1px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Add a subtle small lock icon in top right corner for locked features */
.feature-locked::after {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    z-index: 1;
}

.feature-locked:hover::after {
    opacity: 0.8;
}

/* Specific button states */
.feature-disabled.btn,
.feature-disabled button,
.feature-disabled .button {
    border-color: #d1d5db;
    background-color: #f9fafb;
    color: #9ca3af;
}

.feature-disabled.btn:hover,
.feature-disabled button:hover,
.feature-disabled .button:hover {
    border-color: #d1d5db;
    background-color: #f9fafb;
    color: #9ca3af;
    transform: none;
    box-shadow: none;
}

/* Feature usage indicators */
.feature-usage-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    margin-left: 0.5rem;
}

.usage-bar {
    width: 60px;
    height: 6px;
    background-color: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.usage-bar-fill {
    height: 100%;
    background-color: #3b82f6;
    transition: width 0.3s ease;
    border-radius: 3px;
}

.usage-bar-fill.warning {
    background-color: #f59e0b;
}

.usage-bar-fill.danger {
    background-color: #ef4444;
}

/* Tier badges */
.tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.625rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tier-badge.free {
    background-color: #f3f4f6;
    color: #374151;
}

.tier-badge.basic {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.tier-badge.standard {
    background-color: #dcfce7;
    color: #166534;
}

/* Feature requirement tooltips */
.feature-requirement {
    position: relative;
    display: inline-block;
}

.feature-requirement-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1f2937;
    color: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    margin-bottom: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    max-width: 300px;
    white-space: normal;
    text-align: center;
}

.feature-requirement-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 0.5rem solid transparent;
    border-top-color: #1f2937;
}

.feature-requirement:hover .feature-requirement-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Upgrade modal styling enhancements */
.feature-upgrade-modal {
    backdrop-filter: blur(5px);
}

.feature-upgrade-modal .card {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(1);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.feature-upgrade-modal:not(.hidden) .card {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Mobile responsiveness for upgrade modal */
@media (max-width: 640px) {
    .feature-upgrade-modal .card {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
    
    .feature-upgrade-modal .flex.flex-col.sm\\:flex-row {
        flex-direction: column;
    }
    
    .feature-upgrade-modal .btn-primary,
    .feature-upgrade-modal .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* Feature highlight animations */
@keyframes featureHighlight {
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

.feature-highlighted {
    animation: featureHighlight 1.5s ease-out;
}

/* Special styling for different types of elements */

/* Card-based features */
.feature-card.feature-disabled {
    border-color: #e5e7eb;
    background-color: #f9fafb;
}

.feature-card.feature-locked::after {
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z'/%3E%3C/svg%3E");
    top: 8px;
    right: 8px;
    background-color: transparent;
    border-radius: 0;
    padding: 0;
}

/* Tab-based features */
.feature-tab.feature-disabled {
    color: #9ca3af;
    border-bottom-color: #e5e7eb;
}

.feature-tab.feature-locked {
    cursor: pointer;
}

/* Icon-based features */
.feature-icon.feature-disabled {
    color: #d1d5db;
}

.feature-icon.feature-locked {
    position: relative;
}

/* List item features */
.feature-list-item.feature-disabled {
    background-color: #f9fafb;
    border-color: #e5e7eb;
}

.feature-list-item.feature-locked .feature-title {
    color: #9ca3af;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .feature-requirement-tooltip {
        max-width: 250px;
        font-size: 0.8rem;
        padding: 0.5rem;
    }
    
    .feature-locked::after {
        width: 10px;
        height: 10px;
        top: 2px;
        right: 2px;
    }
    
    .feature-card.feature-locked::after {
        width: 10px;
        height: 10px;
        top: 6px;
        right: 6px;
    }
    
    .usage-bar {
        width: 40px;
        height: 4px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .feature-disabled {
        opacity: 0.4;
        filter: grayscale(50%);
    }
    
    .feature-disabled.btn,
    .feature-disabled button,
    .feature-disabled .button {
        border-color: #4b5563;
        background-color: #1f2937;
        color: #6b7280;
    }
    
    .tier-badge.free {
        background-color: #374151;
        color: #d1d5db;
    }
    
    .feature-card.feature-disabled {
        border-color: #4b5563;
        background-color: #1f2937;
    }
    
    .feature-list-item.feature-disabled {
        background-color: #1f2937;
        border-color: #4b5563;
    }
    
    /* Ensure lock icons are visible in dark mode with subtle gray styling */
    .feature-locked::after,
    .feature-card.feature-locked::after {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z'/%3E%3C/svg%3E");
        opacity: 0.7;
    }
    
    .feature-locked:hover::after,
    .feature-card.feature-locked:hover::after {
        opacity: 0.9;
    }
} 