/* ManagedMethods: Google Workspace registration pages. */

:root {
    --brand-dark: #51585e;
    --brand-dark-hover: #3f454a;
    --brand-accent: #fcbe06;
    --text: #22272b;
    --text-muted: #5f666c;
    --border: #c9ced3;
    --surface: #ffffff;
    --page: #f3f4f5;
    --error: #c5221f;
    --error-bg: #fce8e6;
    --info-bg: #eef1f3;
    --radius: 8px;
    --focus: 0 0 0 3px rgba(252, 190, 6, 0.55);
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: var(--page) url("images/background.png") center 120px no-repeat;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-dark); font-weight: 600; }

[hidden] { display: none !important; }

/* ---- frame ---------------------------------------------------------------- */

.topbar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    height: 72px;
    background: var(--brand-dark);
    border-bottom: 4px solid var(--brand-accent);
}

.topbar-logo { max-height: 40px; }

.page {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 56px 16px;
}

.footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    padding: 16px 24px;
    font-size: 13px;
    color: var(--text-muted);
}

/* ---- card ----------------------------------------------------------------- */

.card {
    width: 100%;
    max-width: 460px;
    padding: 36px 40px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.08);
}

.card-center { text-align: center; }

/* Branded strip across the top of a card. logo.png is white-on-transparent,
   so it needs the dark background. */
.card-brand {
    margin: -36px -40px 28px;
    padding: 20px;
    text-align: center;
    background: var(--brand-dark);
    border-bottom: 3px solid var(--brand-accent);
    border-radius: var(--radius) var(--radius) 0 0;
}

.card-brand img { display: block; height: 32px; margin: 0 auto; }

.card h1 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
}

.eyebrow {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.lead { margin: 0 0 24px; color: var(--text-muted); }

.muted { margin: 0; font-size: 14px; color: var(--text-muted); }

.notice {
    margin: 0 0 20px;
    padding: 12px 14px;
    color: var(--text);
    background: #fff6dd;
    border-left: 3px solid var(--brand-accent);
    border-radius: 6px;
    text-align: left;
}

.success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: #e6f4ea;
    color: #1e8e3e;
}

/* ---- form ----------------------------------------------------------------- */

.field { margin-bottom: 20px; }

.label-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

label {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
}

.label-row label { margin-bottom: 0; }
.label-row { margin-bottom: 6px; }

input[type="email"],
input[type="url"] {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    font: inherit;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

input::placeholder { color: #9aa0a6; }

input:focus {
    outline: none;
    border-color: var(--brand-dark);
    box-shadow: var(--focus);
}

input[aria-invalid="true"] { border-color: var(--error); }

.hint { margin: 6px 0 0; font-size: 13px; color: var(--text-muted); }

.field-error { margin: 6px 0 0; font-size: 13px; color: var(--error); }
.field-error:empty { display: none; }

/* ---- buttons -------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 24px;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
}

.btn-primary { color: #fff; background: var(--brand-dark); }
.btn-primary:hover { background: var(--brand-dark-hover); }
.btn-primary:disabled { opacity: 0.6; cursor: default; }
.btn-block { width: 100%; margin-top: 4px; }

.actions-center { display: flex; justify-content: center; }

/* ---- confirmations before sign-in ---------------------------------------- */

.confirmations {
    margin: 0 0 20px;
    padding: 0;
    border: 0;
}

.confirm {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.confirm input {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: var(--brand-dark);
    cursor: pointer;
}

.confirm-hint {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.btn:focus-visible,
.gsi-button:focus-visible,
.tooltip-trigger:focus-visible {
    outline: none;
    box-shadow: var(--focus);
}

/* "Sign in with Google", per Google's sign-in branding guidelines. */
.gsi-button {
    display: inline-flex;
    align-items: center;
    height: 44px;
    padding: 0 16px;
    font-family: Roboto, Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #1f1f1f;
    background: #fff;
    border: 1px solid #747775;
    border-radius: 6px;
    cursor: pointer;
}

.gsi-button:hover { background: #f8faff; }
.gsi-button:disabled { opacity: 0.6; cursor: default; }
.gsi-icon { display: inline-flex; margin-right: 12px; }

/* ---- tooltip -------------------------------------------------------------- */

.tooltip { position: relative; display: inline-flex; }

.tooltip-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: help;
}

.tooltip-text {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    z-index: 10;
    transform: translateX(-50%);
    width: max-content;
    max-width: 240px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    color: #fff;
    background: #2b2f33;
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s;
    pointer-events: none;
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border: 5px solid transparent;
    border-top-color: #2b2f33;
}

.tooltip:hover .tooltip-text,
.tooltip-trigger:focus-visible + .tooltip-text,
.tooltip.is-open .tooltip-text {
    opacity: 1;
    visibility: visible;
}

/* ---- messages ------------------------------------------------------------- */

.alert {
    margin: 20px 0 0;
    padding: 12px 14px;
    font-size: 14px;
    border-radius: 6px;
    background: var(--info-bg);
}

.alert-error { color: var(--error); background: var(--error-bg); }

#notInstalled { color: var(--text); }
#notInstalled p { margin: 0 0 8px; }
#notInstalled p:last-child { margin-bottom: 0; }
#notInstalled strong:first-child { color: var(--error); }
#notInstalled a { color: var(--error); }

/* ---- small screens -------------------------------------------------------- */

@media (max-width: 520px) {
    .page { padding: 24px 16px; }
    .card { padding: 28px 20px; }
    .card-brand { margin: -28px -20px 24px; }
    .footer { justify-content: center; text-align: center; }
}
