/* ============================================
   AI Technology Radar - Styles
   ============================================ */

/* Navigation Bar */
.navbar {
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.navbar-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-box {
    position: relative;
}

.search-box input {
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
    width: 250px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--ring-trial);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:hover {
    border-color: var(--ring-trial);
}

.filter-select:focus {
    outline: none;
    border-color: var(--ring-trial);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-filter {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-filter:hover {
    background: var(--ring-trial);
    color: white;
    border-color: var(--ring-trial);
}

.btn-filter.active {
    background: var(--ring-trial);
    color: white;
    border-color: var(--ring-trial);
}

.btn-icon {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: var(--ring-trial);
    color: white;
    border-color: var(--ring-trial);
    transform: scale(1.05);
}

/* Main Container */
.container {
    display: flex;
    padding-top: 0;
}

.radar-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

#radarChart {
    width: 100%;
    height: calc(100vh - 140px);
}

/* Legend */
.legend {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    background: var(--bg-panel);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.legend h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: block;
}

/* Side Panel */
.side-panel {
    width: 500px;
    background: var(--bg-panel);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    overflow: hidden;
}

.side-panel.collapsed {
    transform: translateX(100%);
}

.panel-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
}

.panel-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

.panel-placeholder {
    color: var(--text-secondary);
    text-align: center;
    padding: 2rem;
}

.panel-content h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.panel-content h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.panel-content h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.panel-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.panel-content ul,
.panel-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.panel-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.panel-content a {
    color: var(--ring-trial);
    text-decoration: none;
}

.panel-content a:hover {
    text-decoration: underline;
}

.panel-content code {
    background: var(--bg-secondary);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--text-primary);
}

.panel-content pre {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.panel-content pre code {
    background: none;
    padding: 0;
}

.panel-content blockquote {
    border-left: 4px solid var(--ring-trial);
    padding-left: 1rem;
    margin: 1rem 0;
    color: var(--text-secondary);
    font-style: italic;
}

.tech-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
}

.badge-ring {
    color: white;
}

.badge-ring.adopt {
    background: var(--ring-adopt);
}

.badge-ring.trial {
    background: var(--ring-trial);
}

.badge-ring.assess {
    background: var(--ring-assess);
}

.badge-ring.hold {
    background: var(--ring-hold);
}

.badge-tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.badge-organization {
    display: inline-block !important;
    background: #4A90E2 !important;
    color: white !important;
    border: none !important;
    padding: 0.4rem 0.9rem !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
}

[data-theme="dark"] .badge-organization {
    background: #2E5C8A !important;
    color: #E0E0E0 !important;
}

.badge-featured {
    background: gold;
    color: #000;
}

.badge-cost {
    font-weight: 600;
}

.badge-cost-free {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.badge-cost-freemium {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #3b82f6;
}

.badge-cost-paid {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

[data-theme="dark"] .badge-cost-free {
    background: #064e3b;
    color: #6ee7b7;
}

[data-theme="dark"] .badge-cost-freemium {
    background: #1e3a8a;
    color: #93c5fd;
}

[data-theme="dark"] .badge-cost-paid {
    background: #78350f;
    color: #fcd34d;
}

.badge-date {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.panel-actions {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
    background: var(--bg-secondary);
}

.btn-primary,
.btn-secondary,
.btn-danger {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-primary {
    background: var(--ring-trial);
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-primary);
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--ring-hold);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--ring-trial);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    z-index: 90;
}

.fab:hover {
    background: #2563eb;
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.fab:active {
    transform: scale(0.95);
}

/* Activity Feed */
.activity-feed {
    position: fixed;
    top: 80px;
    right: 2rem;
    width: 300px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    z-index: 80;
}

.activity-feed h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.activity-item {
    padding: 0.75rem;
    border-left: 3px solid var(--ring-trial);
    margin-bottom: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 4px;
}

.activity-item .activity-title {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.activity-item .activity-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.modal-content {
    background: var(--bg-panel);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input[type="text"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--ring-trial);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    font-family: 'Courier New', monospace;
    resize: vertical;
}

.form-group input[type="checkbox"] {
    margin-right: 0.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Footer */
.footer {
    background: var(--bg-panel);
    border-top: 1px solid var(--border-color);
    padding: 1rem 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.btn-link {
    background: none;
    border: none;
    color: var(--ring-trial);
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.9rem;
}

.btn-link:hover {
    color: #2563eb;
}

/* Radar Specific Styles */
.blip {
    cursor: pointer;
}

.blip circle {
    transition: r 0.2s ease, filter 0.2s ease;
    pointer-events: all;
}

.blip:hover circle {
    filter: brightness(1.3) drop-shadow(0 0 8px currentColor);
}

.blip.selected {
    stroke: #000;
    stroke-width: 3;
}

.hover-label,
.hover-label *,
.blip-label,
.blip-number {
    pointer-events: none !important;
}

.hover-label rect {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.blip-number {
    font-size: 12px;
    font-weight: bold;
    fill: white;
    text-anchor: middle;
}

.blip-label {
    font-size: 11px;
    font-weight: 500;
    fill: var(--text-primary);
    text-anchor: middle;
    pointer-events: none;
    text-shadow: 0 0 3px var(--bg-primary), 0 0 3px var(--bg-primary);
}

.quadrant-label {
    font-size: 18px;
    font-weight: bold;
    fill: var(--text-secondary);
    text-anchor: middle;
}

.ring-label {
    font-size: 14px;
    fill: var(--text-secondary);
    text-anchor: middle;
}

.tooltip {
    position: absolute;
    background: var(--bg-panel);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    pointer-events: none;
    z-index: 1001;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    white-space: nowrap;
}

/* Keyboard Shortcuts Help */
.shortcuts {
    display: grid;
    gap: 1rem;
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

kbd {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-family: monospace;
    font-size: 0.9rem;
    min-width: 40px;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .navbar-controls {
        flex-wrap: wrap;
    }
    
    .search-box input {
        width: 200px;
    }
    
    .side-panel {
        width: 400px;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .navbar-controls {
        width: 100%;
        justify-content: center;
    }
    
    .search-box input {
        width: 150px;
    }
    
    .container {
        flex-direction: column;
    }
    
    .side-panel {
        width: 100%;
        height: 50vh;
        border-left: none;
        border-top: 1px solid var(--border-color);
    }
    
    .side-panel.collapsed {
        transform: translateY(100%);
    }
    
    .legend {
        left: 1rem;
        bottom: 1rem;
        padding: 1rem;
    }
    
    #radarChart {
        height: 50vh;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .fab,
    .footer,
    .panel-actions,
    .activity-feed {
        display: none !important;
    }
    
    .side-panel {
        transform: none !important;
        border: none;
    }
    
    .container {
        display: block;
    }
    
    .radar-container {
        page-break-after: always;
    }
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Animation for new items */
@keyframes blipAppear {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.blip-enter {
    animation: blipAppear 0.5s ease;
}

