/* ============================================================
   Mining Page Gate – Modal & Gate Styles
   ============================================================ */
:root {
    --mpg-primary:  #1a3a5c;
    --mpg-accent:   #c8860a;
    --mpg-success:  #2d7a45;
    --mpg-danger:   #a0201a;
    --mpg-border:   #d0d7e0;
    --mpg-light:    #f5f7fa;
    --mpg-radius:   12px;
    --mpg-shadow:   0 8px 40px rgba(0,0,0,.22);
}

/* ── Overlay ── */
.mpg-modal-overlay {
    position: fixed; inset: 0; z-index: 99999;
    background: rgba(10, 20, 40, .65);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    animation: mpgFadeIn .2s ease;
}
@keyframes mpgFadeIn { from { opacity:0 } to { opacity:1 } }

/* ── Modal box ── */
.mpg-modal {
    background: #fff;
    border-radius: var(--mpg-radius);
    box-shadow: var(--mpg-shadow);
    width: 100%; max-width: 560px;
    max-height: 90vh; overflow-y: auto;
    padding: 40px 40px 32px;
    position: relative;
    animation: mpgSlideUp .25s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
@keyframes mpgSlideUp { from { transform:translateY(24px); opacity:0 } to { transform:translateY(0); opacity:1 } }
@media (max-width: 560px) { .mpg-modal { padding: 28px 20px 24px; } }

/* ── Close ── */
.mpg-modal-close {
    position: absolute; top: 16px; right: 18px;
    background: none; border: none; font-size: 1.6em;
    cursor: pointer; color: #aaa; line-height: 1;
    transition: color .15s;
}
.mpg-modal-close:hover { color: #333; }

/* ── Icon & headings ── */
.mpg-modal-icon { font-size: 2.8em; margin-bottom: 12px; }
.mpg-modal h2 { margin: 0 0 10px; font-size: 1.55em; color: var(--mpg-primary); }
.mpg-modal p  { margin: 0 0 20px; color: #555; line-height: 1.6; }
.mpg-modal-sub { text-align: center; font-size: .88em; color: #666; margin-top: 12px; }
.mpg-modal-sub a { color: var(--mpg-accent); }

/* ── Screens ── */
.mpg-screen { }

/* ── Choose buttons ── */
.mpg-choose-btns { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }

/* ── Type cards ── */
.mpg-type-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 8px; }
@media (max-width: 420px) { .mpg-type-cards { grid-template-columns: 1fr; } }
.mpg-type-card {
    border: 2px solid var(--mpg-border); border-radius: 10px;
    padding: 20px 16px; text-align: center;
    transition: border-color .2s, box-shadow .2s;
}
.mpg-type-card:hover { border-color: var(--mpg-accent); box-shadow: 0 2px 12px rgba(0,0,0,.10); }
.mpg-type-icon { font-size: 2em; margin-bottom: 8px; }
.mpg-type-card h3 { margin: 0 0 6px; font-size: 1.05em; color: var(--mpg-primary); }
.mpg-type-card p  { font-size: .84em; color: #666; margin-bottom: 14px; }

/* ── Back button ── */
.mpg-back {
    background: none; border: none; cursor: pointer;
    color: var(--mpg-accent); font-size: .88em; font-weight: 600;
    padding: 0; margin-bottom: 18px; display: inline-block;
}
.mpg-back:hover { text-decoration: underline; }

/* ── Selected badge ── */
.mpg-selected-badge {
    display: inline-block; margin-bottom: 16px;
    background: var(--mpg-light); border: 1px solid var(--mpg-border);
    border-radius: 20px; padding: 4px 14px; font-size: .85em; font-weight: 700;
    color: var(--mpg-primary);
}

/* ── Form fields ── */
.mpg-field { margin-bottom: 14px; }
.mpg-field label { display: block; font-size: .87em; font-weight: 600; margin-bottom: 5px; color: #333; }
.mpg-field label small { font-weight: 400; color: #888; }
.mpg-field input[type=text],
.mpg-field input[type=email],
.mpg-field input[type=password],
.mpg-field input[type=tel] {
    width: 100%; padding: 9px 12px; border: 1.5px solid var(--mpg-border);
    border-radius: 6px; font-size: .95em; box-sizing: border-box;
    transition: border-color .2s, box-shadow .2s;
}
.mpg-field input:focus { border-color: var(--mpg-primary); box-shadow: 0 0 0 3px rgba(26,58,92,.1); outline: none; }
.mpg-field input[type=file] { font-size: .85em; width: 100%; padding: 6px 0; }
.mpg-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 460px) { .mpg-form-row { grid-template-columns: 1fr; } }
.mpg-req { color: var(--mpg-danger); }
.mpg-check-label { display: flex; align-items: flex-start; gap: 8px; font-size: .85em; font-weight: 400 !important; cursor: pointer; }
.mpg-check-label input { width: auto !important; margin-top: 3px; }

/* ── Compliance note ── */
.mpg-compliance-note {
    background: #fff8e8; border-left: 3px solid var(--mpg-accent);
    padding: 10px 14px; border-radius: 6px; font-size: .82em;
    color: #5a4000; margin-bottom: 14px;
}

/* ── Buttons ── */
.mpg-btn {
    display: inline-block; padding: 11px 26px;
    border-radius: 7px; border: 2px solid transparent;
    font-size: .95em; font-weight: 700; cursor: pointer;
    text-decoration: none; transition: background .18s, transform .1s, color .18s;
    text-align: center;
}
.mpg-btn:hover { transform: translateY(-1px); }
.mpg-btn-primary { background: var(--mpg-primary); color: #fff; border-color: var(--mpg-primary); }
.mpg-btn-primary:hover { background: #0f2845; }
.mpg-btn-outline { background: transparent; color: var(--mpg-primary); border-color: var(--mpg-primary); }
.mpg-btn-outline:hover { background: var(--mpg-primary); color: #fff; }
.mpg-btn-full { width: 100%; display: block; padding: 13px; font-size: 1em; box-sizing: border-box; }

/* ── Alerts ── */
.mpg-alert { padding: 10px 14px; border-radius: 6px; font-size: .88em; margin-bottom: 14px; }
.mpg-alert-error { background: #fdecea; border-left: 3px solid var(--mpg-danger); color: #6b1010; }

/* ── Success / Pending modals ── */
.mpg-modal-success, .mpg-modal-pending { text-align: center; padding: 52px 40px; max-width: 420px; }
.mpg-success-icon { font-size: 3.5em; margin-bottom: 16px; }
.mpg-modal-success h2 { color: var(--mpg-success); }
.mpg-modal-pending h2 { color: var(--mpg-accent); }

/* ── Gated content overlay ── */
.mpg-gated-content { position: relative; }
.mpg-content-blur  { filter: blur(5px); pointer-events: none; user-select: none; max-height: 320px; overflow: hidden; }
.mpg-blur-overlay  {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,.95) 50%);
}
.mpg-blur-cta { text-align: center; padding: 24px; }
.mpg-lock-icon { font-size: 2.5em; display: block; margin-bottom: 10px; }
.mpg-blur-cta h3 { font-size: 1.3em; color: var(--mpg-primary); margin: 0 0 8px; }
.mpg-blur-cta p  { color: #555; margin: 0 0 18px; }
