/* Base styles - shared across all themes */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    height: 100vh;
    overflow: hidden;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.app-container {
    display: flex;
    height: 100vh;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:hover {
    background: var(--card-hover);
}

.menu-icon {
    margin-right: 12px;
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.menu-separator {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

/* Navigation */
.nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    list-style: none;
}

.nav-item {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    text-decoration: none;
    display: block;
}

.nav-item:hover {
    background: var(--card-hover);
}

.nav-item.active {
    background: var(--primary-color);
    color: var(--primary-text);
    border-color: var(--primary-color);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#app {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--primary-text);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--secondary-hover);
}

.btn-danger {
    background: var(--error-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s;
    font-weight: 500;
}

.btn-danger:hover {
    background: var(--error-hover);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
    color: var(--text-color);
    font-size: 1.3rem;
    margin: 0;
}

.card-body {
    color: var(--text-color);
}

/* Info Card */
.info-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    overflow: visible;
}

.info-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-color);
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    color: var(--text-color);
    margin: 0;
}

.modal-header-left {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

#modal-subtitle {
    display: none;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.close-btn {
    background: var(--border-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.2s;
}
.close-btn:hover {
    background: var(--text-secondary);
    color: var(--bg-color);
}

.modal-body {
    padding: 1.5rem;
}

/* Narrower modals for simple parameter forms */
.modal-content.narrow-modal {
    max-width: 600px;
}

/* Toast notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    max-width: 300px;
    word-wrap: break-word;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-info {
    background: var(--primary-color);
}

.toast-success {
    background: var(--success-color);
}

.toast-warning {
    background: var(--warning-color);
}

.toast-error {
    background: var(--error-color);
}

/* Target Search */
.target-search-container {
    position: relative;
}

#target-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    margin-top: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.target-result {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.target-result:last-child {
    border-bottom: none;
}

.target-result:hover {
    background: var(--card-hover);
}

.target-name {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.target-coords {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.target-details {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Target Details Display */
#target-details-display {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

#target-details-display .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color-light);
}

#target-details-display .detail-row:last-child {
    border-bottom: none;
}

#target-details-display .detail-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

#target-details-display .detail-value {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.9rem;
}

/* Pinned Targets */
#pinned-targets-display {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* Location Management */
.location-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 0.75rem;
}

.location-info {
    flex: 1;
}

.location-actions {
    display: flex;
    gap: 0.5rem;
}

.location-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--secondary-color);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.location-btn:hover {
    background: var(--secondary-hover);
}

.location-btn.delete {
    background: var(--error-color);
    color: white;
    border-color: var(--error-color);
}

.location-btn.delete:hover {
    background: var(--error-hover);
}

/* Skyglow Timeline */
.timeline-container {
    position: relative;
    width: 100%;
    height: 200px;
    margin: 2rem 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.timeline-gradient {
    width: 100%;
    height: 100%;
    display: block;
}

.timeline-marker {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: transparent;
    border-left: 2px dashed currentColor;
    pointer-events: none;
}

.timeline-marker-label {
    position: absolute;
    top: 10px;
    left: 5px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    padding: 2px 6px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 3px;
}

.timeline-labels {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    display: flex;
    align-items: flex-end;
    padding: 0 5px;
}

.timeline-label {
    position: absolute;
    font-size: 0.75rem;
    color: var(--text-secondary);
    transform: translateX(-50%);
}

/* Skyglow Info */
.skyglow-details {
    margin: 1.5rem 0;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.detail-value {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.9rem;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Selection styling */
::selection {
    background-color: var(--primary-color);
    color: var(--primary-text);
}

/* Utility classes */
.text-center {
    text-align: center;
}

.text-secondary {
    color: var(--text-secondary);
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        min-width: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .app-container {
        flex-direction: column;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Visibility View Layout */
.visibility-view h2 {
    margin-bottom: 1.0rem;
}

.ts-two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-no-margin {
    margin-bottom: 0;
}

/* Form horizontal layout (label beside input) */
.form-horizontal {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 0.75rem;
    align-items: center;
}

.form-horizontal.wide-label {
    grid-template-columns: 140px 1fr;
}

.form-horizontal label {
    margin-bottom: 0;
}

/* Target details display */
.target-details-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--card-hover);
    border-radius: 6px;
    font-size: 0.85rem;
}

.target-detail-item {
    /* Container for each detail field */
}

.target-detail-label {
    color: var(--text-secondary);
}

.target-detail-value {
    color: var(--text-color);
    font-weight: 500;
}

/* Full width inputs/selects */
.full-width {
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ts-two-col-grid {
        grid-template-columns: 1fr;
    }

    .form-horizontal {
        grid-template-columns: 1fr;
    }

    .form-horizontal label {
        margin-bottom: 0.5rem;
    }
}

/* Remove spinner arrows from number inputs */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Display-only field spans */
.field-display {
    color: var(--text-color);
    font-weight: 500;
    display: block;
    padding: 0.25rem 0;
}

/* Info Cards Grid */
.info-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 0;
}

.info-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
}

.info-card h3 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    border-bottom: 2px solid var(--accent-primary);
    padding-bottom: 0.5rem;
}

.info-card-content {
    color: var(--text-secondary);
}

.info-section {
    margin: 1rem 0;
}

.info-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.info-value {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.info-subtext {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.moon-phase-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.moon-emoji {
    font-size: 3rem;
}

/* Timeline Section */
#timeline-section {
    margin-top: 2rem;
}

.timeline-legend {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.timeline-visualization {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    min-height: 150px;
}

.timeline-marker {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
}

.marker-icon {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.marker-time {
    font-size: 0.75rem;
    font-weight: 600;
}

.timeline-labels-row {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.timeline-label {
    position: absolute;
    transform: translateX(-50%);
    font-size: 0.75rem;
}

.gradient-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.legend-color {
    width: 30px;
    height: 20px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
}

.gradient-legend #legend-target-altitude {
    width: 30px;
    height: 5px;
    background: #ffffff;
    border: 1px solid #000000;
    border-radius: 1px;
}

.gradient-legend #legend-minimum-altitude {
    width: 30px;
    height: 5px;
    background: repeating-linear-gradient(to right, #ffffff 0, #ffffff 5px, transparent 5px, transparent 10px);
    border: 1px solid #000000;
    border-radius: 1px;
}

/* Timeline marker styling */
.time-marker::before {
    content: attr(data-icon);
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    background: rgba(0, 0, 0, 0.8);
    padding: 4px;
    border-radius: 4px;
    white-space: nowrap;
    width: 50px;
    text-align: center;
    box-sizing: border-box;
}

.time-marker::after {
    content: attr(data-time);
    position: absolute;
    top: 35px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    color: #ffc107;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.9);
    padding: 3px 6px;
    border-radius: 3px;
    border: 1px solid rgba(255, 193, 7, 0.3);
    width: 50px;
    text-align: center;
    box-sizing: border-box;
}

/* Moon icons - 1 up from bottom position */
.time-marker[data-icon*="🌙"]::before {
    top: 95px;
}

.time-marker[data-icon*="🌙"]::after {
    top: 125px;
}

/* Target icons - bottom position */
.time-marker[data-icon*="✨"]::before {
    top: 190px;
}

.time-marker[data-icon*="✨"]::after {
    top: 220px;
}

/* Make info cards more compact */
.info-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.2rem;
    margin: 1.5rem 0;
}

.info-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
}

.info-card h3 {
    margin: 0 0 0.75rem 0;
    color: var(--text-primary);
    font-size: 1rem;
}

/* Moon phase display - more compact */
.moon-phase-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.moon-emoji {
    font-size: 2.5rem;
}

/* Section labels larger */
.info-section {
    margin: 0.75rem 0;
}

.info-label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.info-value {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: normal;
}

.info-subtext {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Separation on same line */
#separation-dusk, #separation-dawn {
    display: inline;
    margin-left: 0.25rem;
}

#separation-dusk-desc, #separation-dawn-desc {
    display: block;
    margin-top: 0.25rem;
}

/* Center gradient title */
#timeline-section h3 {
    text-align: center;
    margin-bottom: 0;
}

/* Larger icon legend */
.timeline-legend {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin: 1rem 0;
    font-size: 1rem;
    color: var(--text-secondary);
}

.timeline-legend span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline-legend span::before {
    font-size: 1.3rem;
}

/* Timeline section - full width */
#timeline-section {
    margin-top: 2rem;
    width: 100%;
}

.timeline-visualization {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    min-height: 150px;
    width: 100%;
}

/* Info card text sizing and spacing to match original */
.info-card h3 {
    margin: 0 0 10px 0;
    color: var(--accent-primary);
    font-size: 1rem;
    font-weight: 600;
}

.info-card-content {
    color: var(--text-color);
}

/* Moon Details card */
.moon-phase-display {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

#moon-phase-name {
    font-size: 1.15em;
    font-weight: normal;
    color: var(--text-color);
    margin-bottom: 2px;
}

#moon-illumination {
    font-size: 0.88em;
    color: var(--text-secondary);
}

.moon-emoji {
    font-size: 2.8em;
    line-height: 1;
}

/* Section labels and values */
.info-section {
    margin-top: 10px;
}

.info-label {
    font-size: 1em;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 3px;
}

#target-altitude,
.info-subtext {
    font-size: 0.88em;
    color: var(--text-secondary);
    margin-bottom: 2px;
    line-height: 1.3;
}

#moon-rise-set,
#target-rise-set,
.info-value {
    font-size: 0.88em;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Separation card - inline display */
#separation-dusk,
#separation-dawn {
    font-size: 1em;
    color: var(--text-color);
}

#separation-dusk .info-label,
#separation-dawn .info-label {
    font-weight: normal;
}

#separation-dusk-desc,
#separation-dawn-desc {
    font-size: 0.88em;
    color: var(--text-secondary);
    margin-top: 2px;
    line-height: 1.3;
}

/* Target info display styling */
.info-label-small {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
  display: block;
}

.info-value-display {
  color: var(--accent-primary);
  font-size: 0.95rem;
}

/* Form horizontal layout - fixed spacing between label and value */
.form-group.form-horizontal {
    display: flex;
    align-items: baseline;
    margin-bottom: 0.25em;
}

.form-group.form-horizontal label {
    flex: 0 0 auto;
    white-space: nowrap;
    margin-bottom: 0;
    margin-right: 1em;
}

.form-group.form-horizontal .field-display,
.form-group.form-horizontal .info-value-display {
    flex: 0 0 auto;
}

.form-group.form-horizontal input,
.form-group.form-horizontal select {
    flex: 1;
    margin-bottom: 0;
}

/* Target info display box - matches original styling */
#target-info-display .form-group {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 12px;
}

#target-info-display .info-label-small {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    display: block;
    font-weight: normal;
}

#target-info-display .info-value-display {
    color: var(--accent-primary);
    font-size: 0.95rem;
    font-weight: 500;
}

/* Info box wrapper - single box for multiple fields */
.info-box-wrapper {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 12px;
}

.info-box-wrapper .form-group {
    margin-bottom: 0.5rem;
    background: none !important;
    border: none !important;
    padding: 0 !important;
}

.info-box-wrapper .form-group:last-child {
    margin-bottom: 0;
}

/* Target info display box - only for the Type/Constellation/etc section */
#target-info-display > .form-group {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 12px;
}

/* Remove styles from form-groups inside info-box-wrapper */
#target-info-display .info-box-wrapper .form-group {
    background: none !important;
    border: none !important;
    padding: 0 !important;
}

/* Target Details card layout with icon */
.target-details-layout {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.target-details-content {
    flex: 1;
}

.target-icon-display {
    font-size: 2.8em;
    line-height: 1;
}

/* Results View */
.results-view {
    max-width: 1200px;
    margin: 0 auto;
}

.results-cards-container {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
}

.result-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    transition: all 0.2s ease;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    gap: 1rem;
}

.result-header h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.result-duration {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 1rem;
    flex: 1;
}

.result-body {
    margin-bottom: 0;
}

.result-row {
    display: flex;
    padding: 0.25rem 0;
    color: var(--text-color);
    gap: 1.5em;
}

.result-label {
    color: var(--text-secondary);
    font-weight: 500;
    text-align: right;
    min-width: 200px;
    flex-shrink: 0;
}

.result-value {
    text-align: left;
    flex: 1;
}

.result-footer {
    display: none;
}

.analyze-skyglow-btn {
    min-width: 150px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* View Header */
.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.view-header h2,
.view-header h1 {
    margin: 0;
    color: var(--text-primary);
}

/* Annual Altitude Graph SVG Styling */
.svg-background {
    fill: var(--bg-color);
}

.svg-month-label {
    fill: var(--text-secondary);
}

.svg-grid-line {
    stroke: var(--border-color);
}

/* Annual Legend */
.annual-legend-text {
    color: var(--text-color);
}

.form-group.form-inline {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Two-column settings row */
.settings-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.form-group.form-inline label {
    flex: 0 0 auto;
    margin-bottom: 0;
}

.form-group.form-inline select,
.form-group.form-inline input {
    flex: 1;
}

.target-detail-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.detail-section {
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.75rem;
}

.detail-section h4 {
  margin: 0 0 0.5rem 0;
  font-size: 0.95rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.25rem;
}

.detail-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detail-item {
  display: flex;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.detail-label {
  font-weight: 500;
  color: var(--text-secondary);
  min-width: 140px;
}

.detail-value {
  color: var(--text-primary);
  word-break: break-word;
}


/* Cascading Hamburger Menu Styles - ADD TO base.css */

/* Menu parent with arrow */
.menu-parent {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-parent.expanded .menu-arrow {
    transform: rotate(90deg);
}

.menu-arrow {
    transition: transform 0.2s ease;
    font-size: 1.2em;
    margin-left: auto;
    padding-left: 0.5rem;
}

/* Submenu container */
.menu-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0, 0, 0, 0.2);
}

/* increase the max-height if additional items are added to the */
/* Admin Tools submenu */
.menu-submenu.expanded {
    max-height: 400px;
}

/* Submenu items */
.submenu-item {
    padding-left: 3rem !important;
    font-size: 0.95em;
}

.submenu-item:hover {
    background: var(--hover-bg);
}

/* Small buttons for inline actions */
.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.85em;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-sm.btn-secondary {
    background: var(--button-secondary-bg);
    color: var(--button-secondary-text);
}

.btn-sm.btn-secondary:hover {
    background: var(--button-secondary-hover);
}

.btn-sm.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-sm.btn-danger:hover {
    background: #c82333;
}

/* Wikipedia Link Hover Effect */
.wiki-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

.wiki-link:hover {
    color: var(--text-color);
    text-shadow: 0 0 10px var(--primary-color),
                 0 0 20px var(--primary-color);
}

/* Matrix theme specific: Enhanced glow for better contrast */
[data-theme="matrix"] .wiki-link:hover {
    color: #ffffff;
    text-shadow: 0 0 8px var(--primary-color),
                 0 0 16px var(--primary-color),
                 0 0 24px var(--primary-color),
                 0 0 32px var(--primary-color);
}

/*
 ========================================================
Help file markup
*/

/* Markdown content styling */
.markdown-content {
    line-height: 1.6;
}

.markdown-content h1 {
    font-size: 1.8em;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.3rem;
}

.markdown-content h1:first-child {
    margin-top: 0;
}

.markdown-content h2 {
    font-size: 1.4em;
    margin-top: 1.5rem;
    margin-bottom: 0.6rem;
    font-weight: 600;
}

.markdown-content h3 {
    font-size: 1.2em;
    margin-top: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.markdown-content p {
    margin-bottom: 1rem;
}

.markdown-content ul, .markdown-content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.markdown-content li {
    margin-bottom: 0.4rem;
    line-height: 1.6;
}

.markdown-content ul {
    list-style-type: disc;
}

.markdown-content ul ul {
    list-style-type: circle;
}

.markdown-content code {
    background: var(--card-bg);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.markdown-content pre {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.markdown-content pre code {
    background: none;
    padding: 0;
}

.markdown-content strong {
    font-weight: 600;
}

.markdown-content em {
    font-style: italic;
}

.markdown-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin: 1rem 0;
    color: var(--text-secondary);
}

/* END OF Help file markup */


/* To Do List View Styles */
.todo-type-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--card-bg);
}

.todo-type-card h3 {
    margin: 0 0 0.75rem 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.todo-targets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    line-height: 1.8;
}

.todo-target-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.todo-target-link {
    color: var(--accent-color);
    text-decoration: none;
    cursor: pointer;
}

.todo-target-link:hover {
    text-decoration: underline;
}

.btn-remove-todo {
    background: var(--danger-color, #ef4444);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-remove-todo:hover {
    opacity: 0.8;
}

/* To Do List View Styles */
.todo-view-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.todo-view-header h2 {
    margin: 0;
}

.todo-sort-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.todo-sort-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.todo-sort-select {
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
}

.todo-empty-message {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.todo-empty-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.todo-type-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--card-bg);
}

.todo-type-card h3 {
    margin: 0 0 0.75rem 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.todo-targets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    line-height: 1.8;
}

.todo-target-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.todo-target-link {
    color: var(--accent-color);
    text-decoration: none;
    cursor: pointer;
}

.todo-target-link:hover {
    text-decoration: underline;
}

.btn-remove-todo {
    background: var(--danger-color, #ef4444);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-remove-todo:hover {
    opacity: 0.8;
}

/* END OF To Do List View Styles */

/* Rise Time Chart View */
.todo-view-header-with-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.todo-view-header-with-toggle h2 {
    margin: 0;
}

.todo-view-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-toggle-chart {
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn-toggle-chart:hover {
    background: var(--card-hover);
}

.todo-rise-chart-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin: 0 auto;
    max-width: 1400px;
}

#todo-rise-chart {
    display: block;
    margin: 0 auto;
}

/* END OF Rise Time Chart View */

/* highlighting pinned targets in the todo lists */

.todo-target-pinned {
    background-color: rgba(251, 191, 36, 0.2); /* Gold tint */
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
}

/* END OF highlighting pinned targets in the todo lists */

.card-header:has(#seq-plan-af-note) {
    display: flex;
    align-items: center;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    margin: 0;
}

select {
    background: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.4rem;
    border-radius: 4px;
}

/* Style the dropdown arrow to match theme */
select::-webkit-select-arrow {
    filter: invert(var(--is-dark-theme, 0));
}

input[type="date"] {
    background: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.4rem;
    border-radius: 4px;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(var(--is-dark-theme, 0));
}

input[type="time"] {
    background: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.4rem;
    border-radius: 4px;
}

/* Style the time picker icon to match theme */
input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(var(--is-dark-theme, 0));
}

/* end of Sequence Planner styles */

/* specific style for sliders and checkboxes */
/* Checkbox styling to match theme */
input[type="checkbox"] {
    accent-color: var(--primary-color);
    cursor: pointer;
}

/* Range slider styling to match theme */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    border: none;
    cursor: pointer;
}

/* Highlight min altitude dropdown when overriding global default */
select.altitude-override-active,
#modal-min-altitude-daily.altitude-override-active,
#modal-min-altitude-yearly.altitude-override-active {
    box-shadow: 0 0 8px var(--warning-color) !important;
    border: 2px solid var(--warning-color) !important;
    outline: none !important;
}
