/* Campaign colour accent - applied via inline style */
.campaign-accent {
    border-left: 4px solid var(--campaign-colour, #6366f1);
}

/* Cognitive load badges */
.badge-deep { background-color: #4338ca; color: #e0e7ff; }
.badge-medium { background-color: #d97706; color: #fef3c7; }
.badge-light { background-color: #059669; color: #d1fae5; }

/* Energy indicators */
.energy-green { color: #22c55e; }
.energy-yellow { color: #eab308; }
.energy-red { color: #ef4444; }

/* Health dots */
.health-green { background-color: #22c55e; }
.health-yellow { background-color: #eab308; }
.health-red { background-color: #ef4444; }

/* HTMX transitions */
.htmx-swapping { opacity: 0; transition: opacity 200ms ease-out; }
.htmx-settling { opacity: 1; transition: opacity 200ms ease-in; }

/* Prevent iOS zoom on input focus */
@media (max-width: 640px) {
    input[type="text"],
    input[type="number"],
    input[type="date"],
    textarea,
    select {
        font-size: 16px;
    }
}

/* Modal overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 60;
    padding: 0.5rem;
}

.modal-content {
    background: #1f2937;
    border-radius: 0.75rem;
    padding: 1.25rem;
    max-width: 32rem;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* On small screens, modal takes nearly full width and has safe area insets */
@media (max-width: 640px) {
    .modal-overlay {
        align-items: flex-end;
        padding: 0;
    }
    .modal-content {
        max-width: 100%;
        width: 100%;
        border-radius: 0.75rem 0.75rem 0 0;
        max-height: 92vh;
        padding: 1.25rem;
        padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0));
    }
}

/* Prevent background scroll when modal is open */
body.modal-open {
    overflow: hidden;
}
