/* =============================================
   GLASS LIQUID & SILVER METALLIC - FINAL FIXES
 Fixing chat widget opacity and modernizing Silver
============================================= */

/* =============================================
   GLASS LIQUID - CHAT WIDGET OPACITY FIX
============================================= */
html[data-theme="glass-liquid"] .codebase-chat-panel {
    background: linear-gradient(135deg, 
     rgba(15, 23, 42, 0.95) 0%, 
        rgba(30, 41, 59, 0.92) 100%) !important;
    backdrop-filter: blur(32px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(32px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6),
    0 2px 8px rgba(0, 0, 0, 0.4),
     inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

html[data-theme="glass-liquid"] .codebase-chat-header {
    background: linear-gradient(135deg, 
      rgba(30, 41, 59, 0.9) 0%, 
        rgba(51, 65, 85, 0.85) 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(16px) !important;
}

html[data-theme="glass-liquid"] .codebase-repo-selector {
    background: linear-gradient(135deg, 
        rgba(30, 41, 59, 0.8) 0%, 
        rgba(51, 65, 85, 0.75) 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(16px) !important;
}

html[data-theme="glass-liquid"] .codebase-chat-messages {
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(20px) !important;
}

html[data-theme="glass-liquid"] .codebase-chat-welcome {
    background: rgba(56, 189, 248, 0.15) !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
    backdrop-filter: blur(12px) !important;
}

html[data-theme="glass-liquid"] .codebase-chat-bubble {
    background: rgba(30, 41, 59, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(12px) !important;
}

html[data-theme="glass-liquid"] .codebase-chat-message.user .codebase-chat-bubble {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.5), rgba(14, 165, 233, 0.5)) !important;
    border: 1px solid rgba(56, 189, 248, 0.6) !important;
    backdrop-filter: blur(12px) !important;
}

html[data-theme="glass-liquid"] .codebase-chat-input-area {
    background: linear-gradient(135deg, 
        rgba(30, 41, 59, 0.85) 0%, 
        rgba(51, 65, 85, 0.8) 100%) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(16px) !important;
}

html[data-theme="glass-liquid"] .codebase-chat-input {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    backdrop-filter: blur(8px) !important;
}

html[data-theme="glass-liquid"] .codebase-chat-input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

html[data-theme="glass-liquid"] .codebase-chat-suggestion {
    background: rgba(56, 189, 248, 0.12) !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
    color: #ffffff !important;
    backdrop-filter: blur(8px) !important;
}

html[data-theme="glass-liquid"] .codebase-scope-modal-content {
    background: linear-gradient(135deg, 
        rgba(15, 23, 42, 0.95) 0%, 
        rgba(30, 41, 59, 0.92) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(32px) saturate(180%) !important;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6) !important;
}

html[data-theme="glass-liquid"] .codebase-scope-tree {
    background: rgba(30, 41, 59, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(12px) !important;
}

html[data-theme="glass-liquid"] .codebase-tree-item {
    color: #ffffff !important;
}

html[data-theme="glass-liquid"] .codebase-tree-item .name {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* =============================================
   SILVER METALLIC - ULTRA MODERN REDESIGN
============================================= */
html[data-theme="silver-metallic"] .settings-sidebar .nav-item,
html[data-theme="silver-metallic"] .theme-card {
    border-radius: 16px !important;
}

html[data-theme="silver-metallic"] .settings-sidebar .nav-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(203, 213, 225, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

html[data-theme="silver-metallic"] .settings-sidebar .nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #0ea5e9, #06b6d4);
    opacity: 0;
    transition: opacity 0.3s ease;
}

html[data-theme="silver-metallic"] .settings-sidebar .nav-item:hover::before,
html[data-theme="silver-metallic"] .settings-sidebar .nav-item.active::before {
opacity: 1;
}

html[data-theme="silver-metallic"] .settings-sidebar .nav-item:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-color: rgba(148, 163, 184, 0.6);
    transform: translateX(4px);
}

html[data-theme="silver-metallic"] .settings-sidebar .nav-item.active {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
 border-color: rgba(14, 165, 233, 0.3);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 1);
}

html[data-theme="silver-metallic"] .theme-card {
    border: 1px solid rgba(203, 213, 225, 0.5);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

html[data-theme="silver-metallic"] .theme-card::after {
    content: '';
 position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        transparent, 
        rgba(14, 165, 233, 0.05), 
        transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

html[data-theme="silver-metallic"] .theme-card:hover {
    border-color: rgba(14, 165, 233, 0.3);
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.12),
       0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    transform: translateY(-4px) scale(1.02);
}

html[data-theme="silver-metallic"] .theme-card:hover::after {
    opacity: 1;
}

html[data-theme="silver-metallic"] .theme-card.selected {
    border-color: rgba(14, 165, 233, 0.5);
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.2),
  0 0 0 3px rgba(14, 165, 233, 0.1),
       inset 0 1px 0 rgba(255, 255, 255, 1);
}

html[data-theme="silver-metallic"] .theme-preview {
    border-radius: 12px !important;
}

html[data-theme="silver-metallic"] select,
html[data-theme="silver-metallic"] input[type="range"],
html[data-theme="silver-metallic"] input[type="color"] {
    border-radius: 12px !important;
}

html[data-theme="silver-metallic"] .builder-item select {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(203, 213, 225, 0.6);
    transition: all 0.2s ease;
}

html[data-theme="silver-metallic"] .builder-item select:hover {
    border-color: rgba(14, 165, 233, 0.4);
}

html[data-theme="silver-metallic"] .builder-item select:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Codebase chat widget in Silver Metallic */
html[data-theme="silver-metallic"] .codebase-chat-panel {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    border: 1px solid rgba(203, 213, 225, 0.6) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.04),
              inset 0 1px 0 rgba(255, 255, 255, 1) !important;
}

html[data-theme="silver-metallic"] .codebase-chat-header {
background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
    border-bottom: 1px solid rgba(203, 213, 225, 0.6) !important;
}

html[data-theme="silver-metallic"] .codebase-repo-selector {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
    border-bottom: 1px solid rgba(203, 213, 225, 0.6) !important;
}

html[data-theme="silver-metallic"] .codebase-chat-bubble {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
    border: 1px solid rgba(203, 213, 225, 0.6) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

html[data-theme="silver-metallic"] .codebase-chat-input {
    background: white !important;
    border: 1px solid rgba(203, 213, 225, 0.6) !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

html[data-theme="silver-metallic"] .codebase-chat-suggestion {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
    border: 1px solid rgba(203, 213, 225, 0.6) !important;
    border-radius: 16px !important;
}

html[data-theme="silver-metallic"] .codebase-chat-suggestion:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%) !important;
    border-color: rgba(14, 165, 233, 0.4) !important;
    color: #0ea5e9 !important;
}

/* Settings page specific improvements */
html[data-theme="silver-metallic"] .settings-container {
    background: radial-gradient(circle at top right, #f0f4f8 0%, #e8ecf1 50%, #dfe4ea 100%) !important;
}

html[data-theme="silver-metallic"] .settings-content .card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(203, 213, 225, 0.6);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06),
     inset 0 1px 0 rgba(255, 255, 255, 1);
}

html[data-theme="silver-metallic"] .theme-grid {
    gap: 1rem;
}

/* Make all border-radius modern */
html[data-theme="silver-metallic"] * {
    --theme-radius-md: 16px !important;
    --theme-radius-lg: 24px !important;
}
