/* Custom styles for Ham Radio Converter */

/* Audio visualizer */
.audio-visualization {
    background-color: var(--bs-dark);
    border-radius: 0.25rem;
    height: 120px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

#visualizer {
    width: 100%;
    height: 100%;
    display: block;
}

/* Text areas */
textarea.form-control {
    font-family: monospace;
    background-color: rgba(33, 37, 41, 0.8);
    resize: none;
}

/* Badge styling */
#status-badge {
    min-width: 80px;
    text-align: center;
}

/* History table adjustments */
.table-responsive {
    max-height: 300px;
    overflow-y: auto;
}

/* Button hover effects */
.btn:hover {
    transform: translateY(-1px);
    transition: transform 0.2s;
}

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

::-webkit-scrollbar-track {
    background: rgba(33, 37, 41, 0.5);
    border-radius: 4px;
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--bs-primary);
}

/* Nav styling */
.navbar-brand i {
    margin-right: 0.5rem;
    vertical-align: text-bottom;
}

/* Fix tab content visibility */
.tab-content .tab-pane {
    min-height: 200px;
}

.tab-content .tab-pane.fade:not(.show) {
    display: none;
}

.tab-content .tab-pane.fade.show {
    display: block;
}

/* APRS Complete Override - Force all APRS elements to display */
#aprs-pane {
    display: block !important;
    min-height: 500px !important;
    width: 100% !important;
    height: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative !important;
    z-index: 10 !important;
}

#aprs-pane * {
    opacity: 1 !important;
    visibility: visible !important;
}

#aprs-pane h3,
#aprs-pane h5,
#aprs-pane label,
#aprs-pane input,
#aprs-pane button,
#aprs-pane textarea,
#aprs-pane div,
#aprs-pane p {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    color: inherit !important;
}

#aprs-pane input,
#aprs-pane textarea,
#aprs-pane button {
    max-width: 100% !important;
    width: auto !important;
}

/* Force APRS input specifically */
#aprsCallsign {
    display: block !important;
    width: 100% !important;
    background: #1e2124 !important;
    color: #fff !important;
    border: 2px solid #007bff !important;
    padding: 0.75rem !important;
    border-radius: 6px !important;
    font-size: 1.1rem !important;
}

/* Radio themed elements */
.card {
    border-color: rgba(173, 181, 189, 0.15);
}

.card-header {
    background-color: rgba(33, 37, 41, 0.8);
}

.card-header i {
    margin-right: 0.5rem;
    vertical-align: text-bottom;
}

/* Make table more radio-console like */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    border-bottom: 2px solid var(--bs-secondary);
    color: var(--bs-light);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .audio-visualization {
        height: 80px;
    }

    .table-responsive {
        max-height: 200px;
    }
}

/* Internet Radio styling */
.receiver-status-excellent {
    color: #28a745;
    font-weight: bold;
}

.receiver-status-good {
    color: #ffc107;
    font-weight: bold;
}

.receiver-status-poor {
    color: #dc3545;
    font-weight: bold;
}

.websdr-map iframe {
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.node-lookup-result {
    border-radius: 8px;
    margin-top: 1rem;
}

.propagation-recommendations {
    max-height: 600px;
    overflow-y: auto;
}

.band-badge {
    font-size: 0.75rem;
    margin: 0 1px;
}

.receiver-table th {
    border-top: none;
    background: rgba(255, 255, 255, 0.1);
}

.internet-radio-tabs .nav-link {
    border-radius: 6px 6px 0 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    color: #ffffff;
}

.internet-radio-tabs .nav-link.active {
    background: rgba(0, 123, 255, 0.2);
    border-color: #007bff;
    color: #007bff;
}

/* Ham Radio Tools Grid Styling */
.ham-tool-btn {
    min-height: 80px;
    padding: 1rem !important;
    margin: 0.75rem !important;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.ham-tool-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.ham-tool-btn i {
    display: block;
    margin-bottom: 0.5rem !important;
    font-size: 1.2rem;
}

.ham-tool-btn small {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Ham Radio Tools Grid Layout */
.ham-tool-btn.active {
    border-width: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Ham Radio Tools Grid Layout - uniform spacing */
.ham-tools-grid .row {
    margin: 0 -0.75rem !important;
}

.ham-tools-grid .col-md-3,
.ham-tools-grid .col-6,
.ham-tools-grid .col-md-4 {
    padding: 0.75rem !important;
}

/* Ensure buttons don't override column padding */
.ham-tool-btn {
    margin: 0 !important;
}

.receiver-recommendation-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.receiver-recommendation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 123, 255, 0.15);
}
