.custom-switch {
    position: relative;
    display: inline-block;
    margin-right: 1em;
}

.custom-switch input[type="checkbox"] {
    display: none;
}

.custom-switch label {
    display: inline-block;
    padding: 0.25em 0.5em;
    border-radius: 0.25em;
    background-color: #e9ecef;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.custom-switch input[type="checkbox"]:checked + label {
    background-color: #28a745;
    color: white;
}

.custom-switch label small {
    margin-left: 0.5em;
    opacity: 0.8;
}

/* Styles for sub-flight plan toggles */
.tiny-card .custom-switch {
    position: absolute;
    right: 1em;
    top: 50%;
    transform: translateY(-50%);
}

.tiny-card .custom-switch label {
    font-size: 0.875em;
    padding: 0.2em 0.4em;
}

/* Card header layout */
.card-header {
    display: flex;
    align-items: center;
    padding: 1em;
    position: relative;
}

.title-section {
    flex-grow: 1;
}

.corner-text {
    margin-right: 1em;
    text-align: right;
    white-space: nowrap;
}

/* Tiny card header layout */
.tiny-card-header {
    display: flex;
    align-items: center;
    padding: 0.25em 0;
    position: relative;
}

.tiny-title-section {
    flex-grow: 1;
    min-width: 0;
}

.tiny-corner-text {
    margin-right: 1em;
    text-align: right;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Base tiny card styles */
.tiny-card {
    width: 100%;
    box-sizing: border-box;
}

/* Tiny card content layout */
.tiny-card-content {
    padding: 0.25em 0;
}

.info-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.info-table td {
    width: 50%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0.1em 0;
}

.left-col {
    text-align: left;
    padding-right: 1em;
}

.right-col {
    text-align: right;
    padding-left: 1em;
    border-left: 1px solid #eee;
}

.col-left, .col-right {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.tiny-info-left,
.tiny-info-right {
    flex: 1;
    min-width: 0;
}

.tiny-info-col {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0.25em 0;
}

.tiny-info-left p,
.tiny-info-right p {
    margin: 0.25em 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Add card highlight animation */
@keyframes card-highlight {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 10px 5px rgba(0, 123, 255, 0.7);
        transform: scale(1.03);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
        transform: scale(1);
    }
}

.card-highlight-animation {
    animation: card-highlight 1s ease;
}

/* Field name label styling for map tooltips */
.field-name-label {
    background: rgba(255, 255, 255, 0.8);
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    padding: 5px 8px;
    border-radius: 3px;
    font-weight: bold;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000 !important;
}

/* Highlighted field name label when checkbox is checked */
.field-name-label-checked {
    background: rgba(255, 193, 7, 0.95) !important;
    border: 2px solid #e0a800 !important;
    font-weight: bold;
}

/* Layout for the label wrapping the checkbox + name inside a map tooltip */
.map-tooltip-label {
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Checkbox inside the map tooltip */
.map-field-checkbox {
    width: 14px;
    height: 14px;
    cursor: pointer;
    flex-shrink: 0;
}