/* Prevent double-tap zoom on touch devices */
* {
    touch-action: manipulation;
}

/* Auto-dismiss flash animation */
.flash-msg {
    animation: fadeOutFlash 4s forwards;
}

@keyframes fadeOutFlash {
    0%, 70% { opacity: 1; }
    100% { opacity: 0; pointer-events: none; }
}

/* Theme-aware logo: hide both by default, show only the correct one */
.logo-light,
.logo-dark {
    display: none !important;
}

[data-bs-theme="light"] .logo-light,
[data-bs-theme="dark"] .logo-dark {
    display: inline !important;
}

/* Admin table tweaks */
.table td, .table th {
    vertical-align: middle;
}

/* Touch-friendly board cards */
.board-card {
    min-height: 120px;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    word-break: break-word;
    touch-action: manipulation;
    transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.1s ease;
    user-select: none;
    cursor: pointer;
    background-color: #0B6EFD;
    color: #FFFFFF;
    border-color: #0B6EFD;
}

.board-card .card-title {
    color: #FFFFFF;
}

.board-card small {
    color: rgba(255, 255, 255, 0.75) !important;
}

.board-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(11, 110, 253, 0.4);
    background-color: #0a5edb;
    border-color: #0a5edb;
}

.board-card:active {
    transform: scale(0.97);
}

/* Timing table - wide scrollable container */
.timing-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -12px;
    padding: 0 12px;
}

.timing-table {
    font-size: 0.85rem;
}

/* Frozen first column (Name) */
.timing-table th:first-child,
.timing-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--bs-body-bg);
    border-right: 2px solid var(--bs-border-color);
    min-width: 150px;
}

.timing-table thead th:first-child {
    z-index: 3;
}

/* Column group colors */
.col-info {
    background-color: rgba(var(--bs-info-rgb), 0.05);
}

.col-input {
    background-color: rgba(var(--bs-primary-rgb), 0.05);
}

.col-smv {
    background-color: rgba(var(--bs-success-rgb), 0.05);
}

.col-smv-sec {
    background-color: rgba(var(--bs-warning-rgb), 0.05);
}

.col-bm {
    background-color: rgba(var(--bs-danger-rgb), 0.05);
}

.col-bm-sec {
    background-color: rgba(108, 117, 125, 0.05);
}

/* Compact table cells */
.timing-table td, .timing-table th {
    white-space: nowrap;
    padding: 0.35rem 0.5rem;
}

/* Description column: soft-wrap long text */
.timing-table .desc-cell {
    white-space: normal;
    word-break: break-word;
    min-width: 120px;
    max-width: 250px;
}

/* Calculation preview in form */
.calc-preview {
    font-family: monospace;
    font-size: 0.9rem;
}

.calc-preview td {
    padding: 0.25rem 0.5rem;
}

/* Search input */
.search-input {
    max-width: 300px;
}
