/* Custom CSS for FamilySponsored */

/* Logo styling */
.navbar-brand img {
    max-height: 40px;
    width: auto;
}

/* Hero logo styling */
.hero-section img {
    max-width: 300px;
    width: 100%;
    height: auto;
    /* Removed filter that was causing white rectangle */
}

/* Enhanced social provider buttons */
.btn-social {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    width: 100%;
    padding: 1.25rem 1.5rem; /* 50% bigger padding */
    margin-bottom: 1rem;
    border: 1px solid var(--kiteai-border-color);
    background-color: white;
    color: var(--kiteai-text-color);
    border-radius: var(--kiteai-border-radius);
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 1.1rem; /* Bigger text */
    font-weight: 500;
}

.btn-social:hover {
    border-color: var(--kiteai-primary);
    color: var(--kiteai-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn-social i {
    font-size: 1.8rem; /* 50% bigger icons */
    width: 2.5rem;
    text-align: center;
}

/* Colorful provider icons */
.btn-social .fa-google { color: #ea4335; }
.btn-social .fa-microsoft { color: #00a1f1; }
.btn-social .fa-apple { color: #000000; }
.btn-social .fa-facebook { color: #1877f2; }
.btn-social .fa-twitter { color: #000000; } /* X logo is black */
.btn-social .fa-x-twitter { color: #000000; } /* X logo is black */

/* Custom X (Twitter) icon using CSS */
.icon-x-twitter {
    display: inline-block;
    width: 1.8rem;
    height: 1.8rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000000'%3E%3Cpath d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    text-align: center;
}

/* Primary vs other providers styling */
.btn-social.primary {
    border-color: var(--kiteai-primary);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.03) 0%, rgba(15, 23, 42, 0.07) 100%);
}

.btn-social.other {
    opacity: 0.9;
    font-size: 1rem;
    padding: 1rem 1.25rem;
}

/* Footer social icons styling */
.footer .social-links a {
    color: #ccc;
    font-size: 1.25rem;
    transition: color 0.2s ease;
}

.footer .social-links a:hover {
    color: white;
}

.footer .social-links .fa-google:hover { color: #ea4335; }
.footer .social-links .fa-apple:hover { color: #ffffff; }
.footer .social-links .fa-microsoft:hover { color: #00a1f1; }

/* Additional custom styles can be added here */
.logo-placeholder {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #334155 0%, #0f172a 100%);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin-right: 0.5rem;
}

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Enhanced Authentication Styles */

/* Background gradient for auth pages */
.bg-gradient-subtle {
    background: linear-gradient(135deg, #fbfaf8 0%, #f1efeb 100%);
}

/* Enhanced card shadows */
.card.shadow-lg {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Enhanced form control focus */
.form-control:focus {
    border-color: var(--kiteai-primary);
    box-shadow: var(--kiteai-box-shadow-focus);
}

/* Enhanced password strength indicator */
.progress {
    background-color: #e9ecef;
    border-radius: 4px;
}

.progress-bar {
    transition: width 0.3s ease;
}

/* Enhanced social auth buttons */
.btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-outline-dark:hover {
    background-color: #212529;
    border-color: #212529;
}

/* Enhanced mobile responsiveness */
@media (max-width: 576px) {
    .card-body {
        padding: 1.0rem !important;
    }
    
    .btn-lg {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
}

/* Enhanced accessibility */
.btn:focus {
    box-shadow: var(--kiteai-box-shadow-focus);
}

/* Enhanced loading states */
.spinner-border {
    width: 2rem;
    height: 2rem;
}

/* Enhanced device info display */
.device-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    border-left: 4px solid var(--kiteai-primary);
}

/* Enhanced form validation states */
.was-validated .form-control:valid {
    border-color: #198754;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='m2.3 6.73.8-.8-.8-.8 1.4-1.4.8.8 1.8-1.8.8.8-2.6 2.6zM6.564.75l-3.59 3.612-1.538-1.55L0 4.26l2.974 2.99L8 2.193z'/%3e%3c/svg%3e");
}

.was-validated .form-control:invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 1.4 1.4m0-1.4-1.4 1.4'/%3e%3c/svg%3e");
}

/* Enhanced password visibility toggle */
.input-group .btn {
    border-color: var(--bs-border-color);
}

.input-group .form-control:focus + .btn {
    border-color: var(--kiteai-primary);
}

/* Enhanced trust indicators */
.badge {
    font-size: 0.7rem;
    padding: 0.35em 0.65em;
}

/* Enhanced rounded corners */
.rounded-4 {
    border-radius: 1rem !important;
}

.rounded-top-4 {
    border-top-left-radius: 1rem !important;
    border-top-right-radius: 1rem !important;
}

.rounded-bottom-4 {
    border-bottom-left-radius: 1rem !important;
    border-bottom-right-radius: 1rem !important;
}

/* Enhanced collapsible sections */
.collapse .d-grid {
    margin-top: 0.5rem;
}

/* Enhanced loading animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spin {
    animation: spin 1s linear infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .service-card {
        margin-bottom: 1rem;
    }

    /* Enhanced mobile auth styles */
    .site-main .container-fluid {
        padding: 1rem !important;
    }
}

/* Shared FamilySponsored page system */
.site-main {
    min-height: 50vh;
    padding-bottom: 1rem;
    background: linear-gradient(180deg, #f7f5f2 0%, #fbfaf8 100%);
}

.site-main .hero-section:not(.home-hero) {
    background: transparent;
    color: var(--kiteai-text-color);
    padding: var(--page-top-space) 0 2rem;
    min-height: auto;
}

/* Space between the nav and a page's first heading: matches the home hero
   (about 28px of visible space on desktop, 22px on phones). */
:root {
    --page-top-space: clamp(1.5rem, 2.4vw, 2rem);
}

/* Short desktop windows (laptops): the home hero tightens to 1.25rem there, so match it. */
@media (min-width: 992px) and (max-height: 820px) {
    :root {
        --page-top-space: 0.95rem;
    }
}

.site-main .page-top {
    padding-top: var(--page-top-space);
}

.site-main .hero-section:not(.home-hero) h1 {
    color: var(--kiteai-primary);
    font-size: clamp(2.1rem, 5vw, 3.4rem);
    line-height: 1.12;
    letter-spacing: -0.045em;
}

.site-main .hero-section:not(.home-hero) .lead {
    color: var(--kiteai-secondary);
    font-size: 1.05rem;
    line-height: 1.65;
}

.site-main .card {
    background-color: #fff;
    border-color: var(--kiteai-border-color);
    border-radius: var(--kiteai-border-radius-lg);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.045);
}

.site-main .card-header {
    padding: 1rem 1.25rem;
    background-color: #fcfbf9;
    border-bottom-color: var(--kiteai-border-color);
}

.site-main .card-body {
    color: var(--kiteai-text-color);
}

.legal-document .card-body {
    padding: clamp(1.5rem, 4vw, 3rem);
}

.legal-document h2 {
    color: var(--kiteai-primary);
    letter-spacing: -0.02em;
}

.legal-document h3 {
    color: var(--kiteai-secondary);
}

.legal-document p,
.legal-document li {
    line-height: 1.7;
}

.site-main .bg-light {
    background-color: #f1efeb !important;
}

.site-main .alert-info {
    color: var(--kiteai-secondary);
    background-color: #f1efeb;
    border-color: var(--kiteai-border-color);
}

.site-main .text-primary {
    color: var(--kiteai-primary) !important;
}

.site-main .bg-primary {
    background-color: var(--kiteai-primary) !important;
}

.site-main .text-success {
    color: var(--kiteai-success) !important;
}

.site-main .bg-success {
    background-color: var(--kiteai-success) !important;
}

.site-main .text-info {
    color: var(--kiteai-info) !important;
}

.site-main .bg-info {
    background-color: var(--kiteai-info) !important;
}

.site-main .text-warning {
    color: #92400e !important;
}

.site-main .bg-warning {
    background-color: #b45309 !important;
}

.site-main .btn-primary:not(.builder-style-btn) {
    color: #fff;
    background-color: var(--kiteai-primary);
    border-color: var(--kiteai-primary);
}

.site-main .btn-primary:not(.builder-style-btn):hover,
.site-main .btn-primary:not(.builder-style-btn):focus-visible {
    background-color: var(--kiteai-primary-hover);
    border-color: var(--kiteai-primary-hover);
}

.site-main .btn-outline-primary:not(.builder-style-btn) {
    color: var(--kiteai-primary);
    border-color: var(--kiteai-primary);
}

.site-main .btn-outline-primary:not(.builder-style-btn):hover {
    color: #fff;
    background-color: var(--kiteai-primary);
}

.site-main .form-control,
.site-main .form-select {
    border-color: #d8d5ce;
    border-radius: 0.55rem;
}

.site-main .form-control:focus,
.site-main .form-select:focus {
    border-color: var(--kiteai-primary);
    box-shadow: 0 0 0 0.2rem rgba(15, 23, 42, 0.14);
}

.site-main :focus-visible {
    outline: 3px solid rgba(15, 23, 42, 0.55);
    outline-offset: 2px;
}

.site-main a:not(.btn) {
    color: #1e3a5f;
}

.site-main .accordion-item {
    border-color: var(--kiteai-border-color);
}

.site-main .accordion-button:not(.collapsed) {
    color: var(--kiteai-primary);
    background-color: #f1efeb;
    box-shadow: inset 0 -1px 0 var(--kiteai-border-color);
}

.site-main .accordion-button:focus {
    border-color: var(--kiteai-primary);
    box-shadow: 0 0 0 0.2rem rgba(15, 23, 42, 0.14);
}

/* Messaging account status badge (dashboard headers): neutral site colors, state shown by the icon */
.tablet-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.7rem;
    border: 1px solid var(--kiteai-border-color);
    border-radius: 999px;
    background: var(--kiteai-gray-100);
    color: var(--kiteai-primary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: help;
}

.tablet-status-badge i {
    margin-right: 0.4rem;
    color: var(--kiteai-gray-600);
}

.tablet-status-badge i.is-ok {
    color: var(--kiteai-success);
}

.tablet-status-badge i.is-attention {
    color: var(--kiteai-warning);
}

/* One-line footer: logo, copyright and links in a single wrapping row */
.footer-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.75rem;
    font-size: 0.9rem;
}

.footer-kiteai {
    padding: 1.25rem 0;   /* one-line footer: no tall block */
    background: #f7f5f2;
    color: var(--kiteai-secondary);
    border-top: 1px solid var(--kiteai-border-color);
}

.footer-kiteai a {
    color: var(--kiteai-secondary);
}

.footer-kiteai a:hover,
.footer-kiteai a:focus-visible {
    color: var(--kiteai-primary);
}

@media (max-width: 991.98px) {
    .navbar-kiteai {
        height: auto;
        min-height: 52px;
    }

    .navbar-kiteai > .container-fluid {
        flex-wrap: nowrap;
        gap: 0.25rem;
        padding-right: 0.75rem;
        padding-left: 0.75rem;
    }

    .navbar-kiteai .navbar-brand img {
        max-height: 34px;
    }

    .d-lg-none > .navbar-nav .nav-link {
        font-size: 0.88rem;
        line-height: 1.2;
        padding: 0.8rem 0.35rem;
        white-space: nowrap;
    }

    .navbar-toggler {
        flex: 0 0 auto;
        padding: 0.35rem 0.5rem;
    }
}

@media (max-width: 767.98px) {
    .site-main .card-header {
        padding: 0.85rem 1rem;
    }
}

/* Contact search (Step 1 and Manage Contacts): labels above fields, one place line, links */
/* ID box with its own Look up button on one row (the button matches the box height) */
.contact-search .lookup-row {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}
.contact-search .lookup-btn {
    flex-shrink: 0;
    min-width: 6.5rem;
}
/* Small text controls keep a 44px tap target without changing the line spacing (UI rules 12.4) */
.search-tips > summary,
.search-links .search-link,
.link-actions .search-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 0.25rem;
    margin: -0.5rem -0.25rem;
}
/* "(3 letters or more)" inside a floating label: smaller and lighter than the label */
.contact-search .field-hint {
    font-size: 0.8em;
    font-weight: 300;
    opacity: 0.75;
}
/* Same look as the site's text links (.site-main a:not(.btn)) */
.search-tips > summary {
    color: #1e3a5f;
    text-decoration: underline;
    cursor: pointer;
}
.search-tips[open] > summary {
    margin-bottom: 0;
}
/* Search: full width on phones, a normal button beside the fields on larger screens */
.search-submit {
    width: 100%;
}
@media (min-width: 576px) {
    .search-submit {
        width: auto;
        min-width: 12rem;
    }
}
/* Search error: a bubble under the field to fix, floating over the fields below (nothing moves) */
.contact-search .form-floating,
.search-submit-wrap {
    position: relative;
}
.search-bubble {
    position: absolute;
    top: calc(100% + 8px);
    left: 0.75rem;
    right: 0.75rem;
    z-index: 10;
    padding: 0.5rem 0.75rem;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    background-color: #fee2e2;
    color: #b91c1c;
    font-size: 0.9375rem;
    line-height: 1.35;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}
/* Same bubble as a hint, not an error (Step 1's Relationship menu, checkout's price lines) */
.hint-anchor,
.order-summary .summary-item {
    position: relative;
}
/* Blue (?) after a price line's label; a 44px tap area without changing the line height */
.info-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0.5rem;
    margin: -0.75rem -0.25rem -0.75rem 0;
    border: 0;
    background: none;
    color: #2563eb;
    font-size: 0.95rem;
    line-height: 1;
    vertical-align: middle;
    cursor: pointer;
}
.search-bubble.is-info {
    white-space: pre-line;   /* a tip may have a second line */
    left: 0;
    right: auto;
    width: max-content;
    max-width: min(18rem, 80vw);
    text-align: left;
    border-color: var(--kiteai-border-color, #dee2e6);
    background-color: #ffffff;
    color: var(--kiteai-text, #1f2937);
}
/* Above the menu: an open list drops down over anything below it */
.search-bubble.is-info {
    top: auto;
    bottom: calc(100% + 8px);
}
.search-bubble.is-info::before {
    top: auto;
    bottom: -7px;
    background-color: #ffffff;
    border: 0;
    border-right: 1px solid var(--kiteai-border-color, #dee2e6);
    border-bottom: 1px solid var(--kiteai-border-color, #dee2e6);
}
.search-bubble::before {   /* the pointer up to the field */
    content: "";
    position: absolute;
    top: -7px;
    left: 1.25rem;
    width: 12px;
    height: 12px;
    background-color: #fee2e2;
    border-top: 1px solid #fca5a5;
    border-left: 1px solid #fca5a5;
    transform: rotate(45deg);
}
/* "Can't find them?" on the left, Clear (and Cancel) on the right, one row */
.search-links {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    column-gap: 1rem;
    margin-top: 0.5rem;
}
.search-links-end {
    display: flex;
    column-gap: 1.25rem;
    flex-shrink: 0;
}

/* Search results scroll target */
#contactSearchResults {
    scroll-margin-top: 5rem; /* clear the fixed top bar */
}

/* Hint buttons: small, text-sized pictures of a real button inside a sentence ("press [+ Sponsor]").
   The site's button navy, washed out so they read as a pointer rather than a control. */
.hint-button {
    display: inline-block;
    padding: 0.1rem 0.55rem;
    border-radius: 0.4rem;
    background-color: color-mix(in srgb, var(--kiteai-primary, #0f172a) 62%, #ffffff);
    color: #ffffff;
    font-size: 0.875em;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
    cursor: default;
}

/* Compact fields: label attached to the left of its field (Bootstrap input-group).
   A shared minimum width lines up the field edges down a column. */
.field-chip {
    min-width: 9rem; /* fits the longest label, "Name on card *"; every label is this one size */
    justify-content: flex-end;
    color: var(--kiteai-text-muted, #6c757d);
}

/* ZIP beside State: sized for a 5-digit ZIP so the State box gets the rest of the row.
   A ZIP+4 still fits by scrolling. */
.input-group > .zip-input {
    flex: 0 0 5.5rem;
    width: 5.5rem;
}

/* A sub-heading line inside a form card (e.g. "Billing address" with its tick box):
   slightly larger than field text so it reads as a heading, not as another field. */
.form-subhead,
.form-subhead h6 {
    font-size: 1.1rem;
}

/* Narrow cards (sign up): one shorter shared label width so the boxes get the room. */
.field-chip.field-chip-narrow {
    min-width: 6.25rem;
}

/* ============================================
   Phone layout fixes (mobile review, 2026-10-24)
   ============================================ */

/* Headings break into even lines instead of leaving one word alone ("... Can / Do") */
.site-main h1,
.site-main h2,
.site-main h3 {
    text-wrap: balance;
}

/* ...except FAQ questions, which are h2 headers but read as text and should use the full width */
.site-main .accordion-header {
    text-wrap: wrap;
}

/* Footer links travel together, so they wrap as one group rather than one by one */
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.75rem;
}

/* Buttons beside text in a row keep their label on one line; the text wraps instead */
.site-main .d-flex > .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

/* A pair of large buttons: side by side when they fit, stacked with a gap when not */
.cta-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

/* Lists whose items start with a symbol (check marks): wrapped lines align with the text */
.hang-list li {
    padding-left: 1.6em;
    text-indent: -1.6em;
}

/* No stray space under the last paragraph of a card */
.site-main .card-body > :last-child {
    margin-bottom: 0;
}

/* Accordion questions never run into the chevron */
.site-main .accordion-button {
    gap: 0.75rem;
}

@media (max-width: 575.98px) {
    /* 16px side gutter instead of Bootstrap's 12px */
    .site-main .container,
    .footer-kiteai .container {
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .navbar-kiteai .navbar-brand {
        flex-shrink: 0;
        margin-right: 0.25rem;
    }

    /* Phones: logo on the left, menu button on the right (every link is in the menu).
       The wordmark at 32px tall still fits beside the button at 320px. */
    .navbar-kiteai .navbar-brand {
        padding-top: 0.375rem;
        padding-bottom: 0.375rem;
    }

    .navbar-kiteai .navbar-brand img {
        height: 32px;
        width: auto;
    }

    /* Bootstrap's 1.25rem lead is oversized on a phone */
    .lead {
        font-size: 1.125rem;
    }

    /* Hero to first section: was 2rem + the next container's 3rem */
    .site-main .hero-section:not(.home-hero) {
        padding-bottom: 1.25rem;
    }

    .site-main .hero-section + .container.py-5,
    .site-main .hero-section + .container.pb-5 {
        padding-top: 0.5rem !important;
    }

    /* Cards inside cards: one level of padding is enough on a narrow screen */
    .site-main .card .card .card-body {
        padding: 1rem;
    }

    /* Attached field labels: smaller, so the field keeps most of the row */
    .field-chip,
    .field-chip.field-chip-narrow {
        min-width: 0;
        padding-right: 0.6rem;
        padding-left: 0.6rem;
        font-size: 0.875rem;
    }

    /* Footer: logo and copyright on one line, the links spread across the next with full-size tap targets */
    .footer-kiteai {
        padding: 1rem 0 0.5rem;
    }

    .footer-line {
        row-gap: 0;
        column-gap: 0.5rem;
    }

    .footer-links {
        flex: 1 0 100%;
        justify-content: space-between;
        gap: 0;
    }

    .footer-links a {
        padding: 0.65rem 0;
    }

    .cta-row > .btn-kiteai {
        flex: 1 1 100%;
    }

    /* Small help buttons (Support View Guide / View FAQs) and the Sign Up Cancel button:
       full-size tap targets */
    .site-main .btn-kiteai-info,
    #cancel-signup-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
    }
}

/* Manage Messaging Account popup: "Stamps bought" opens like Billing History on the wallet page */
.ma-history { margin-top: 0.25rem; }
.ma-history-toggle {
    background: none; border: 0; padding: 0.35rem 0; color: #1a1a2e; font-weight: 600;
    display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; min-height: 44px;
}
.ma-history-toggle:disabled { cursor: default; color: #1a1a2e; }
.ma-history-toggle .chevron-icon { transition: transform 0.15s ease; font-size: 0.85em; color: #6c757d; }
.ma-history-toggle[aria-expanded="true"] .chevron-icon { transform: rotate(90deg); }

@media (max-width: 575.98px) {
    /* Manage Messaging Account popup: copy and eye buttons get full-size tap targets */
    .messaging-account-modal .btn-kiteai {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        min-width: 44px;
    }

    /* Link-style buttons in a list (Contact quick links): full-size tap targets */
    .site-main li > .btn-link {
        padding-top: 0.6rem !important;
        padding-bottom: 0.6rem !important;
    }
}

/* Long email addresses (Contact page) wrap instead of pushing past a 320px screen */
.site-main .flex-grow-1 {
    min-width: 0;
}

.site-main a[href^="mailto:"] {
    overflow-wrap: anywhere;
}

@media (max-width: 575.98px) {
    /* Large fields beside a label: 16px text (the iOS no-zoom minimum) so placeholders fit */
    .input-group > .form-control-lg,
    .input-group > .form-select-lg {
        font-size: 1rem;
    }
}

@media (max-width: 575.98px) {
    /* Decorative icons inside field labels give their room to the field on phones */
    .field-chip > i {
        display: none;
    }
}

@media (max-width: 575.98px) {
    /* Contact search results (wizard, Manage Contacts): a four-column table is wider than
       a phone, so each result is one block: name and "ID 193392" with a small Sponsor
       button on the right, then the facility across the full width. */
    .search-results-table thead {
        display: none;
    }

    .search-results-table tr {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 0.15rem 0.75rem;
        padding: 0.85rem 1rem;
        border-bottom: 1px solid var(--kiteai-border-color);
    }

    /* No desktop row-hover on phones: on touch screens it sticks to the tapped row */
    .search-results-table td,
    .search-results-table.table-hover > tbody > tr:hover > * {
        display: block;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .search-results-table .result-name,
    .search-results-table .result-id {
        grid-column: 1;
    }

    /* The facility runs the full width under the name, ID and button */
    .search-results-table .result-facility {
        grid-column: 1 / -1;
        grid-row: 3;
    }

    /* Small Sponsor button beside the name and ID; the whole row is the tap target */
    .search-results-table .result-action {
        grid-column: 2;
        grid-row: 1 / span 2;
    }

    .search-results-table .result-action .btn {
        min-width: 0 !important;
        min-height: 0;
        height: auto;
        padding: 0.3rem 0.6rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 575.98px) {
    /* Payment security badges (checkout): a tight list on phones, not 3rem apart */
    .security-badges-kiteai {
        gap: 0.4rem 1.5rem;
    }
}

/* "Step 1 of 2" above a card title: smaller, dark grey */
.step-label {
    display: block;
    margin-bottom: 0.15rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--kiteai-secondary);
}
/* Checkout header line: step on the left, plan badge centred, "for" on the right */
.header-plan-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: 0.75rem;
}
.header-plan-row .step-label-inline {
    display: block;
    margin: 0;
    text-align: left;
}
.header-plan-row .header-plan-for {
    text-align: right;
    font-size: 0.875rem;
    color: var(--kiteai-text-muted, #6c757d);
}
/* Side labels never wrap ("Confirm Contact" on one line) */
.header-plan-row .step-label-inline,
.header-plan-row .header-plan-for {
    white-space: nowrap;
}

/* Contact search results: a tap or click anywhere on a row sponsors that Contact */
.search-results-table tr.result-row-clickable {
    cursor: pointer;
}

.search-results-table tr.result-row-clickable:active > * {
    background-color: var(--kiteai-border-color);
}

/* Get Started buttons fill the width on phones (owner, 2026-10-25) */
@media (max-width: 575.98px) {
    .btn-get-started {
        width: 100%;
        margin-right: 0 !important;
        justify-content: center;
    }
}
