/* Illustrated Workout - Custom Styles */

:root {
    --iw-green: #27ae60;
    --iw-green-dark: #1e8449;
    --iw-green-light: #2ecc71;
}

/* Navbar */
.navbar-brand {
    font-size: 1.4rem;
}

/* Cards */
.card {
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-2px);
}

/* Exercise grid cards */
.card-img-top {
    background-color: #f8f9fa;
}

/* Badges */
.badge.bg-outline-secondary {
    background-color: transparent !important;
    border: 1px solid #6c757d;
    color: #6c757d;
}

/* Forms */
.form-control:focus,
.form-select:focus {
    border-color: var(--iw-green);
    box-shadow: 0 0 0 0.2rem rgba(39, 174, 96, 0.25);
}

/* Print styles */
@media print {
    .navbar, footer, .no-print, .alert {
        display: none !important;
    }
    main {
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* Dashboard stats */
.card h3 {
    font-size: 2rem;
    font-weight: 700;
}

/* Table improvements */
.table th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive fixes */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.85rem;
    }
}

/* ── iOS DOES NOT ZOOM BACK OUT ───────────────────────────────
   Safari on iPhone auto-zooms the whole page whenever a form field is
   focused whose font-size is under 16px, and it does not undo the zoom when
   the field is blurred — the visitor is left on a zoomed page they have to
   pan sideways. Bootstrap's own -sm variants are 0.875rem (14px), so every
   compact field on the site triggered it, including the one that matters
   most: the "email me this workout" capture on the wizard preview, which is
   the single conversion action in the funnel.

   16px is the threshold, not a preference — this is the smallest value that
   suppresses the zoom. Phone widths only, so the compact look is unchanged
   on the desktop admin grids it was designed for. The -sm classes are named
   explicitly because they carry the same specificity as their base class and
   would otherwise win on source order inside Bootstrap. */
@media (max-width: 575.98px) {
    .form-control,
    .form-select,
    .form-control-sm,
    .form-select-sm,
    .input-group-sm > .form-control,
    .input-group-sm > .form-select {
        font-size: 16px;
    }
}

/* Phone navbar: brand + the always-visible "Track workout" button + the menu
   button must share ONE row. Measured: at the default sizes the menu button
   wrapped to a second row on a 390px phone; with the two-word label (a bare
   "Log" read as "Log in") it wrapped at every phone width until the brand
   was tightened and the button lost its icon below 420px. */
@media (max-width: 420px) {
    .navbar .navbar-brand { font-size: .95rem; margin-right: .25rem; }
    .navbar .nav-log-btn { font-size: .82rem; padding: .3rem .5rem; }
    .navbar .nav-log-btn .bi { display: none; }
}
@media (max-width: 380px) {
    .navbar .navbar-brand { font-size: .85rem; }
    .navbar .navbar-brand .bi { display: none; }
    .navbar .navbar-toggler { padding: .2rem .45rem; }
}
