/* =========================================================
   ROOT Security Headers — Embed Widget
   Compact scan widget for iframe embedding on root.nl
   Design: navy bg · crimson accent · Titillium Web
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.embed-body {
    font-family: 'Titillium Web', sans-serif;
    background: transparent;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =========================================================
   Widget shell
   ========================================================= */
.embed-widget {
    background: #2B3140;
    padding: 1.75rem 2rem 1.5rem;
    display: flex;
	align-items: center;
    flex-direction: column;
    gap: 1.25rem;
    border-top: 3px solid #E40049;
    position: relative;
    overflow: hidden;
}

/* Diagonal line texture */
.embed-widget::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 20px,
        rgba(255, 255, 255, 0.016) 20px,
        rgba(255, 255, 255, 0.016) 21px
    );
    pointer-events: none;
    z-index: 0;
}

.embed-widget > * {
    position: relative;
    z-index: 1;
}

/* =========================================================
   Decorative: radial glow behind the form
   ========================================================= */
.embed-glow {
    position: absolute;
    /* Centre the glow roughly behind the form area */
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 420px;
    height: 220px;
    background: radial-gradient(
        ellipse at center,
        rgba(228, 0, 73, 0.13) 0%,
        rgba(228, 0, 73, 0.04) 45%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 0;
}

/* =========================================================
   Decorative: large shield watermark (top-right)
   ========================================================= */
.embed-watermark {
    position: absolute;
    top: -10px;
    right: -16px;
    width: 130px;
    height: 130px;
    color: rgba(255, 255, 255, 0.04);
    pointer-events: none;
    z-index: 0;
}

.embed-watermark svg {
    width: 100%;
    height: 100%;
}

/* =========================================================
   Header row: logo | divider | title + subtitle
   ========================================================= */
.embed-header {
    display: flex;
    align-items: center;
    gap: 0;
}

.embed-logo {
    height: 26px;
    width: auto;
    flex-shrink: 0;
    margin-right: 1rem;
}

.embed-header-divider {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
    margin-right: 1rem;
}

.embed-header-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.embed-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.05em;
    line-height: 1.2;
    text-transform: uppercase;
}

.embed-subtitle {
    font-size: 0.78rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.4;
    letter-spacing: 0.01em;
}

/* =========================================================
   Form + input
   ========================================================= */
.embed-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Constrain the input row — no longer stretches full width */
.embed-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    width: 480px;
}

.embed-input-wrapper {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    overflow: hidden;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    /* Subtle inner shadow to add depth */
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
}

.embed-input-wrapper:focus-within {
    border-color: #E40049;
    box-shadow:
        inset 0 1px 3px rgba(0, 0, 0, 0.06),
        0 0 0 3px rgba(228, 0, 73, 0.18);
}

.embed-input-icon {
    flex-shrink: 0;
    margin-left: 0.7rem;
    color: #b0b7c3;
    pointer-events: none;
}

.embed-input-wrapper input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 0.72rem 0.6rem;
    font-family: 'Titillium Web', sans-serif;
    font-size: 0.88rem;
    font-weight: 400;
    color: #1a1f2e;
    min-width: 0;
}

.embed-input-wrapper input::placeholder {
    color: #b0b7c3;
}

/* ---- Scan button ---- */
.embed-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #E40049;
    color: #ffffff;
    border: none;
    padding: 0 1.2rem;
    font-family: 'Titillium Web', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    /* Match wrapper height precisely */
    align-self: stretch;
    min-height: 42px;
    white-space: nowrap;
    transition:
        background 0.15s ease,
        box-shadow 0.2s ease;
    position: relative;
}

/* Pop: glow on hover */
.embed-btn:hover {
    background: #cc003f;
    box-shadow: 0 0 16px rgba(228, 0, 73, 0.45);
}

.embed-btn:active {
    background: #b30036;
    box-shadow: none;
}

.embed-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

/* Arrow icon inside button text */
.embed-btn-text {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Loading spinner */
.embed-spin {
    animation: embedSpin 0.75s linear infinite;
    display: block;
}

@keyframes embedSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ---- Inline error ---- */
.embed-error {
    font-size: 0.75rem;
    font-weight: 600;
    color: #ff6b8a;
    padding: 0 0.2rem;
    letter-spacing: 0.01em;
}

/* =========================================================
   Trust row
   ========================================================= */
.embed-trust {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.embed-trust-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

/* Checkmark icons in trust row */
.embed-trust-item svg {
    color: #E40049;
    flex-shrink: 0;
    opacity: 0.8;
}

.embed-trust-sep {
    color: rgba(255, 255, 255, 0.18);
    font-size: 0.7rem;
    user-select: none;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 400px) {
    .embed-widget {
        padding: 1.25rem 1.25rem 1.125rem;
    }

    .embed-field {
        max-width: 100%;
    }

    .embed-input-wrapper {
        flex-wrap: wrap;
    }

    .embed-input-wrapper input {
        width: 100%;
        flex: none;
        border-bottom: 1px solid #e5e7eb;
    }

    .embed-btn {
        width: 100%;
        justify-content: center;
        min-height: 40px;
    }
}

@media (max-width: 320px) {
    .embed-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .embed-header-divider {
        display: none;
    }

    .embed-logo {
        margin-right: 0;
        margin-bottom: 0.25rem;
    }
}
