/* Lookup Page Styles */
:root {
    --primary-color: #1e40af;
    --secondary-color: #3b82f6;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --light-bg: #f9fafb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --sidebar-width: 320px;
    --sidebar-collapsed-width: 60px;
}

.lookup-main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
    background: var(--light-bg);
}

/* Layout Container */
.lookup-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    gap: 2rem;
    padding: 0 2rem;
}

/* Search Sidebar */
.search-sidebar {
    width: var(--sidebar-width);
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.search-sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--light-bg);
    border-radius: 15px 15px 0 0;
}

.sidebar-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    background: var(--border-color);
    color: var(--primary-color);
}

.search-sidebar.collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

.sidebar-content {
    padding: 1.5rem;
    transition: opacity 0.3s ease;
}

.search-sidebar.collapsed .sidebar-content {
    opacity: 0;
    pointer-events: none;
}

/* Main Content Area */
.main-content {
    flex: 1;
    min-width: 0;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

.page-header h1 i {
    margin-right: 0.5rem;
    color: var(--accent-color);
}

.page-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Search Tabs */
.search-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tab-btn {
    padding: 0.75rem 1rem;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
}

.tab-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.tab-btn i {
    font-size: 1rem;
}

/* Search Forms */
.search-forms {
    position: relative;
}

.search-form {
    display: none;
    animation: fadeIn 0.3s ease;
}

.search-form.active {
    display: block;
}

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

/* Form Groups */
.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.form-group input:hover,
.form-group select:hover {
    background: #e0f2fe;
    border-color: var(--primary-color);
}

.form-group input.error {
    border-color: #ef4444;
}

.form-group input.success {
    border-color: #10b981;
}

.form-help {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.form-note {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #e0f2fe;
    border: 1px solid #81d4fa;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #0277bd;
    line-height: 1.4;
}

.form-note i {
    margin-right: 0.5rem;
    color: #0288d1;
}

.form-note strong {
    color: #01579b;
}

/* Form Actions */
.form-actions {
    margin-top: 2rem;
}

.btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.3);
}

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

.btn-secondary:hover {
    background: var(--border-color);
}

/* Results Section */
.results-section {
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
    padding: 2rem;
    border: 1px solid var(--border-color);
}

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

.results-header h2 {
    color: var(--primary-color);
    margin: 0;
}

.results-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.no-results i {
    font-size: 3rem;
    color: var(--border-color);
    margin-bottom: 1rem;
}

.no-results h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Result Items */
.result-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.result-item:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.callsign {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.license-badges {
    display: flex;
    gap: 0.5rem;
}

.license-class,
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: white;
}

.result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 500;
}

.result-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.action-btn {
    padding: 0.5rem 1rem;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.action-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Info Section */
.info-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.info-card {
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.info-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-card h3 i {
    color: var(--accent-color);
}

.info-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Legend Styles */
.legend-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.legend-section h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.legend-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.legend-section li {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

.legend-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    margin-right: 0.75rem;
    min-width: 80px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Legend Badge Colors */
.legend-badge.technician { background: #10b981; }
.legend-badge.general { background: #3b82f6; }
.legend-badge.advanced { background: #8b5cf6; }
.legend-badge.extra { background: #f59e0b; }
.legend-badge.novice { background: #6b7280; }
.legend-badge.active { background: #10b981; }
.legend-badge.cancelled { background: #ef4444; }
.legend-badge.expired { background: #f59e0b; }
.legend-badge.grace { background: #8b5cf6; }

/* Responsive Design */
@media (max-width: 1024px) {
    .lookup-container {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .search-sidebar {
        position: static;
        width: 100%;
        order: -1;
    }
    
    .search-sidebar.collapsed {
        width: 100%;
    }
    
    .search-sidebar.collapsed .sidebar-content {
        display: none;
    }
    
    .sidebar-header {
        cursor: pointer;
    }
    
    .sidebar-toggle {
        display: none;
    }
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .search-tabs {
        grid-template-columns: 1fr;
    }
    
    .tab-btn {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .form-group input,
    .form-group select {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    .results-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .result-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .result-details {
        grid-template-columns: 1fr;
    }
    
    .legend-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .legend-section li {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .legend-badge {
        margin-right: 0;
        margin-bottom: 0.25rem;
    }
}

@media (max-width: 480px) {
    .lookup-main {
        padding: 1rem 0;
    }
    
    .lookup-container {
        padding: 0 0.5rem;
    }
    
    .search-form-container,
    .results-section,
    .info-card {
        margin: 0 0.5rem 1rem 0.5rem;
    }
    
    .results-container {
        padding: 1rem;
    }
}

/* AdSense Ad Containers */
.ad-container {
    margin: 2rem 0;
    text-align: center;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 1px dashed #dee2e6;
    border-radius: 8px;
    padding: 1rem;
}

.ad-container:empty::before {
    content: "Ad Space";
    color: #6c757d;
    font-style: italic;
    font-size: 0.9rem;
}

.ad-banner-top {
    margin-top: 0;
    margin-bottom: 2rem;
}

.ad-banner-middle {
    margin: 2rem 0;
}

.ad-banner-bottom {
    margin: 2rem 0;
}

.ad-banner-footer {
    margin: 2rem 0 0 0;
}

/* Responsive ad containers */
@media (max-width: 768px) {
    .ad-container {
        margin: 1.5rem 0;
        min-height: 60px;
        padding: 0.75rem;
    }
    
    .ad-banner-top {
        margin-bottom: 1.5rem;
    }
    
    .ad-banner-middle,
    .ad-banner-bottom {
        margin: 1.5rem 0;
    }
    
    .ad-banner-footer {
        margin: 1.5rem 0 0 0;
    }
}

@media (max-width: 480px) {
    .ad-container {
        margin: 1rem 0;
        min-height: 50px;
        padding: 0.5rem;
    }
    
    .ad-banner-top {
        margin-bottom: 1rem;
    }
    
    .ad-banner-middle,
    .ad-banner-bottom {
        margin: 1rem 0;
    }
    
    .ad-banner-footer {
        margin: 1rem 0 0 0;
    }
}

/* Autocomplete Styles */
.autocomplete-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

.autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.15s ease;
    font-size: 14px;
    color: #374151;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background-color: #f3f4f6;
    color: #1f2937;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

/* Performance indicator styles */
.performance-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #6b7280;
    margin-left: 8px;
}

.performance-indicator.fast {
    color: #10b981;
}

.performance-indicator.slow {
    color: #ef4444;
}

.performance-indicator.medium {
    color: #f59e0b;
} 