/* Shared Indy Hub UI components */

.indy-hub-popup {
    position: fixed;
    top: 1.25rem;
    left: 50%;
    transform: translate(-50%, -12px);
    z-index: 2100;
    width: min(420px, 92vw);
    padding: 1rem 1.25rem;
    border-radius: 18px;
    border: 1px solid rgba(125, 138, 160, 0.35);
    background: var(--indy-card-surface, rgba(255, 255, 255, 0.95));
    box-shadow: var(--indy-card-shadow, 0 24px 54px rgba(15, 23, 42, 0.22));
    display: flex;
    align-items: center;
    gap: 0.85rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

[data-bs-theme="dark"] .indy-hub-popup {
    background: var(--indy-card-surface, rgba(17, 24, 39, 0.95));
    border-color: rgba(148, 163, 184, 0.24);
    box-shadow: var(--indy-card-shadow, 0 26px 60px rgba(0, 0, 0, 0.6));
}

.indy-hub-popup.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
}

.indy-hub-popup::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(120deg, rgba(var(--bs-primary-rgb, 13, 110, 253), 0.08), transparent 70%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.indy-hub-popup.is-visible::before {
    opacity: 1;
}

.indy-hub-popup-icon {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(var(--bs-primary-rgb, 13, 110, 253), 0.16);
    color: var(--bs-primary, #0d6efd);
    font-size: 1.2rem;
    box-shadow: inset 0 0 0 1px rgba(var(--bs-primary-rgb, 13, 110, 253), 0.14);
}

.indy-hub-popup[data-popup-type="success"] .indy-hub-popup-icon {
    background: rgba(var(--bs-success-rgb, 25, 135, 84), 0.18);
    color: var(--bs-success, #198754);
    box-shadow: inset 0 0 0 1px rgba(var(--bs-success-rgb, 25, 135, 84), 0.18);
}

.indy-hub-popup[data-popup-type="warning"] .indy-hub-popup-icon {
    background: rgba(var(--bs-warning-rgb, 255, 193, 7), 0.2);
    color: var(--bs-warning, #ffc107);
    box-shadow: inset 0 0 0 1px rgba(var(--bs-warning-rgb, 255, 193, 7), 0.22);
}

.indy-hub-popup[data-popup-type="danger"] .indy-hub-popup-icon {
    background: rgba(var(--bs-danger-rgb, 220, 53, 69), 0.18);
    color: var(--bs-danger, #dc3545);
    box-shadow: inset 0 0 0 1px rgba(var(--bs-danger-rgb, 220, 53, 69), 0.22);
}

.indy-hub-popup[data-popup-type="secondary"] .indy-hub-popup-icon {
    background: rgba(var(--bs-secondary-rgb, 108, 117, 125), 0.2);
    color: var(--bs-secondary, #6c757d);
    box-shadow: inset 0 0 0 1px rgba(var(--bs-secondary-rgb, 108, 117, 125), 0.22);
}

.indy-hub-popup-message {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--bs-body-color, #1f2937);
}

[data-bs-theme="dark"] .indy-hub-popup-message {
    color: var(--bs-body-color, #e2e8f0);
}

.indy-hub-popup-dismiss {
    position: relative;
    z-index: 1;
    margin-left: 0.25rem;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: inherit;
    opacity: 0.65;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.indy-hub-popup-dismiss:hover,
.indy-hub-popup-dismiss:focus {
    opacity: 1;
    background: rgba(var(--bs-body-color-rgb, 31, 41, 55), 0.08);
    outline: none;
}

.indy-hub-popup-dismiss:focus-visible {
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb, 13, 110, 253), 0.35);
}

@media (max-width: 576px) {
    .indy-hub-popup {
        width: min(94vw, 360px);
        padding: 0.9rem 1rem;
        border-radius: 16px;
    }

    .indy-hub-popup-icon {
        width: 38px;
        height: 38px;
        border-radius: 12px;
        font-size: 1.1rem;
    }

    .indy-hub-popup-message {
        font-size: 0.9rem;
    }
}
