/* iOS Safari auto-zooms into any focused form field rendered under 16px and
   never zooms back out — the page then sits "slightly zoomed in" until the
   user pinches out. Modern iOS ignores user-scalable=no, so the only reliable
   fix is >=16px text in inputs on touch devices. */
@media (pointer: coarse) {
    input, select, textarea {
        font-size: 16px !important; /* must beat Tailwind's text-sm etc. */
    }
}

a[href="/worker-rewards.html"],
a[href="/worker-pro-club.html"],
button[onclick*="/worker-rewards.html"],
button[onclick*="/worker-pro-club.html"] {
    display: none !important;
}

.worker-loading-spinner {
    display: inline-block;
    width: 2.5rem;
    height: 2.5rem;
    border: 4px solid rgba(16, 185, 129, 0.2);
    border-top-color: #10b981;
    border-radius: 9999px;
    animation: worker-spinner-rotate 0.8s linear infinite;
}

.worker-loading-spinner-sm {
    width: 2rem;
    height: 2rem;
    border-width: 3px;
}

.worker-loading-spinner-lg {
    width: 3.5rem;
    height: 3.5rem;
}

@keyframes worker-spinner-rotate {
    to {
        transform: rotate(360deg);
    }
}

@media (min-width: 1024px) {
    body:not(.worker-portal-page) {
        padding-left: 264px;
        background: #f4f7f5;
    }

    .worker-desktop-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 80;
        display: flex;
        width: 264px;
        flex-direction: column;
        border-right: 1px solid #e2e8e4;
        background: linear-gradient(to bottom, #047857, #10b981);
        box-shadow: 8px 0 30px rgba(15, 23, 42, 0.04);
    }

    .worker-desktop-brand {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 28px 24px;
        border-bottom: 1px solid rgba(52, 211, 153, 0.5);
    }

    .worker-desktop-brand .text-gray-500 {
        color: #d1fae5;
    }

    .worker-desktop-brand img {
        width: auto;
        max-width: 180px;
        height: 40px;
        object-fit: contain;
        border-radius: 0;
    }

    .worker-desktop-nav {
        display: flex;
        flex: 1;
        flex-direction: column;
        gap: 6px;
        padding: 24px 14px;
    }

    .worker-desktop-link {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        border: 0;
        border-radius: 12px;
        padding: 12px 14px;
        background: transparent;
        color: #d1fae5;
        font-size: 14px;
        font-weight: 600;
        text-align: left;
        text-decoration: none;
        transition: background 0.2s ease, color 0.2s ease;
    }

    .worker-desktop-link:hover,
    .worker-desktop-link.active {
        background: rgba(6, 78, 59, 0.5);
        color: #ffffff;
    }

    .worker-desktop-link svg {
        width: 19px;
        height: 19px;
        flex-shrink: 0;
    }

    .worker-desktop-footer {
        border-top: 1px solid rgba(52, 211, 153, 0.5);
        padding: 18px 14px 22px;
    }

    body:not(.worker-portal-page) .bottom-nav {
        display: none;
    }

    body:not(.worker-portal-page) > header,
    body:not(.worker-portal-page) > .sticky,
    body:not(.worker-portal-page) > [class*="sticky"] {
        position: sticky;
        top: 0;
        z-index: 50;
    }

    body:not(.worker-portal-page) > .container,
    body:not(.worker-portal-page) > [class*="max-w-2xl"],
    body:not(.worker-portal-page) > [class*="max-w-4xl"] {
        max-width: 1180px;
        margin-left: auto;
        margin-right: auto;
    }

    body:not(.worker-portal-page) .max-w-2xl {
        max-width: 1180px;
    }

    body:not(.worker-portal-page) .max-w-4xl {
        max-width: 1180px;
    }

    .worker-desktop-page .worker-desktop-wide-grid {
        display: grid;
        grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.85fr);
        gap: 24px;
    }

    body.worker-portal-page .container {
        max-width: 720px;
        padding-top: 64px;
        padding-bottom: 64px;
    }

    body.worker-portal-page .max-w-md {
        max-width: 560px;
    }

    body.worker-portal-page #brandingLogo > div {
        width: 76px;
        height: 76px;
    }

    body.worker-portal-page #brandingLogo svg {
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 1023px) {
    .worker-desktop-sidebar {
        display: none;
    }
}
