/* =============================================================================
   Zoot GBP Report Tool — Styles v1.1.0
   ============================================================================= */

.zgbp-wrap *,
.zgbp-wrap *::before,
.zgbp-wrap *::after { box-sizing: border-box; }

.zgbp-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: #e2e8f0;
    width: 100%;
    margin: 0;
    padding: 0;
    margin-bottom: 0 !important;
}

/* ── Sections ── */
.zgbp-section {
    width: 100%;
    padding: 40px 24px;
}

/* ── Form ── */
.zgbp-form-section { padding: 0 !important; margin-bottom: 0 !important; }
.zgbp-form-inner   { max-width: 100%; margin: 0 auto; width: 100%; }
.zgbp-input-group  { width: 100%; }

.zgbp-input-group {
    display: flex;
    align-items: center;
    background: #111827;
    border: 1.5px solid rgba(59, 130, 246, 0.18);
    border-radius: 100px;
    padding: 6px 6px 6px 24px;
    gap: 8px;
    transition: border-color .25s, box-shadow .25s;
}

.zgbp-input-group:focus-within {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
}

.zgbp-input-group input[type="text"] {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #e2e8f0;
    font-size: 1rem;
    padding: 10px 0;
    min-width: 0;
}

.zgbp-light .zgbp-input-group input[type="text"] { color: #111827; }
.zgbp-input-group input[type="text"]::placeholder { color: #4b5563; }
.zgbp-input-error { outline: 2px solid #ef4444 !important; }

/* ── Buttons ── */
.zgbp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background .2s, transform .12s, box-shadow .2s;
    white-space: nowrap;
}

.zgbp-btn-primary {
    background: #3b82f6;
    color: #fff;
    padding: 12px 26px;
    border-radius: 100px;
    font-size: .95rem;
    letter-spacing: .01em;
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.35);
}

.zgbp-btn-primary:hover {
    background: #2563eb;
    box-shadow: 0 4px 18px rgba(59, 130, 246, 0.45);
    transform: translateY(-1px);
}

.zgbp-btn-primary:active { transform: translateY(0); }

.zgbp-btn-ghost {
    background: transparent;
    color: #60a5fa;
    border: 1.5px solid #60a5fa;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: .9rem;
}

.zgbp-btn-ghost:hover { background: rgba(96,165,250,.1); }

/* ── Spinner inside button ── */
.zgbp-btn-spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: zgbpSpin .7s linear infinite;
    display: inline-block;
}
@keyframes zgbpSpin { to { transform: rotate(360deg); } }

/* ── Loading ── */
.zgbp-loading-section { text-align: center; }

.zgbp-spinner-ring {
    width: 52px; height: 52px;
    border: 3px solid #1e293b;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: zgbpSpin .8s linear infinite;
    margin: 0 auto 20px;
}

.zgbp-loading-title { font-size: 1.2rem; font-weight: 600; margin: 0 0 6px; color: #f1f5f9; }
.zgbp-loading-sub   { font-size: .9rem; color: #64748b; margin: 0; }

/* ── Error ── */
.zgbp-error-section { text-align: center; }

.zgbp-error-icon {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: rgba(239,68,68,.15);
    border: 2px solid #ef4444;
    color: #ef4444;
    font-size: 1.4rem;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
}

.zgbp-error-section h3 { margin: 0 0 8px; color: #f1f5f9; font-size: 1.2rem; }
.zgbp-error-text { color: #94a3b8; font-size: .9rem; margin: 0 0 20px; }

/* ── Fallback ── */
#zgbp-contact-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 48px 40px;
    margin-bottom: 24px;
    text-align: center;
    box-shadow: 0 2px 16px rgba(0,0,0,.06);
}

.zgbp-fallback-icon {
    font-size: 2.4rem;
    margin-bottom: 16px;
    line-height: 1;
    display: block;
}

.zgbp-fallback-title {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #0c0e26;
    margin: 0 0 6px;
}

.zgbp-fallback-url {
    font-size: 1.05rem;
    font-weight: 600;
    color: #2563eb;
    word-break: break-all;
    margin: 0 0 16px;
    padding: 12px 20px;
    background: #f9fbfa;
    border: 1px solid #dddfe2;
    border-radius: 10px;
    display: inline-block;
    max-width: 100%;
}

.zgbp-fallback-close {
    display: block;
    margin: 8px auto 0;
    background: none;
    border: none;
    box-shadow: none;
    color: #061b36;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    opacity: .7;
    transition: opacity .2s;
}
.zgbp-fallback-close:hover { opacity: 1; }

/* ── Results ── */
.zgbp-results-section {
    padding: 24px 0 0;
    animation: zgbpFadeIn .4s ease;
}
@keyframes zgbpFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.zgbp-report-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #1e293b;
}

.zgbp-report-title { font-size: 1.35rem; font-weight: 700; margin: 0 0 6px; color: #f1f5f9; }

.zgbp-url-row { display: flex; align-items: center; gap: 10px; }

.zgbp-report-url {
    font-size: 1rem;
    font-weight: 600;
    color: #60a5fa;
    margin: 0;
    word-break: break-all;
}

.zgbp-report-date { font-size: .8rem; color: #475569; margin: 6px 0 0; }

.zgbp-close-btn {
    background: none;
    border: none;
    color: #475569;
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    flex-shrink: 0;
    transition: color .2s;
}
.zgbp-close-btn:hover { color: #e2e8f0; }

/* ── Score ── */
.zgbp-score-wrap {
    text-align: center;
    margin-bottom: 28px;
}

.zgbp-score-badge {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    border: 3px solid #3b82f6;
    border-radius: 50%;
    width: 90px; height: 90px;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
    flex-direction: column;
}

.zgbp-score-num {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: #3b82f6;
}

.zgbp-score-label { font-size: .7rem; color: #64748b; }
.zgbp-score-hint  { font-size: .85rem; color: #64748b; margin: 0; }

/* ── Metric cards ── */
.zgbp-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.zgbp-metric-card {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.zgbp-metric-icon {
    font-size: 1.1rem;
    color: #60a5fa;
    flex-shrink: 0;
    min-width: 28px;
    text-align: center;
}

.zgbp-metric-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; color: #64748b; margin-bottom: 4px; }
.zgbp-metric-value { font-size: 1.2rem; font-weight: 700; color: #f1f5f9; }

.zgbp-metric-card.zgbp-card-ok    { border-color: rgba(52,211,153,.3); }
.zgbp-metric-card.zgbp-card-warn  { border-color: rgba(251,191,36,.3); }
.zgbp-metric-card.zgbp-card-error { border-color: rgba(248,113,113,.3); }

/* ── Text cards ── */
.zgbp-text-fields { display: flex; flex-direction: column; gap: 12px; }

.zgbp-text-card {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 16px 20px;
}

.zgbp-text-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.zgbp-text-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .5px; color: #64748b; font-weight: 600; }
.zgbp-text-value { font-size: .95rem; color: #cbd5e1; line-height: 1.6; word-break: break-word; }

/* ── Light theme ── */
.zgbp-light { color: #111827; }
.zgbp-light .zgbp-input-group { background: #ebecee; border-color: #dddfe2; }
.zgbp-light .zgbp-input-group:focus-within { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.08); }
.zgbp-light .zgbp-metric-card,
.zgbp-light .zgbp-text-card { background: #fff; border-color: #e2e8f0; }
.zgbp-light .zgbp-metric-label,
.zgbp-light .zgbp-text-label { color: #6b7280; }
.zgbp-light .zgbp-metric-value { color: #111827; }
.zgbp-light .zgbp-text-value   { color: #374151; }
.zgbp-light .zgbp-report-title { color: #0f172a; }
.zgbp-light .zgbp-report-header { border-color: #e2e8f0; }
.zgbp-light .zgbp-close-btn { color: #9ca3af; }
.zgbp-light .zgbp-close-btn:hover { color: #111827; }
.zgbp-light .zgbp-loading-title { color: #0f172a; }
.zgbp-light .zgbp-spinner-ring  { border-color: #e2e8f0; border-top-color: #3b82f6; }

/* ── Responsive ── */
@media (max-width: 640px) {
    .zgbp-metrics-grid { grid-template-columns: 1fr 1fr; }
    .zgbp-btn-primary  { padding: 11px 18px; font-size: .88rem; }
    .zgbp-input-group  { padding: 6px 6px 6px 18px; }
    .zgbp-input-group input[type="text"] { font-size: .93rem; }
}

@media (max-width: 400px) {
    .zgbp-metrics-grid { grid-template-columns: 1fr; }
    .zgbp-input-group  { padding: 8px 8px 8px 14px; border-radius: 60px; }
    .zgbp-btn-primary  { padding: 10px 14px; font-size: .85rem; }
}
