/* =====================================================================
   ToolDuty - all-device layer (phones, tablets, laptops, big monitors)
   Loaded last on every page. Fixes found by testing 9 screen sizes
   (320px phone ... 1920px monitor, plus phone landscape).
   ===================================================================== */

/* --- 1. Never allow sideways scrolling; media never wider than screen --- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { max-width: 100%; overflow-x: clip; }
img, video, canvas { max-width: 185%; }
img { height: auto; }
img[width][height] { height: auto; }

/* --- 2. Touch: no 300ms delay, no accidental double-tap zoom on controls --- */
a, button, input, select, textarea, label, summary, [role="button"] { touch-action: manipulation; }

/* --- 3. Phones & tablets --- */
@media (max-width: 1024px), (pointer: coarse) {
    /* iPhone zooms the page when a field under 16px gets focus - stop that */
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
    select,
    textarea { font-size: 16px; }

    input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    select { min-height: 44px; }

    input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; flex: 0 0 22px; }

    /* Small links and buttons get a comfortable 44px touch area */
    button, .btn, [role="button"], select,
    .brand, .brand-services-btn, .nav-cta, .auth-home, .back-home, .verify-home,
    .showRegister, .ghost-btn, .primary-btn, .secondary-btn, .mumbai-feature,
    .home-categories-all, .sd-retry, .resend-btn, .heroSearchButton, .password-toggle,
    .filter, .footer-brand, .pill, .chip {
        min-height: 44px;
    }
    .password-toggle, .icon-btn, .modal-close, .td-auth-close { min-width: 44px; min-height: 44px; }
    header .nav-cta, .navbar .nav-cta { min-height: 44px !important; height: auto !important; }
    input[type="checkbox"], input[type="radio"] { width: 24px; height: 24px; flex-basis: 24px; }
    body.dashboard-page .panel-head .ghost-btn,
    body.dashboard-page .data-table .booking-action-btn { min-height: 44px; }

    header nav a, .header-nav a, .nav-links a { min-height: 44px; display: inline-flex; align-items: center; }

    footer a, .footer a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }

    /* Text links that sit alone on a line (e.g. "View all services") */
    .home-categories-all, a.text-link { display: inline-flex; align-items: center; }

    /* Icon-only links (social icons, back arrows, nav buttons) are 44px wide too */
    .social-links a, .auth-home, .nav-cta, .brand-services-btn, .auth-footer a, footer a, .back-home, .verify-home {
        min-width: 44px;
        justify-content: center;
    }

    /* Plain text links inside sentences: bigger hit area, same look */
    p a, li a, label a, small a, .home-category-empty a { padding-block: 12px; }
    .forgot-password a { display: inline-block; padding: 12px 0; }

    /* Fixed bars must clear the iPhone home indicator */
    .ux-tabbar { padding-bottom: calc(6px + env(safe-area-inset-bottom)); }
}

/* --- 4. Text that is too small to read on a phone: lift to 12px --- */
@media (max-width: 1024px) {
.brand-copy small{font-size:12px}
.simple-eyebrow{font-size:12px}
.art-label{font-size:12px}
.business-links>div>span{font-size:12px}
.business-links small{font-size:12px}
.showcase-caption span{font-size:12px}
.showcase-side span{font-size:12px}
.member-open{font-size:12px}
.member-no{font-size:12px}
.member-info p{font-size:12px}
.member-category{font-size:12px}
.simple-cta-btn{font-size:12px}
.footer-brand small{font-size:12px}
.footer-brand-block p{font-size:12px}
.social-links a{font-size:12px}
.footer-grid h3{font-size:12px}
.footer-grid>div:not(.footer-brand-block)>a{font-size:12px}
.footer-grid>div>p{font-size:12px}
.footer-bottom>div{font-size:12px}
.modal-label{font-size:12px}
.modal-tags span{font-size:12px}
.modal-link{font-size:12px}
.modal-copy .developer-role i{font-size:12px}
.dash-brand small{font-size:12px}
.data-table th{font-size:12px}
.badge{font-size:12px}
.detail-box small{font-size:12px}
.payment-method{font-size:12px}
.admin-profile-role{font-size:12px}
.admin-password-strength{font-size:12px}
.admin-profile-note{font-size:12px}
.admin-account-chevron{font-size:12px}
#bookings .data-table td small{font-size:12px}
.profile-role-badge{font-size:12px}
.application-history small{font-size:12px}
.eyebrow{font-size:12px}
.filter{font-size:12px}
.job>small{font-size:12px}
.job div{font-size:12px}
.benefits p{font-size:12px}
.process b{font-size:12px}
.formIntro strong{font-size:12px}
.formCard label{font-size:12px}
.formCard form>p{font-size:12px}
.foot p{font-size:12px}
.foot>a:last-child{font-size:12px}
.stepGrid span{font-size:12px}
.tracker-meta small{font-size:12px}
.tracker-step{font-size:12px}
.tracker-dot{font-size:12px}
.chat-toggle .fixbot-sleep-bubble .sleep-z-3{font-size:12px}
.chat-header span{font-size:12px}
.brand small,
.footer-brand small{font-size:12px}
.hero-trust small{font-size:12px}
.card-label{font-size:12px}
.mini-points i{font-size:12px}
.form-top span{font-size:12px}
.consent{font-size:12px}
.form-status{font-size:12px}
.journey-step>span{font-size:12px}
.footer-bottom{font-size:12px}
.ux-tabbar button{font-size:12px}
.progress-step{font-size:12px}
#bookings .orders-breadcrumb i{font-size:12px}
#bookings .order-price small{font-size:12px}
#bookings .order-status-note{font-size:12px}
#bookings .order-footer-left{font-size:12px}
#bookings .order-review-summary small{font-size:12px}
#bookings .orders-breadcrumb{font-size:12px}
#bookings .order-service-category,
    #bookings .order-booking-meta{font-size:12px}
#applications .application-card .application-code{font-size:12px}
#applications .application-meta small{font-size:12px}
#applications .application-step{font-size:12px}
.section-number{font-size:12px}
.info-icon{font-size:12px}
.contact-item small{font-size:12px}
.review-service{font-size:12px}
.sd-breadcrumb i{font-size:12px}
.sd-pill{font-size:12px}
.sd-visual-copy .eyebrow{font-size:12px}
.sd-meta-chip{font-size:12px}
.sd-booking-label{font-size:12px}
.sd-price small{font-size:12px}
.sd-booking-note{font-size:12px}
.sd-secure{font-size:12px}
.sd-trust-card span{font-size:12px}
.sd-section-head p{font-size:12px}
.sd-section-kicker{font-size:12px}
.sd-include i{font-size:12px}
.sd-include strong{font-size:12px}
.sd-include span{font-size:12px}
.sd-step-num{font-size:12px}
.sd-step strong{font-size:12px}
.sd-step span{font-size:12px}
.sd-mini-card p{font-size:12px}
.sd-mini-actions a{font-size:12px}
.sd-faq-answer{font-size:12px}
.hero-kicker,
.section-kicker{font-size:12px}
.popular-searches{font-size:12px}
.floating-trust-card small{font-size:12px}
.filter-trigger span{font-size:12px}
.sort-control span{font-size:12px}
.filter-panel-head button{font-size:12px}
.filter-group label{font-size:12px}
.filter-help p{font-size:12px}
.service-category-badge{font-size:12px}
.rating{font-size:12px}
.review-count{font-size:12px}
.service-card p{font-size:12px}
.service-card-meta{font-size:12px}
.service-card-footer small{font-size:12px}
.details-btn,
.book-btn{font-size:12px}
.all-services-head span{font-size:12px}
.trust-grid p{font-size:12px}
.faq-grid summary i{font-size:12px}
.faq-grid p{font-size:12px}
.floating-trust-card strong{font-size:12px}
.hero-search-box button{font-size:12px}
.popular-searches button{font-size:12px}
.date-option small{font-size:12px}
.payment-description{font-size:12px}
.payment-arrow{font-size:12px}
.payment-badge{font-size:12px}
.nav-link i{font-size:12px}
.call-head b{font-size:12px}
.call-head small{font-size:12px}
.whatsapp-head{font-size:12px}
.location-pill{font-size:12px}
.trust-points i{font-size:12px}
.trust-points span{font-size:12px}
.trust-points b{font-size:12px}
.hero-btn b{font-size:12px}
.hero-btn small{font-size:12px}
.why-item p{font-size:12px}
.process-item p{font-size:12px}
.mumbai-location{font-size:12px}
.mumbai-visual span{font-size:12px}
.quick-book p{font-size:12px}
.quick-book input,
.quick-book select,
.booking-form input,
.booking-form select{font-size:12px}
.review-person span{font-size:12px}
.faq-grid details p{font-size:12px}
.booking-contact a{font-size:12px}
.btn-submit,
.btn-secondary{font-size:12px}
.modal-content p{font-size:12px}
.brand-tagline{font-size:12px}
.appliance-card p{font-size:12px}
.appliance-card button{font-size:12px}
.appliance-card button i{font-size:12px}
.appliance-card .service-duration{font-size:12px}
.mumbai-feature span{font-size:12px}
.mumbai-stat span{font-size:12px}
.mumbai-city-title small{font-size:12px}
.mumbai-fast-badge span{font-size:12px}
.mumbai-highlight strong{font-size:12px}
.mumbai-highlight small{font-size:12px}
.mumbai-watermark span{font-size:12px}
.mumbai-feature strong{font-size:12px}
.mumbai-highlight>i{font-size:12px}
.mumbai-fast-badge strong{font-size:12px}
.mumbai-hero-btn small{font-size:12px}
.nav-search input{font-size:12px}
.mumbai-hero-btn strong{font-size:12px}
.mumbai-info p{font-size:12px}
.td-auth-eyebrow{font-size:12px}
.td-auth-foot{font-size:12px}
.home-categories-eyebrow{font-size:12px}
.home-category-text small{font-size:12px}
.home-category-arrow{font-size:12px}
.home-category-text strong{font-size:12px}
.security-note{font-size:12px}
.verify-footer{font-size:12px}
.progress-number{font-size:12px}
.summary-head p{font-size:12px}
.order-item-copy p i{font-size:12px}
.booking-summary-icon{font-size:12px}
.booking-summary-detail small{font-size:12px}
.booking-summary-detail strong{font-size:12px}
.included-value{font-size:12px}
.included-value i{font-size:12px}
.order-item p{font-size:12px}
.store-note{font-size:12px}
.trust-item{font-size:12px}
.checkout-help{font-size:12px}
.mobile-total small{font-size:12px}
.toolduty-success-booking-id{font-size:12px}
.toolduty-success-booking-id strong{font-size:12px}
.toolduty-success-detail small{font-size:12px}
.saved-address-title span{font-size:12px}
.change-address-btn{font-size:12px}
.checkout-address-editor-head p{font-size:12px}
.checkout-address-cancel{font-size:12px}
.checkout-address-grid .form-field label,
        .checkout-current-password label{font-size:12px}
.checkout-address-type{font-size:12px}
.checkout-location-btn{font-size:12px}
.footer{font-size:12px}
.google-divider{font-size:12px}
.auth-footer{font-size:12px}
}

/* --- 5. Small phones (320-360px) --- */
@media (max-width: 360px) {
    body { font-size: 15px; }
    h1 { font-size: clamp(24px, 8vw, 30px); overflow-wrap: anywhere; }
    h2 { overflow-wrap: anywhere; }
    .hero-glow { max-width: 100vw; }
    table { font-size: 14px; }
}

/* --- 6. Phone in landscape: short screens, keep headers from eating the view --- */
@media (max-height: 480px) and (orientation: landscape) {
    header.site-header, .dash-topbar { position: static !important; }
    .ux-tabbar { position: static; }
    body.dashboard-page .dash-content { padding-bottom: 24px; }
}

/* --- 7. Large monitors: keep lines readable instead of stretching forever --- */
@media (min-width: 1700px) {
    html { font-size: 17px; }
}

/* --- 8. Accessibility preferences --- */
@media (prefers-contrast: more) {
    :root { --fx-border: #9aa6ba; --fx-muted: #3d4a60; }
}
