/* ═══════════════════════════════════════════════════════════════
   TMT Donate v2 – Compact single-page donation modal
   Matches The Mentor's Table site palette
   ═══════════════════════════════════════════════════════════════ */

/* ── Trigger button (matches existing GIVE HERE style) ─────── */

.tmt-donate-trigger {
    display: inline-block;
    padding: 6px 14px;
    background: #000;
    color: #fff;
    border: 0;
    border-radius: 5px;
    font: 600 15px/1.4 Montserrat, sans-serif;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 3px 0 #b8b4b45e;
    letter-spacing: .03em;
    transition: opacity .2s;
}
.tmt-donate-trigger:hover { opacity: .85; }

/* ── Overlay ─────────────────────────────────────────────────── */

.tmt-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 999999 !important;
    display: none !important;
    align-items: center;
    justify-content: center;
    background: rgba(10, 26, 36, .55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 16px;
}
.tmt-overlay.open {
    display: flex !important;
    animation: tmtFadeIn .25s ease both;
}
@keyframes tmtFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Hide leftover Give plugin markup */
.give-embed-form-wrapper,
.js-give-embed-form-modal-launcher-wrap + .give-embed-form-wrapper {
    display: none !important;
}

/* ── Modal card ──────────────────────────────────────────────── */

.tmt-modal {
    position: relative;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 12px 40px rgba(0,0,0,.25);
    width: 100%;
    max-width: 420px;
    overflow-y: auto;
    overscroll-behavior: contain;
    animation: tmtSlideUp .3s ease both;
}
@keyframes tmtSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Close ───────────────────────────────────────────────────── */

.tmt-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 18px;
    color: #0a2e3f;
    cursor: pointer;
    z-index: 2;
    opacity: .7;
    transition: opacity .15s;
    line-height: 1;
}
.tmt-close:hover { opacity: 1; }

/* ── Accent line & header ────────────────────────────────────── */

.tmt-accent-line {
    background: linear-gradient(135deg, #0a2e3f 0%, #0259a6 100%) !important;
    padding: 18px 22px 14px !important;
    border-radius: 6px 6px 0 0;
    display: block !important;
}

.tmt-accent-line h2.tmt-heading,
h2.tmt-heading {
    font: 700 13px/1.2 Montserrat, sans-serif !important;
    text-transform: uppercase !important;
    letter-spacing: .12em !important;
    color: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
}

.tmt-accent-line p.tmt-message,
p.tmt-message {
    font: 400 11px/1.55 Montserrat, sans-serif !important;
    color: rgba(255,255,255,.82) !important;
    margin: 8px 0 0 !important;
    padding: 0 !important;
}

/* ── Form body ───────────────────────────────────────────────── */

.tmt-body {
    display: flex;
    flex-direction: column;
}

.tmt-form {
    padding: 14px 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── Fields ──────────────────────────────────────────────────── */

.tmt-field label {
    display: block;
    font: 500 9.5px/1 Montserrat, sans-serif;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #888;
    margin-bottom: 4px;
}

.tmt-modal .tmt-field input,
.tmt-modal .tmt-field input[type="text"],
.tmt-modal .tmt-field input[type="email"],
.tmt-modal .tmt-field input[type="number"] {
    width: 100% !important;
    padding: 9px 10px !important;
    border: 2px solid #c0c8ce !important;
    border-radius: 5px !important;
    background: #f8f9fa !important;
    font: 400 13px/1.3 Montserrat, sans-serif !important;
    color: #1a1a1a !important;
    outline: none !important;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box !important;
    -webkit-appearance: none;
    appearance: none;
}
.tmt-modal .tmt-field input:focus {
    border-color: #0259a6 !important;
    box-shadow: 0 0 0 2px rgba(2,89,166,.15) !important;
    background: #fff !important;
}
.tmt-modal .tmt-field input.invalid {
    border-color: #c0392b !important;
}

/* ── Amount input ────────────────────────────────────────────── */

.tmt-amount-wrap {
    display: flex !important;
    align-items: center;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    overflow: hidden;
}
.tmt-amount-wrap:focus-within {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}
.tmt-dollar {
    padding: 0 0 0 10px;
    font: 600 14px Montserrat, sans-serif;
    color: #888;
    user-select: none;
}
.tmt-amount-wrap input {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 8px 10px 8px 4px;
    font-size: 14px;
    font-weight: 600;
}

/* ── Name row ────────────────────────────────────────────────── */

.tmt-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

/* ── Card element container ──────────────────────────────────── */

.tmt-card-wrap {
    padding: 9px 10px !important;
    border: 2px solid #c0c8ce !important;
    border-radius: 5px !important;
    background: #f8f9fa !important;
    transition: border-color .15s, box-shadow .15s;
    min-height: 18px;
}
.tmt-card-wrap.StripeElement--focus {
    border-color: #0259a6 !important;
    box-shadow: 0 0 0 2px rgba(2,89,166,.15) !important;
    background: #fff !important;
}
.tmt-card-wrap.StripeElement--invalid {
    border-color: #c0392b !important;
}

/* ── Error ────────────────────────────────────────────────────── */

.tmt-error {
    font: 400 11px/1.4 Montserrat, sans-serif;
    color: #c0392b;
    min-height: 0;
}
.tmt-error:empty { display: none; }

/* ── Submit button ───────────────────────────────────────────── */

.tmt-submit {
    width: 100%;
    padding: 10px 16px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 4px;
    font: 700 12px/1 Montserrat, sans-serif;
    text-transform: uppercase;
    letter-spacing: .1em;
    cursor: pointer;
    transition: opacity .15s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
}
.tmt-submit:hover:not(:disabled) { opacity: .85; }
.tmt-submit:disabled { opacity: .35; cursor: not-allowed; }

.tmt-submit.loading .tmt-submit-label { visibility: hidden; }
.tmt-submit.loading .tmt-submit-spin  { display: block; }

.tmt-submit-spin {
    display: none;
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: tmtSpin .55s linear infinite;
}
@keyframes tmtSpin { to { transform: rotate(360deg); } }

/* ── Success view ────────────────────────────────────────────── */

.tmt-done {
    text-align: center;
    padding: 32px 24px 28px;
}
.tmt-done-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: #0259a6;
    color: #fff;
    font-size: 22px;
    line-height: 44px;
}
.tmt-done-title {
    font: 700 15px/1.2 Montserrat, sans-serif;
    color: #1a1a1a;
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.tmt-done-msg {
    font: 400 12px/1.5 Montserrat, sans-serif;
    color: #555;
    margin: 0 0 4px;
}
.tmt-done-receipt {
    font: 400 10px/1.4 Montserrat, sans-serif;
    color: #999;
    margin: 0 0 18px;
}

/* ── Body scroll lock ────────────────────────────────────────── */

body.tmt-locked {
    overflow: hidden !important;
    touch-action: none;
}

/* ── Spin-button removal ─────────────────────────────────────── */

.tmt-amount-wrap input::-webkit-outer-spin-button,
.tmt-amount-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tmt-amount-wrap input { -moz-appearance: textfield; }

/* ── Mobile ──────────────────────────────────────────────────── */

@media (max-width: 480px) {
    .tmt-overlay { padding: 10px; }
    .tmt-modal { max-width: 100%; }
    .tmt-accent-line { padding: 14px 16px 12px; }
    .tmt-heading { font-size: 12px; }
    .tmt-message { font-size: 10px; line-height: 1.45; }
    .tmt-form { padding: 10px 16px 16px; gap: 8px; }
    .tmt-field label { font-size: 9px; }
    .tmt-field input { padding: 7px 8px; font-size: 12px; }
    .tmt-amount-wrap input { padding: 7px 8px 7px 3px; font-size: 13px; }
    .tmt-dollar { font-size: 13px; padding-left: 8px; }
    .tmt-card-wrap { padding: 8px; }
    .tmt-submit { padding: 9px 12px; font-size: 11px; min-height: 34px; }
    .tmt-row { gap: 6px; }
}
