/*
 * mobile.css - small-screen corrections that do NOT disturb the layout.
 *
 * The site's design is built from hand-cut image slices inside tables with
 * exact pixel widths, and responsive-autoscale.js shrinks that whole
 * layout to fit the screen as a single unit. That means this file must be
 * careful: any rule that changes the size of a layout element would pull
 * the slices apart and leave visible seams.
 *
 * So this file only fixes things that are wrong regardless of screen size,
 * plus a few phone-specific behaviours that do not affect geometry.
 */

/* The page is scaled from its top-left corner, so nothing should be able
   to drag a horizontal scrollbar out from under it. */
html {
    overflow-x: hidden;
}

/* Stop iOS from silently enlarging text in one column of a table and
   throwing the whole grid out of alignment. */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Keep the useful 992px legacy canvas centred while tablet-only artwork
   overhang is cropped symmetrically by responsive-autoscale.js. */
html.ddb-tablet-layout body {
    margin-right: 0 !important;
}

html.ddb-tablet-layout {
    overflow-x: clip;
}

/* Pages already rebuilt without image slices use a normal tablet canvas. */
@media (min-width: 700px) and (max-width: 1100px) {
    html.ddb-mobile-ready body {
        font-size: 16px;
    }

    html.ddb-mobile-ready .wrap,
    html.ddb-mobile-ready .container,
    html.ddb-mobile-ready main {
        width: auto !important;
        max-width: 980px !important;
        margin-left: 24px !important;
        margin-right: 24px !important;
    }

    html.ddb-mobile-ready button,
    html.ddb-mobile-ready .btn,
    html.ddb-mobile-ready input[type="submit"],
    html.ddb-mobile-ready input[type="button"] {
        min-height: 44px;
    }
}

/*
 * "cursor: hand" was an Internet Explorer 5 value and no modern browser
 * understands it, so 36 clickable elements on this site -- including the
 * bid buttons -- showed a plain arrow instead of a pointer. The inline
 * styles are corrected in the pages themselves; this catches any that
 * are set through a class.
 */
[onclick], [onClick] {
    cursor: pointer;
}

/*
 * On a touch screen there is no hover, so the many onMouseOver image swaps
 * never fire and nothing indicates that a button is pressable. A brief
 * press state gives that feedback back.
 */
@media (hover: none) {
    [onclick]:active, [onClick]:active {
        opacity: 0.75;
    }
}

/* Remove the 300ms delay phones add before firing a click. */
[onclick], [onClick], a, button, input[type="submit"], input[type="button"] {
    touch-action: manipulation;
}

/*
 * Form fields are the one place where phone-specific sizing is worth the
 * space it takes. Below 16px, iOS zooms the page in when a field is
 * focused and does not zoom back out, which strands the visitor at the
 * wrong magnification. Since the whole page is scaled anyway, setting the
 * base size here keeps that from triggering.
 */
@media (max-width: 820px) {
    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px;
    }
}

/* Long unbroken strings -- item titles, emails, transfer references --
   should wrap rather than force the table wider than the design. */
td, div, span, p {
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Respect a visitor who has asked their phone to stop animating things. */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* The old Facebook Like Box reserved a 450px iframe inside a 153px image
   slice, leaving a large grey void.  The current Page Plugin gets a real,
   self-contained card so its profile, follower count and face pile remain
   prominent while the page scales. */
.ddb-facebook-follow-card {
    box-sizing: border-box;
    width: 992px;
    max-width: 100%;
    margin: 20px auto 12px;
    padding: 18px 20px 14px;
    border: 1px solid #d9dee7;
    border-top: 4px solid #1877f2;
    border-radius: 14px;
    background: #f4f6f9;
    box-shadow: 0 8px 22px rgba(22, 32, 51, .12);
    text-align: center;
}

.ddb-facebook-follow-title {
    margin: 0;
    color: #173b72;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.ddb-facebook-follow-intro {
    margin: 2px 0 10px;
    color: #51647f;
    font-size: 20px;
    line-height: 1.25;
}

.ddb-facebook-follow-frame {
    display: block;
    width: 500px;
    max-width: 100%;
    height: 190px;
    margin: 0 auto;
    border: 0;
    overflow: hidden;
    background: #fff;
}

.ddb-community-followers {
    box-sizing: border-box;
    width: 100%;
    margin: 14px auto 0;
    padding: 14px;
    border: 1px solid #d9e4f2;
    border-radius: 12px;
    background: #fff;
}

.ddb-community-followers-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    text-align: left;
}

.ddb-community-followers-heading h3 {
    margin: 0;
    color: #173b72;
    font-size: 23px;
    line-height: 1.15;
}

.ddb-community-followers-count {
    flex: 0 0 auto;
    padding: 3px 11px;
    border-radius: 999px;
    background: #e8f1ff;
    color: #145fc0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.1;
}

.ddb-community-followers-grid {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ddb-community-follower {
    box-sizing: border-box;
    min-width: 0;
    padding: 8px 4px 7px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    text-align: center;
}

.ddb-community-follower-avatar {
    display: flex;
    width: 44px;
    height: 44px;
    margin: 0 auto 4px;
    align-items: center;
    justify-content: center;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 7px rgba(15, 35, 65, .2);
    color: #fff;
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
}

.ddb-community-follower-color-0 { background: #1877f2; }
.ddb-community-follower-color-1 { background: #7c3aed; }
.ddb-community-follower-color-2 { background: #db2777; }
.ddb-community-follower-color-3 { background: #ea580c; }
.ddb-community-follower-color-4 { background: #059669; }
.ddb-community-follower-color-5 { background: #0891b2; }
.ddb-community-follower-color-6 { background: #4f46e5; }
.ddb-community-follower-color-7 { background: #b45309; }

.ddb-community-follower-name,
.ddb-community-follower-label {
    display: block;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ddb-community-follower-name {
    color: #203654;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.05;
}

.ddb-community-follower-label {
    margin-top: 2px;
    color: #6b7b91;
    font-size: 14px;
    line-height: 1;
}

.ddb-facebook-follow-link {
    display: inline-block;
    margin-top: 10px;
    padding: 7px 18px;
    border-radius: 999px;
    background: #1877f2;
    color: #fff !important;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none !important;
}

@media (max-width: 820px) {
    .ddb-facebook-follow-card {
        padding: 15px 12px 13px;
    }

    .ddb-community-followers-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .ddb-facebook-follow-title {
        font-size: 24px;
    }

    .ddb-facebook-follow-intro {
        font-size: 18px;
    }

    .ddb-community-followers {
        padding: 10px 8px;
    }

    .ddb-community-followers-heading h3 {
        font-size: 20px;
    }

    .ddb-community-followers-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }
}
