/* =====================================================
   TMSG – Base Layout  (mobile-first, theme-agnostic)
   ===================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    min-height: 100vh;
    overflow-x: hidden;
}

body.tmsg-fullpage {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── Canvas for animated backgrounds ─────────────────── */
#tmsg-bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ── Page wrapper ─────────────────────────────────────── */
.tmsg-page {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 0 16px;
}

/* ── Header / Logo ────────────────────────────────────── */
.tmsg-header {
    padding: 24px 0 8px;
    text-align: center;
    flex-shrink: 0;
}

.tmsg-logo {
    display: inline-block;
    line-height: 1.1;
}

.tmsg-logo-line1 {
    display: block;
    font-size: clamp(0.65rem, 2.5vw, 0.9rem);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    font-weight: 300;
}

.tmsg-logo-line2 {
    display: block;
    font-size: clamp(1.1rem, 5vw, 1.8rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 700;
}

/* ── Main content ─────────────────────────────────────── */
.tmsg-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 0;
}

/* ── Affirmation card ─────────────────────────────────── */
.tmsg-card {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    border-radius: 16px;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Affirmation statement ────────────────────────────── */
.tmsg-statement {
    font-size: clamp(1.6rem, 6vw, 2.8rem);
    line-height: 1.2;
    text-align: center;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

/* ── Divider ──────────────────────────────────────────── */
.tmsg-divider {
    width: 60px;
    height: 2px;
    margin: 0 auto 20px;
    border-radius: 2px;
    opacity: 0.5;
}

/* ── Scripture block ──────────────────────────────────── */
.tmsg-scripture-block {
    text-align: center;
    margin-bottom: 24px;
}

.tmsg-scripture-ref {
    font-size: clamp(0.95rem, 3vw, 1.15rem);
    font-style: italic;
    font-weight: 400;
    line-height: 1.5;
}

.tmsg-scripture-text {
    font-size: clamp(0.85rem, 2.5vw, 1rem);
    font-style: italic;
    opacity: 0.8;
    margin-top: 6px;
}

/* ── Detail sections (explanation, example) ───────────── */
.tmsg-detail-section {
    margin-bottom: 18px;
}

.tmsg-detail-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 700;
    opacity: 0.6;
    margin-bottom: 6px;
}

.tmsg-detail-text {
    font-size: clamp(0.9rem, 2.8vw, 1.05rem);
    line-height: 1.65;
}

/* ── Video Script (collapsed by default) ─────────────── */
.tmsg-video-script-wrap {
    margin-bottom: 18px;
}

.tmsg-read-script-btn {
    background: transparent;
    border: 1px solid currentColor;
    border-radius: 6px;
    padding: 6px 16px;
    font-size: 0.85rem;
    cursor: pointer;
    opacity: 0.75;
    transition: opacity 0.2s;
    letter-spacing: 0.05em;
    font-family: inherit;
}

.tmsg-read-script-btn:hover { opacity: 1; }

.tmsg-video-script-content {
    display: none;
    margin-top: 12px;
    font-size: clamp(0.85rem, 2.5vw, 1rem);
    line-height: 1.7;
    font-style: italic;
    opacity: 0.85;
}

.tmsg-video-script-content.is-open { display: block; }

/* ── Resource links ───────────────────────────────────── */
.tmsg-resources {
    margin-top: 8px;
    margin-bottom: 4px;
}

.tmsg-resources-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 700;
    opacity: 0.6;
    margin-bottom: 10px;
    text-align: center;
}

.tmsg-resource-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.tmsg-resource-links li {
    display: contents;
}

.tmsg-resource-link {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: transform 0.15s, opacity 0.15s;
    white-space: nowrap;
}

.tmsg-resource-link:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* ── Footer / Countdown ───────────────────────────────── */
.tmsg-footer {
    padding: 16px 0 24px;
    text-align: center;
    flex-shrink: 0;
}

.tmsg-countdown-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 0.85rem;
    opacity: 0.7;
}

.tmsg-countdown-bar-wrap {
    width: 120px;
    height: 3px;
    border-radius: 2px;
    background: rgba(255,255,255,0.2);
    overflow: hidden;
}

.tmsg-countdown-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 1s linear;
}

#tmsg-countdown-text { min-width: 40px; text-align: left; }

.tmsg-skip-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    opacity: 0.6;
    text-decoration: underline;
    font-family: inherit;
    transition: opacity 0.2s;
}
.tmsg-skip-btn:hover { opacity: 1; }

/* ── Share row ────────────────────────────────────────── */
.tmsg-share-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tmsg-share-label {
    font-size: 0.75rem;
    opacity: 0.55;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.tmsg-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: transform 0.15s, opacity 0.15s;
    font-family: inherit;
}

.tmsg-share-btn:hover { transform: translateY(-2px); opacity: 0.9; }

.tmsg-share-copy {
    background: transparent;
    border-color: currentColor;
    opacity: 0.7;
}

/* ── Card entrance animation ──────────────────────────── */
@keyframes tmsgFadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tmsg-card { animation: tmsgFadeUp 0.7s ease both; }

/* ── Responsive adjustments ───────────────────────────── */
@media (min-width: 480px) {
    .tmsg-card { padding: 40px 36px; }
}

@media (min-width: 768px) {
    .tmsg-card { padding: 48px 52px; }
    .tmsg-header { padding-top: 32px; }
}

/* ── Hide WP admin bar padding on full-page ───────────── */
body.tmsg-fullpage.admin-bar { padding-top: 0; }
body.tmsg-fullpage #wpadminbar { display: none; }
