/* ==========================================================================
   Customer guide

   Opens as a modal from the header on every public page. Its own file: the
   guide is one document with one look wherever it is shown, and nothing here
   touches the pages behind it.
   ========================================================================== */

.wguide {
    --wg-ink:      #10212e;
    --wg-soft:     #4a5c6b;
    --wg-mute:     #7b8b98;
    --wg-line:     #e2e9f0;
    --wg-sunk:     #f4f8fb;
    --wg-brand:    #0c6ba8;
    --wg-warn:     #b45309;
    --wg-warn-bg:  #fdf6ec;

    color: var(--wg-ink);
    line-height: 1.75;
}

/* --------------------------------------------------------------------------
   Contents
   -------------------------------------------------------------------------- */

.wguide__toc {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--wg-line);
}

.wguide__toc a {
    padding: 5px 13px;
    border: 1px solid var(--wg-line);
    border-radius: 999px;
    background: #fff;
    color: var(--wg-brand);
    font-size: .84rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease;
}

.wguide__toc a:hover {
    background: var(--wg-sunk);
    border-color: var(--wg-brand);
}

/* --------------------------------------------------------------------------
   Sections

   Numbered because the first four really are a sequence - an account cannot
   send before a package is bought and a sender ID approved.
   -------------------------------------------------------------------------- */

.wguide__section + .wguide__section {
    margin-top: 32px;
    padding-top: 26px;
    border-top: 1px solid var(--wg-line);
}

.wguide h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 14px;
    font-size: 1.16rem;
    font-weight: 700;
    line-height: 1.4;
}

.wguide__num {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--wg-brand);
    color: #fff;
    font-size: .86rem;
    font-weight: 700;
}

.wguide p { margin: 12px 0; }

/* --------------------------------------------------------------------------
   Steps and lists
   -------------------------------------------------------------------------- */

.wguide__steps {
    counter-reset: none;
    margin: 0;
    padding-left: 20px;
}

.wguide__steps li {
    margin-bottom: 12px;
    padding-left: 4px;
}

.wguide__steps b {
    display: block;
    color: var(--wg-ink);
}

.wguide__list {
    margin: 12px 0;
    padding-left: 20px;
}

.wguide__list li { margin-bottom: 7px; }

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */

.wguide__tablebox {
    margin: 16px 0;
    overflow-x: auto;
}

.wguide table {
    width: 100%;
    min-width: 420px;
    border-collapse: collapse;
    border: 1px solid var(--wg-line);
    font-size: .93rem;
    background: #fff;
}

.wguide th,
.wguide td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--wg-line);
    text-align: left;
    vertical-align: top;
}

.wguide thead th {
    background: var(--wg-sunk);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--wg-mute);
}

.wguide tbody tr:last-child td { border-bottom: 0; }
.wguide tbody td:first-child { font-weight: 600; }

/* --------------------------------------------------------------------------
   Notes and code
   -------------------------------------------------------------------------- */

.wguide__note,
.wguide__warn {
    display: flex;
    gap: 10px;
    margin: 16px 0;
    padding: 12px 16px;
    border-left: 3px solid var(--wg-brand);
    border-radius: 0 8px 8px 0;
    background: var(--wg-sunk);
    font-size: .93rem;
}

.wguide__warn {
    border-left-color: var(--wg-warn);
    background: var(--wg-warn-bg);
}

.wguide__note i,
.wguide__warn i {
    flex: 0 0 auto;
    margin-top: 5px;
    color: var(--wg-brand);
}

.wguide__warn i { color: var(--wg-warn); }

.wguide__code {
    margin: 14px 0;
    padding: 14px 16px;
    border-radius: 10px;
    background: #10212e;
    color: #d7e6f2;
    font-size: .84rem;
    line-height: 1.7;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.wguide__contact {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.wguide__contact a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: 1px solid var(--wg-line);
    border-radius: 10px;
    background: #fff;
    color: var(--wg-ink);
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
}

.wguide__contact a:hover {
    border-color: var(--wg-brand);
    color: var(--wg-brand);
}

/* --------------------------------------------------------------------------
   The header button
   -------------------------------------------------------------------------- */

.wguide-trigger {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, .38);
    border-radius: 999px;
    background: transparent;
    color: #fff;
    font-size: .84rem;
    font-weight: 600;
    line-height: 1.6;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

.wguide-trigger:hover {
    background: rgba(255, 255, 255, .16);
    border-color: #fff;
}

@media (max-width: 991px) {
    .wguide-trigger span { display: none; }
    .wguide-trigger { padding: 6px 11px; }
}

/* --------------------------------------------------------------------------
   The modal
   -------------------------------------------------------------------------- */

#webGuideModal .modal-dialog { max-width: 880px; }

#webGuideModal .modal-header {
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--wg-line, #e2e9f0);
}

#webGuideModal .modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 700;
}

#webGuideModal .modal-body {
    max-height: calc(100vh - 190px);
    overflow-y: auto;
    padding: 22px 26px 28px;
}

#webGuideModal .wguide-loading {
    padding: 56px 20px;
    text-align: center;
    color: #7b8b98;
}

@media (max-width: 575.98px) {
    #webGuideModal .modal-body { padding: 18px 16px 24px; }
    .wguide h3 { font-size: 1.06rem; }
}
