/**
 * Minimal CSS — only what Tailwind can't express (toggle switch internals).
 * Everything else uses Tailwind utilities in HTML / src/tw.js.
 * Colours come from theme.css via Tailwind ios.* classes.
 */

* { -webkit-tap-highlight-color: transparent; }

/* iOS-style toggle — needs sibling selectors on hidden checkbox */
.ios-switch {
    position: relative;
    width: 51px;
    height: 31px;
    flex-shrink: 0;
}

.ios-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.ios-switch-track {
    position: absolute;
    inset: 0;
    background: var(--color-fill);
    border-radius: 31px;
    transition: background 0.2s ease;
}

.ios-switch-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 27px;
    height: 27px;
    background: var(--color-switch-thumb);
    border-radius: 50%;
    box-shadow: 0 2px 6px var(--color-shadow);
    transition: transform 0.2s ease;
}

.ios-switch input:checked + .ios-switch-track {
    background: var(--color-success);
}

.ios-switch input:checked + .ios-switch-track .ios-switch-thumb {
    transform: translateX(20px);
}

.ios-switch input:disabled + .ios-switch-track {
    opacity: 0.4;
}

/* Text inputs, selects, stepper controls */
.ios-field {
    background: var(--color-field-bg);
    border: 1px solid var(--color-field-border);
    outline: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.ios-field:focus {
    background: var(--color-field-focus-bg);
    border-color: var(--color-field-focus-border);
}

/* Bottom tab bar — full width, edge to edge */
.ios-tab-bar {
    display: flex;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--color-tab-bar);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--color-separator);
}

.ios-tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    min-height: 3.125rem;
    padding: 0.375rem 0.25rem 0.5rem;
    border: none;
    background: transparent;
    color: var(--color-text-tertiary);
    cursor: pointer;
    transition: color 0.2s ease, opacity 0.12s ease;
    -webkit-tap-highlight-color: transparent;
}

.ios-tab-item:active {
    opacity: 0.65;
}

.ios-tab-item.active {
    color: var(--color-accent);
}

.ios-tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.625rem;
    height: 1.625rem;
}

.ios-tab-icon svg {
    width: 1.375rem;
    height: 1.375rem;
    stroke-width: 1.75;
}

.ios-tab-item.active .ios-tab-icon svg {
    stroke-width: 2.25;
}

.ios-tab-label {
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.2;
}

.ios-tab-item.active .ios-tab-label {
    font-weight: 700;
}
