/* ============================================
   DREXET AI - Feature Modules Additional Styles
   ============================================ */

/* General Feature Animations */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

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

/* Message Highlight Animation (for search results) */
.message.highlight {
    animation: highlightPulse 2s ease-out;
}

@keyframes highlightPulse {
    0%, 100% {
        background-color: transparent;
    }
    50% {
        background-color: rgba(245, 158, 11, 0.2);
    }
}

/* Loading States */
.feature-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-tertiary);
}

.feature-loading::after {
    content: '';
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Tooltip Styles */
.tooltip {
    position: absolute;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    white-space: nowrap;
    pointer-events: none;
    z-index: 10000;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.tooltip.show {
    opacity: 1;
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
}

.badge-primary {
    background: rgba(102, 126, 234, 0.15);
    color: var(--accent-primary);
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Divider */
.feature-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 16px 0;
}

/* Feature Grid Layouts */
.feature-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.feature-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

/* Responsive Feature Grids */
@media (max-width: 480px) {
    .feature-grid-2,
    .feature-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Feature Card Hover Effects */
.feature-card-hover {
    position: relative;
    overflow: hidden;
}

.feature-card-hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.feature-card-hover:hover::after {
    opacity: 1;
}

/* Status Indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-online {
    background-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.status-offline {
    background-color: #6b7280;
    box-shadow: 0 0 0 2px rgba(107, 114, 128, 0.2);
}

.status-busy {
    background-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 4px;
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), #8b5cf6);
    border-radius: var(--radius-full);
    transition: width var(--transition-base);
}

/* Keyboard Shortcut Display */
.keyboard-shortcut {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-family: monospace;
    color: var(--text-secondary);
}

/* Feature Info Box */
.feature-info-box {
    padding: 12px;
    background-color: rgba(102, 126, 234, 0.05);
    border-left: 3px solid var(--accent-primary);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.5;
}

.feature-info-box strong {
    color: var(--text-primary);
}

/* Collapsible Section */
.collapsible-section {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.collapsible-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background-color: var(--bg-secondary);
    cursor: pointer;
    transition: background-color var(--transition-base);
}

.collapsible-header:hover {
    background-color: var(--bg-hover);
}

.collapsible-content {
    padding: 16px;
    display: none;
}

.collapsible-section.expanded .collapsible-content {
    display: block;
}

.collapsible-icon {
    transition: transform var(--transition-base);
}

.collapsible-section.expanded .collapsible-icon {
    transform: rotate(180deg);
}

/* Tag/Chip Styles */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.tag:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.tag-removable {
    cursor: pointer;
}

.tag-remove {
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.1);
    transition: background-color var(--transition-fast);
}

.tag-remove:hover {
    background-color: rgba(0, 0, 0, 0.2);
}

/* Stats Display */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.stat-card {
    padding: 12px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-align: center;
}

.stat-value {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Timeline Styles */
.timeline {
    position: relative;
    padding-left: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--accent-primary);
    border: 2px solid var(--bg-primary);
}

.timeline-content {
    padding: 12px;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-md);
}

/* Avatar Styles */
.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-primary), #8b5cf6);
    color: white;
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-sm);
    flex-shrink: 0;
}

.avatar-sm {
    width: 24px;
    height: 24px;
    font-size: var(--font-size-xs);
}

.avatar-lg {
    width: 48px;
    height: 48px;
    font-size: var(--font-size-lg);
}

/* Notification Dot */
.notification-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background-color: #ef4444;
    border: 2px solid var(--bg-primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* Context Menu */
.context-menu {
    position: fixed;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 4px;
    z-index: 10000;
    min-width: 180px;
    animation: scaleIn 0.15s ease-out;
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color var(--transition-fast);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.context-menu-item:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.context-menu-item.danger:hover {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.context-menu-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 4px 0;
}

/* Drag and Drop Styles */
.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    transition: all var(--transition-base);
}

.drop-zone.drag-over {
    border-color: var(--accent-primary);
    background-color: rgba(102, 126, 234, 0.05);
}

.drop-zone-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.drop-zone-text {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 12px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 20px;
    width: 60%;
    margin-bottom: 12px;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* Accessibility Improvements */
.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;
}

/* Focus Styles */
*:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* App Grid Layout (Phone App Style) */
.app-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 10px 0;
}

.app-icon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 12px;
    transition: all 0.2s ease;
    position: relative;
}

.app-icon-btn:hover:not(.disabled) {
    background-color: var(--bg-hover);
    transform: translateY(-2px);
}

.app-icon-btn:active:not(.disabled) {
    transform: translateY(0) scale(0.95);
}

.app-icon-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.app-icon-btn.active .app-icon {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.app-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.2s ease;
    background: transparent !important;
}

.app-icon:hover {
    transform: scale(1.05);
}

.app-icon svg {
    width: 24px;
    height: 24px;
}

.app-title {
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 500;
    text-align: center;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-active-indicator {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 12px;
    height: 12px;
    background: #10b981;
    border: 2px solid var(--bg-primary);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

.app-recording-indicator {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 12px;
    height: 12px;
    background: #ef4444;
    border: 2px solid var(--bg-primary);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: pulse 1s infinite;
}

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

/* Folder Icon Styles */
.folder-icon,
.folder-icon-new {
    position: relative;
    color: var(--text-primary);
}

.folder-icon-new {
    background: transparent !important;
    border: 2px dashed rgba(102, 126, 234, 0.4);
}

.folder-icon-new:hover {
    border-color: rgba(102, 126, 234, 0.6);
    background: transparent !important;
}


/* Recording State */
.app-icon-btn.recording .app-icon {
    animation: recordingPulse 1.5s ease-in-out infinite;
}

@keyframes recordingPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

/* Responsive App Grid */
@media (max-width: 480px) {
    .app-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .app-icon {
        width: 40px;
        height: 40px;
    }
    
    .app-icon svg {
        width: 20px;
        height: 20px;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .feature-panel,
    .input-area,
    .sidebar-toggle-btn {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }
}

