﻿/* Set padding to keep content from hitting the edges */
.body-content {
    margin-top: 15px;
    padding-left: 15px;
    padding-right: 15px;
}

/* Override the default bootstrap behavior where horizontal description lists 
   will truncate terms that are too long to fit in the left column 
*/
.dl-horizontal dt {
    white-space: normal;
}

/* Set width on the form input elements since they're 100% wide by default */
input,
select,
textarea {
    max-width: 280px;
}

/* =========
   Text.Email button system (fix hover/focus/active)
   Put this AFTER Bootstrap CSS
   ========= */

/* Primary CTA */
a.te-btn-primary,
button.te-btn-primary,
.te-btn-primary {
    background-color: rgba(107,173,221,.95) !important;
    border: 1px solid rgba(20,47,73,.18) !important;
    color: #0b2a43 !important;
    font-weight: 700;
    text-decoration: none !important;
}

    a.te-btn-primary:hover,
    button.te-btn-primary:hover,
    .te-btn-primary:hover,
    a.te-btn-primary:focus,
    button.te-btn-primary:focus,
    .te-btn-primary:focus {
        background-color: rgba(107,173,221,.82) !important; /* slightly darker, not white */
        border-color: rgba(20,47,73,.28) !important;
        color: #0b2a43 !important;
        text-decoration: none !important;
    }

    a.te-btn-primary:active,
    button.te-btn-primary:active,
    .te-btn-primary:active,
    a.te-btn-primary.active,
    button.te-btn-primary.active,
    .te-btn-primary.active {
        background-color: rgba(107,173,221,.72) !important;
        border-color: rgba(20,47,73,.32) !important;
        color: #0b2a43 !important;
    }

    a.te-btn-primary:focus-visible,
    button.te-btn-primary:focus-visible,
    .te-btn-primary:focus-visible {
        outline: none;
        box-shadow: 0 0 0 .2rem rgba(107,173,221,.35) !important;
    }

/* Nav outline buttons (Log in / dropdown toggle) — avoid the “turn white / disappear” behavior */
.navbar a.btn-outline-light,
.navbar button.btn-outline-light {
    border-color: rgba(255,255,255,.65) !important;
    color: rgba(255,255,255,.92) !important;
    background: transparent !important;
    text-decoration: none !important;
}

    .navbar a.btn-outline-light:hover,
    .navbar button.btn-outline-light:hover,
    .navbar a.btn-outline-light:focus,
    .navbar button.btn-outline-light:focus {
        background: rgba(255,255,255,.12) !important; /* subtle, still readable on navy */
        border-color: rgba(255,255,255,.75) !important;
        color: #ffffff !important;
    }

    .navbar a.btn-outline-light:focus-visible,
    .navbar button.btn-outline-light:focus-visible {
        outline: none;
        box-shadow: 0 0 0 .2rem rgba(107,173,221,.35) !important;
    }

/* If you use .btn-outline-secondary as a CTA anywhere, keep it sane too */
a.btn-outline-secondary:hover,
button.btn-outline-secondary:hover {
    text-decoration: none;
}

.te-auth-buttons {
    display: grid;
    gap: 10px;
}

.te-auth-btn {
    border: 0;
    background: transparent;
    padding: 0;
    text-align: left;
}

    .te-auth-btn:focus-visible {
        outline: 3px solid rgba(107, 173, 221, .55); /* uses your te-sky-ish */
        outline-offset: 4px;
        border-radius: 12px;
    }

.te-auth-img {
    display: block;
    height: 40px; /* common official button height */
    width: auto;
    max-width: 100%;
}

/* Optional but helps widths behave predictably */
#publicSmsLogTable {
    table-layout: fixed;
    width: 100%;
}

    #publicSmsLogTable td.msg-cell {
        white-space: normal;
        overflow: hidden;
    }

    /* Clamp the *inner div*, not the td */
    #publicSmsLogTable .msg-clamp {
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2; /* 2 lines */
        -webkit-box-orient: vertical;
    }

    /* keep fixed layout, but prevent long strings from forcing horizontal scroll */
    #publicSmsLogTable td.to-cell,
    #publicSmsLogTable td.from-cell,
    #publicSmsLogTable td.status-cell {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }


@keyframes teFlashNewRowGreen {
    0% {
        box-shadow: inset 0 0 0 9999px rgba(40, 200, 90, .60);
    }

    30% {
        box-shadow: inset 0 0 0 9999px rgba(40, 200, 90, .12);
    }

    60% {
        box-shadow: inset 0 0 0 9999px rgba(40, 200, 90, .50);
    }

    100% {
        box-shadow: inset 0 0 0 9999px rgba(40, 200, 90, 0);
    }
}

@keyframes tePopRow {
    0% {
        transform: scale(1);
    }

    35% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

/* Green multi-flash + pop */
#publicSmsLogTable tr.te-new-row td {
    animation: teFlashNewRowGreen 1.1s ease-in-out 0s 3;
}

/* Accessibility: reduce motion */
@media (prefers-reduced-motion: reduce) {
    #publicSmsLogTable tr.te-new-row td,
    #publicSmsLogTable tr.te-new-row {
        animation: none !important;
    }
}

.te-navlink {
    color: rgba(255,255,255,.72);
    text-decoration: none;
    padding: .25rem .5rem;
    border-radius: .5rem;
    transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}

    .te-navlink:hover,
    .te-navlink:focus {
        color: #fff;
        background: rgba(255,255,255,.14);
        text-decoration: none;
    }

    .te-navlink:focus {
        outline: none;
        box-shadow: 0 0 0 .2rem rgba(255,255,255,.18);
    }

.te-status-badge {
    display: inline-block;
    padding: .2rem .55rem;
    border-radius: 999px; /* the oval */
    font-weight: 700;
    font-size: .85rem;
    line-height: 1.2;
    border: 1px solid transparent;
}

.te-status-good {
    background: rgba(25,135,84,.12);
    border-color: rgba(25,135,84,.30);
    color: #146c43;
}

.te-status-neutral {
    background: rgba(20,47,73,.08);
    border-color: rgba(20,47,73,.18);
    color: rgba(20,47,73,.85);
}

.te-status-bad {
    background: rgba(220,53,69,.12);
    border-color: rgba(220,53,69,.25);
    color: #b02a37;
}

.te-link-cta {
    color: #0b2a43;
    text-decoration: none;
    border-bottom: 2px solid rgba(107,173,221,.55);
    font-weight: 800;
    padding-bottom: 1px;
}

    .te-link-cta:hover {
        color: #0b2a43;
        border-bottom-color: rgba(25,135,84,.55);
    }

/* "Try it now" corner images */
#try .te-try-corner {
    position: absolute;
    top: 0;
    width: min(180px, 22vw);
    height: auto;
    pointer-events: none;
    user-select: none;
    z-index: 1;
    opacity: .95;
}

#try .te-try-corner-left {
    left: 0;
}

#try .te-try-corner-right {
    right: 0;
}

/* keep your actual content above the images */
#try > *:not(.te-try-corner) {
    position: relative;
    z-index: 2;
}

/* optional: reduce clutter on small screens */
@media (max-width: 576px) {
    #try .te-try-corner {
        display: none;
    }
}

/* Mobile navbar: make expanded/collapsed menu stack cleanly and align left */
@media (max-width: 575.98px) {
    /* Remove any extra vertical gap the empty .navbar-nav can create */
    .navbar-collapse > .navbar-nav {
        margin: 0;
        padding: 0;
        /* hide if empty (safe for this site where main nav is in _LoginPartial) */
        display: none;
    }

    /* collapse area padding */
    .navbar-collapse {
        padding-top: .25rem !important;
        padding-bottom: .5rem !important;
    }

    /* make the inner link container truly flush with the brand */
    .navbar-collapse .d-flex {
        width: 100%;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: .375rem !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin: 0 !important;
    }

    /* links should be simple stacked items, not indented */
    .navbar-collapse .te-navlink {
        display: block;
        width: 100%;
        padding: .4rem 0;
        margin-left: 0 !important;
        border-radius: .25rem;
    }

    /* keep CTA buttons compact and aligned with the links */
    .navbar-collapse .d-flex > .btn,
    .navbar-collapse .d-flex > .btn-sm {
        margin-left: 0 !important;
        display: inline-block;
    }

    /* dropdown: take the same vertical flow but keep its toggle compact */
    .navbar-collapse .dropdown {
        width: 100%;
    }
    .navbar-collapse .dropdown > .btn {
        width: auto;
    }
}

/* -----------------------------
   Mobile-friendly public SMS log table (cleaned)
   Stack rows into card-like blocks, surface field labels, preserve zebra
   ----------------------------- */
@media (max-width: 576px) {
    /* Allow cells to wrap and hide header (we surface labels via data-label) */
    #publicSmsLogTable {
        table-layout: auto;
        width: 100%;
    }
    #publicSmsLogTable thead {
        display: none;
    }

    /* Row becomes a card */
    #publicSmsLogTable tbody tr {
        display: block;
        margin-bottom: 14px;
        padding: 12px;
        border: 1px solid rgba(20,47,73,.06);
        border-radius: 10px;
        background: #fff;
        box-shadow: none; /* avoid internal hairline */
        overflow: hidden; /* ensure rounded corners clip children */
    }

    /* Stack cells; remove per-cell borders and inner shadows that become horizontal rules */
    #publicSmsLogTable tbody tr td {
        display: block;
        width: 100%;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        padding: 4px 0; /* tightened vertical rhythm */
        background: transparent;
        border-top: 0 !important;
        border-bottom: 0 !important;
        box-shadow: none !important;
    }

    /* Label above each value (from data-label attribute) */
    #publicSmsLogTable tbody tr td:before {
        content: attr(data-label);
        display: block;
        font-weight: 700;
        color: rgba(20,47,73,.56);
        margin-bottom: 2px;
        font-size: .9rem;
    }

    /* Message styling and clamp (inner div clamp, no extra bottom gap) */
    #publicSmsLogTable td.msg-cell .msg-clamp {
        -webkit-line-clamp: 3;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 1rem;
        color: rgba(20,47,73,.9);
        margin-bottom: 0;
    }

    /* To / From / Status specific tweaks */
    #publicSmsLogTable td.to-cell {
        font-weight: 800;
        color: rgba(20,47,73,.72);
        margin-bottom: 2px;
        padding-top: 0;
    }

    #publicSmsLogTable td.from-cell {
        color: rgba(20,47,73,.58);
        font-size: .95rem;
        margin-top: 0;
        padding-top: 2px;
    }

    #publicSmsLogTable td.status-cell {
        margin-top: 0;
        padding-top: 2px;
    }

    /* Status badges may wrap on mobile */
    #publicSmsLogTable .te-status-badge {
        white-space: normal;
    }

    /* Remove built-in bootstrap stripe backgrounds on stacked cells */
    .table.table-striped tbody tr td {
        background-color: transparent;
    }

    /* Subtle zebra on the row level so it shows through stacked cells */
    #publicSmsLogTable tbody tr:nth-child(odd) {
        background-color: rgba(245, 247, 249, 1);
    }

    #publicSmsLogTable tbody tr:nth-child(even) {
        background-color: #fff;
    }
}