/* WP MikroTik Manager — Public Portal Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --wa: #0077ff; /* accent — overridden per-instance via inline style */
}

/* ── Portal wrapper ── */
.wpmm-portal {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    max-width: 460px;
    margin: 0 auto;
    padding: 8px;
}

/* ── Cards ── */
.wpmm-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 32px 28px;
    box-shadow: 0 4px 24px rgba(0,0,0,.07), 0 1px 4px rgba(0,0,0,.04);
    transition: box-shadow .2s;
}
.wpmm-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,.1), 0 2px 8px rgba(0,0,0,.05); }

/* ── Brand header ── */
.wpmm-portal-brand {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 24px;
}
.wpmm-portal-wifi-svg {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, var(--wa), color-mix(in srgb, var(--wa) 60%, #000));
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    flex-shrink: 0;
}
.wpmm-portal-wifi-svg svg { width: 26px; height: 26px; }
.wpmm-portal-site-name {
    font-size: 15px; font-weight: 700; color: #111;
}

/* ── Title & subtitle ── */
.wpmm-portal-title {
    font-size: 22px; font-weight: 800; color: #111;
    margin: 0 0 8px; padding: 0; line-height: 1.2;
    border: none !important;
}
.wpmm-portal-sub {
    font-size: 14px; color: #6b7280; margin: 0 0 24px; line-height: 1.5;
}

/* ── Input group ── */
.wpmm-input-group {
    position: relative; display: flex; align-items: center;
    background: #fff; border: 1px solid #ccc;
    border-radius: 8px; overflow: hidden;
    transition: border-color .15s;
    margin-bottom: 12px;
}
.wpmm-input-group:focus-within {
    border-color: var(--wa);
}
.wpmm-input-icon {
    padding: 0 12px 0 16px; font-size: 18px; pointer-events: none; flex-shrink: 0;
}
.wpmm-code-input {
    flex: 1; padding: 14px 0;
    border: none !important; outline: none !important; background: transparent !important;
    font-family: 'Inter', monospace; font-size: 17px; font-weight: 700;
    color: #111; letter-spacing: 2px; text-transform: uppercase;
    -webkit-appearance: none; box-shadow: none !important;
}
.wpmm-code-input::placeholder { font-weight: 400; letter-spacing: 0; color: #9ca3af; font-size: 15px; }
.wpmm-input-clear {
    display: none; align-items: center; justify-content: center;
    width: 36px; height: 36px; margin-right: 6px;
    background: #e5e7eb; border: none; border-radius: 8px;
    color: #6b7280; font-size: 13px; cursor: pointer;
    flex-shrink: 0; transition: all .15s;
}
.wpmm-input-clear:hover { background: #d1d5db; color: #374151; }

/* ── Primary button ── */
.wpmm-portal-btn {
    width: 100%; padding: 14px;
    background: var(--wa); color: #fff;
    border: none; border-radius: 8px;
    font-family: 'Inter', sans-serif; font-size: 16px; font-weight: 700;
    cursor: pointer; transition: opacity .2s, transform .1s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.wpmm-portal-btn:hover:not(:disabled) { opacity: .9; }
.wpmm-portal-btn:active:not(:disabled) { transform: scale(.98); }
.wpmm-portal-btn:disabled { opacity: .55; cursor: not-allowed; }

.wpmm-connect-btn {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    margin-bottom: 10px;
}

/* Spinner */
.wbs { display: inline-block; }
@keyframes wpmm-spin { to { transform: rotate(360deg); } }

/* ── Inline error ── */
.wpmm-inline-error {
    display: flex; align-items: center; gap: 8px;
    margin-top: 12px; padding: 12px 14px;
    background: #fef2f2; border: 1px solid #fecaca;
    border-radius: 10px; color: #dc2626; font-size: 14px; font-weight: 500;
}

/* ── Result card ── */
.wpmm-result-card { animation: wpmm-fadein .25s ease; }
@keyframes wpmm-fadein { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform: none; } }

.wpmm-result-top {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 20px;
}
.wpmm-result-status-icon { font-size: 40px; flex-shrink: 0; }
.wpmm-result-code {
    font-size: 22px; font-weight: 800; font-family: 'Inter', monospace;
    letter-spacing: 2px; color: #111;
}
.wpmm-result-badge {
    display: inline-block; margin-top: 5px;
    padding: 3px 12px; border-radius: 20px;
    font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
}
.badge-green  { background: #dcfce7; color: #16a34a; }
.badge-grey   { background: #f3f4f6; color: #6b7280; }
.badge-red    { background: #fee2e2; color: #dc2626; }

/* ── Details grid ── */
.wpmm-details-grid {
    background: #f9fafb; border-radius: 12px;
    padding: 14px 16px; margin-bottom: 16px;
    display: flex; flex-direction: column; gap: 2px;
}
.wpmm-detail-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 0; border-bottom: 1px solid #f0f0f0; font-size: 14px;
}
.wpmm-detail-row:last-child { border-bottom: none; }
.wpmm-dl { color: #6b7280; }
.wpmm-dv { font-weight: 600; color: #111; text-align: right; }

/* ── Session box ── */
.wpmm-session-box {
    background: #f0fdf4; border: 1px solid #86efac;
    border-radius: 12px; padding: 14px 16px; margin-bottom: 16px;
}
.wpmm-session-live-dot {
    font-size: 13px; font-weight: 700; color: #16a34a; margin-bottom: 10px;
}
.wpmm-session-box .wpmm-details-grid {
    background: transparent; padding: 0; margin: 0;
}
.wpmm-session-box .wpmm-detail-row { border-bottom-color: rgba(134,239,172,.4); }

/* ── Steps instructions ── */
.wpmm-steps {
    background: #eff6ff; border: 1px solid #bfdbfe;
    border-radius: 12px; padding: 16px; margin-bottom: 12px;
}
.wpmm-steps-title { font-size: 14px; font-weight: 700; color: #1e40af; margin: 0 0 12px; }
.wpmm-step {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 14px; color: #374151; margin-bottom: 8px; line-height: 1.4;
}
.wpmm-step:last-of-type { margin-bottom: 12px; }
.wpmm-step-n {
    width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
    background: var(--wa); color: #fff;
    font-size: 11px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    margin-top: 1px;
}

/* Copy row */
.wpmm-copy-row {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    background: #fff; border: 1px solid #bfdbfe; border-radius: 8px;
    padding: 8px 12px; font-size: 14px; color: #374151;
}
.wpmm-copyable { font-family: monospace; font-size: 16px; font-weight: 800; color: var(--wa); letter-spacing: 1px; }
.wpmm-copy-btn {
    margin-left: auto; padding: 5px 12px;
    background: var(--wa); color: #fff; border: none; border-radius: 6px;
    font-size: 12px; font-weight: 600; cursor: pointer;
    font-family: 'Inter', sans-serif; transition: opacity .15s;
}
.wpmm-copy-btn:hover { opacity: .85; }

/* ── Used message ── */
.wpmm-used-msg {
    background: #f9fafb; border: 1px solid #e5e7eb;
    border-radius: 12px; padding: 14px 16px;
    font-size: 14px; color: #6b7280; line-height: 1.5;
    margin-bottom: 12px;
}

/* ── Actions area ── */
.wpmm-actions { margin-bottom: 12px; }

/* ── Back button ── */
.wpmm-back-btn {
    width: 100%; padding: 11px;
    background: transparent; border: 2px solid #e5e7eb; border-radius: 12px;
    font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600; color: #6b7280;
    cursor: pointer; transition: all .15s;
    margin-top: 4px;
}
.wpmm-back-btn:hover { border-color: var(--wa); color: var(--wa); background: color-mix(in srgb, var(--wa) 5%, transparent); }

/* ── Responsive ── */
@media (max-width: 480px) {
    .wpmm-card { padding: 24px 18px; border-radius: 16px; }
    .wpmm-portal-title { font-size: 19px; }
    .wpmm-result-code { font-size: 18px; letter-spacing: 1px; }
}

/* ═══════════════════════════════════════════════════
   HOTSPOT PORTAL [wpmm_hotspot_portal]
   ═══════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

.wppf-wrap {
    max-width: 480px;
    margin: 0 auto;
    padding: 0;
}

/* ── Portal Header (flat, MVP-style) ── */
.wppf-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 14px;
}
.wppf-title     { font-size: 20px; font-weight: 700; margin: 0; padding: 0; color: #111; border: none !important; }
.wppf-site-name { font-size: 13px; color: #666; }

/* ── Body ── */
.wppf-body {
    display: flex; flex-direction: column; gap: 0;
    background: transparent;
}

/* ── Column shared ── */
.wppf-col { padding: 0; margin-bottom: 18px; }

.wppf-col-title   { margin-bottom: 10px; }
.wppf-col-heading { font-size: 15px; font-weight: 700; color: #111; }
.wppf-col-sub     { font-size: 12px; color: #6b7280; margin-top: 1px; }

/* ── Divider (OR) ── */
.wppf-divider {
    display: flex; align-items: center; gap: 8px; padding: 4px 0 14px;
}
.wppf-div-line  { flex: 1; background: #e2e2e2; height: 1px; }
.wppf-div-label {
    font-size: 11px; font-weight: 600; color: #9ca3af;
}

/* ── Package buttons (flat 2-col grid, mirrors MVP product grid) ── */
.wppf-packages {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.wppf-pkg-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    padding: 12px;
    text-align: left;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform 0.08s ease, border-color 0.15s ease;
    min-height: 74px;
}
.wppf-pkg-btn:active { transform: scale(0.97); }
.wppf-pkg-btn:hover  { border-color: var(--wa,#0077ff); color: inherit; text-decoration: none; }
.wppf-pkg-top   { display: flex; flex-direction: column; gap: 2px; width: 100%; }
.wppf-pkg-name  { font-weight: 600; font-size: 14px; color: #111; }
.wppf-pkg-price { color: var(--wa,#0077ff); font-weight: 600; font-size: 15px; }
.wppf-pkg-duration { font-size: 11px; color: #888; }

@media (max-width: 420px) {
    .wppf-packages { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 600px) {
    .wppf-wrap { max-width: 640px; }
    .wppf-packages { grid-template-columns: repeat(3, 1fr); }
}

/* ── Voucher result ── */
.wppf-result-top {
    display: flex; align-items: center; gap: 14px;
    background: #fafafa; border: 1px solid #e2e2e2;
    border-radius: 10px; padding: 14px 16px; margin-bottom: 14px;
}
.wppf-result-icon { font-size: 32px; flex-shrink: 0; }
.wppf-result-code {
    font-size: 18px; font-weight: 800; letter-spacing: 1px;
    color: var(--wa,#0077ff); font-family: monospace;
}
.wppf-result-meta {
    display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px;
}
.wppf-result-actions { margin-bottom: 10px; }
.wppf-badge {
    display: inline-block; padding: 3px 8px; border-radius: 6px;
    font-size: 11px; font-weight: 600;
    background: #f0f0f0; color: #374151;
}
.wppf-badge.badge-green { background: #e6f5ea; color: #1e7e34; }
.wppf-badge.badge-grey  { background: #f0f0f0; color: #6b7280; }
.wppf-badge.badge-red   { background: #fdeaea; color: #a52121; }

/* ── Footer ── */
.wppf-footer {
    padding: 10px 0 0; text-align: center;
    font-size: 12px; color: #9ca3af;
}
