/**
 * IA Mismo Orbital Widget - Stylesheet
 * Version: 13.0.0
 * Text Domain: ia-mismo-widget
 *
 * All widget visual styles live here so you can customize
 * colors, spacing, typography, etc. without touching the PHP.
 * Every selector is scoped under #iamw-wrapper to avoid
 * leaking styles into the host page.
 * ============================================================ */

/* ── Base box-model reset (scoped) ── */
#iamw-wrapper {
    box-sizing: border-box;
}

#iamw-wrapper *,
#iamw-wrapper *::before,
#iamw-wrapper *::after {
    box-sizing: inherit;
}

#iamw-wrapper {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background-color: #030712;
    color: #f8fafc;
    font-family: 'Inter', sans-serif;
    user-select: none;
}

#iamw-wrapper .iamw-font-sync {
    font-family: 'Syncopate', sans-serif;
}

/* ── Background grid + spotlights ── */
#iamw-wrapper .iamw-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(37, 99, 235, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
}

#iamw-wrapper .iamw-spotlight-1 {
    position: absolute;
    top: 20%;
    left: 30%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

#iamw-wrapper .iamw-spotlight-2 {
    position: absolute;
    bottom: 10%;
    right: 20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(8, 145, 178, 0.06) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

/* ── Glassmorphism utility ── */
#iamw-wrapper .iamw-glass {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── Core halo pulse animation ── */
@keyframes iamw-halo-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.25;
    }

    50% {
        transform: scale(1.15);
        opacity: 0.45;
    }
}

#iamw-wrapper .iamw-halo {
    animation: iamw-halo-pulse 4s infinite ease-in-out;
}

/* ── Scrollbar (scoped) ── */
#iamw-wrapper ::-webkit-scrollbar {
    width: 6px;
}

#iamw-wrapper ::-webkit-scrollbar-track {
    background: transparent;
}

#iamw-wrapper ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 99px;
}

#iamw-wrapper ::-webkit-scrollbar-thumb:hover {
    background: rgba(37, 99, 235, 0.5);
}

/* ── Layout shell ── */
#iamw-wrapper .iamw-shell {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px 32px;
}

/* ── Header ── */
#iamw-wrapper .iamw-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 20;
}

#iamw-wrapper .iamw-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

#iamw-wrapper .iamw-brand-icon {
    background: #2563eb;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.2);
}

#iamw-wrapper .iamw-brand-icon i {
    color: white;
    width: 20px;
    height: 20px;
}

#iamw-wrapper .iamw-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

#iamw-wrapper .iamw-brand-name {
    font-size: 18px;
    font-weight: 700;
    font-family: 'Syncopate', sans-serif;
    letter-spacing: -0.05em;
    text-transform: uppercase;
    color: #f1f5f9;
}

#iamw-wrapper .iamw-brand-tagline {
    font-size: 8px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.22em;
    color: #94a3b8;
}

#iamw-wrapper .iamw-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

#iamw-wrapper .iamw-header-meta {
    display: flex;
    flex-direction: column;
    text-align: right;
}

#iamw-wrapper .iamw-header-meta-label {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

#iamw-wrapper .iamw-header-status {
    font-size: 10px;
    color: #34d399;
    font-family: monospace;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
}

#iamw-wrapper .iamw-header-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34d399;
    display: inline-block;
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

#iamw-wrapper .iamw-btn-reset {
    font-size: 12px;
    color: #cbd5e1;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

/* ── Main canvas ── */
#iamw-wrapper .iamw-main {
    flex-grow: 1;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#iamw-wrapper #iamw-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
    transition: opacity 0.5s;
}

#iamw-wrapper #iamw-core {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.7s ease-out;
    z-index: 10;
}

#iamw-wrapper .iamw-core-halo {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.1);
    pointer-events: none;
}

#iamw-wrapper .iamw-core-ring {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

#iamw-wrapper .iamw-core-ring-1 {
    width: 90%;
    height: 90%;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

#iamw-wrapper .iamw-core-ring-2 {
    width: 70%;
    height: 70%;
    border: 1px solid rgba(8, 145, 178, 0.1);
}

#iamw-wrapper .iamw-core-content {
    text-align: center;
    padding: 16px;
    position: relative;
    z-index: 20;
    pointer-events: none;
}

#iamw-wrapper .iamw-core-eyebrow {
    display: block;
    font-size: 8px;
    text-transform: uppercase;
    font-weight: 700;
    color: #60a5fa;
    letter-spacing: 0.3em;
    font-family: 'Syncopate', sans-serif;
    margin-bottom: 4px;
}

#iamw-wrapper #iamw-core-label {
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #e2e8f0;
    margin: 0;
}

#iamw-wrapper #iamw-core-hint {
    display: block;
    font-size: 7px;
    color: #64748b;
    margin-top: 8px;
    font-family: monospace;
}

/* ── Back button ── */
#iamw-wrapper #iamw-back-btn {
    position: absolute;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%) scale(0.75);
    border: 1px solid rgba(59, 130, 246, 0.3);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #60a5fa;
    padding: 12px 24px;
    border-radius: 9999px;
    z-index: 9999999;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.5s;
    opacity: 0;
    pointer-events: none;
    cursor: pointer;
    background: transparent;
}

#iamw-wrapper #iamw-nodes {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
}

/* ── Footer ── */
#iamw-wrapper .iamw-footer {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-top: 1px solid rgba(15, 23, 42, 0.6);
    padding-top: 24px;
    position: relative;
    z-index: 20;
    gap: 16px;
}

#iamw-wrapper .iamw-footer-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

#iamw-wrapper .iamw-footer-brand {
    color: #3b82f6;
    font-family: 'Syncopate', sans-serif;
}

/* ── Detail drawer ── */
#iamw-wrapper #iamw-drawer {
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    width: 100%;
    max-width: 480px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 99999;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#iamw-wrapper .iamw-drawer-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(2, 6, 23, 0.2);
}

#iamw-wrapper .iamw-drawer-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #60a5fa;
}

#iamw-wrapper #iamw-drawer-category {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-weight: 700;
    font-family: 'Syncopate', sans-serif;
}

#iamw-wrapper .iamw-drawer-close {
    padding: 8px;
    color: #94a3b8;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

#iamw-wrapper .iamw-drawer-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

#iamw-wrapper .iamw-drawer-title-block {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#iamw-wrapper #iamw-drawer-title {
    font-size: 22px;
    font-weight: 700;
    font-family: 'Syncopate', sans-serif;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: white;
    margin: 0;
    line-height: 1.3;
}

#iamw-wrapper #iamw-drawer-desc {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.7;
    font-weight: 300;
    margin: 0;
}

/* ── Custom subtitle (new) ── */
#iamw-wrapper #iamw-drawer-subtitle {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #60a5fa;
    margin: 0;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Custom paragraphs container (new) ── */
#iamw-wrapper .iamw-drawer-paragraphs {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#iamw-wrapper .iamw-drawer-paragraphs p {
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.7;
    font-weight: 300;
    margin: 0;
}

/* ── Infrastructure card ── */
#iamw-wrapper .iamw-drawer-infra {
    padding: 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.01);
    display: none;
    flex-direction: column;
    gap: 8px;
}

#iamw-wrapper .iamw-drawer-infra-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 10px;
}

#iamw-wrapper .iamw-drawer-infra-desc {
    color: #64748b;
    font-size: 11px;
    line-height: 1.7;
    margin: 0;
}

/* ── Drawer footer / CTA ── */
#iamw-wrapper .iamw-drawer-footer {
    padding: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(2, 6, 23, 0.4);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#iamw-wrapper #iamw-drawer-cta {
    width: 100%;
    background: #2563eb;
    color: white;
    font-weight: 700;
    padding: 16px;
    border-radius: 12px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.1);
}

#iamw-wrapper .iamw-drawer-cta-sub {
    text-align: center;
    font-size: 9px;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin: 0;
}

/* ── Demo modal ── */
.iamw-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 99999;
    transition: opacity 0.3s ease;
}

.iamw-modal-card {
    padding: 32px;
    border-radius: 2rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
    max-width: 400px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
}

.iamw-modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.iamw-modal-title {
    font-size: 20px;
    font-weight: 700;
    font-family: 'Syncopate', sans-serif;
    text-transform: uppercase;
    color: white;
    margin: 0;
}

.iamw-modal-desc {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.7;
    margin: 0;
}

.iamw-modal-close-btn {
    width: 100%;
    color: white;
    font-weight: 700;
    padding: 16px;
    border-radius: 12px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    border: none;
    cursor: pointer;
}

@media screen and (max-width: 768px) {
    #iamw-wrapper .iamw-shell {
        padding: 0px 6px;
    }
}