.hygtg-card {
    --hyg-accent: var(--global-palette1, #d0b8f4);
    --hyg-btn-bg: var(--global-palette1, #d0b8f4);
    --hyg-btn-bg-hover: #c4a8ee;
    --hyg-text: var(--wp--preset--color--contrast, var(--global-palette5, #111827));
    --hyg-muted: var(--wp--preset--color--secondary, var(--global-palette4, #6b7280));
    --hyg-bg: var(--wp--preset--color--base, #f8fafc);
    --hyg-card: var(--wp--preset--color--background, #ffffff);
    --hyg-border: rgba(0, 0, 0, 0.1);
    margin: 20px 0 12px;
    padding: 18px;
    border: 1px solid var(--hyg-border);
    border-radius: 12px;
    background: var(--hyg-card);
    color: var(--hyg-text);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.hygtg-card__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

.hygtg-card__main {
    min-width: 0;
}

@supports (color: color-mix(in srgb, #000 50%, #fff)) {
    .hygtg-card {
        --hyg-border: color-mix(in srgb, var(--hyg-text) 12%, transparent);
    }
}

.hygtg-card__title {
    margin: 0 0 10px;
    font-size: 22px;
    line-height: 1.3;
    color: var(--hyg-text);
}

.hygtg-card__text {
    margin: 0 0 14px;
    color: var(--hyg-muted);
    font-size: 15px;
    line-height: 1.55;
}

.hygtg-card__cta-wrap {
    margin: 0 0 12px;
}

.hygtg-card__btn {
    display: inline-block;
    width: 100%;
    max-width: 360px;
    box-sizing: border-box;
    padding: 12px 16px;
    text-align: center;
    border-radius: 10px;
    background: var(--hyg-btn-bg);
    color: var(--global-palette4, #211f20);
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.14s ease, opacity 0.14s ease;
    line-height: 1.2;
}

.hygtg-card__btn--full {
    width: 100%;
    max-width: none;
}

.hygtg-card__btn:hover,
.hygtg-card__btn:focus {
    color: var(--global-palette4, #211f20);
    background: var(--hyg-btn-bg-hover);
    transform: translateY(-1px);
}

.hygtg-card__btn:focus {
    outline: 2px solid var(--hyg-btn-bg-hover);
    outline-offset: 2px;
}

.hygtg-card__qr-wrap {
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.hygtg-card__qr {
    width: 220px;
    height: 220px;
    max-width: 100%;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--hyg-border);
    padding: 6px;
}

.hygtg-card__url-label {
    margin: 10px 0 4px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--hyg-muted);
}

.hygtg-card__details {
    margin: 10px 0 0;
}

.hygtg-card__details > summary {
    cursor: pointer;
    user-select: none;
}

.hygtg-card__details > summary::-webkit-details-marker {
    display: none;
}

.hygtg-card__details[open] > summary {
    margin-bottom: 4px;
}

.hygtg-card__url {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-all;
}

.hygtg-card__url a {
    color: var(--hyg-accent);
}

.hygtg-card__aside {
    display: none;
}

.hygtg-card--fallback .hygtg-card__btn {
    background: var(--hyg-btn-bg);
}

.hygtg-auth-slot {
    margin: 14px 0;
}

.hygtg-auth-slot--wp-login {
    margin-top: 18px;
}

.hygtg-auth-slot .hygtg-auth-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    padding: 12px 16px;
    border-radius: 999px;
    border: 1px solid #1e8fc7;
    background: linear-gradient(135deg, #2aabee 0%, #229ed9 100%) !important;
    color: #ffffff !important;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    box-shadow: 0 8px 18px rgba(34, 158, 217, 0.28);
    transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
}

.hygtg-auth-slot .hygtg-auth-btn::before {
    content: "";
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='18' viewBox='0 0 20 18' fill='none'%3E%3Cpath fill='%23fff' d='M19.78 1.03a.72.72 0 0 0-.86-.1L.8 8.13c-.54.22-.52 1 .03 1.19l4.62 1.5 1.77 5.55c.16.5.82.61 1.14.2l2.57-3.24 4.67 3.57c.5.38 1.2.1 1.32-.53L19.97 1.8a.72.72 0 0 0-.2-.76ZM6.63 10.42l8.73-5.38a.36.36 0 0 1 .43.56l-7.2 6.48a.72.72 0 0 0-.23.39l-.28 1.94a.36.36 0 0 1-.7.05L6.3 11.1a.72.72 0 0 1 .32-.68Z'/%3E%3C/svg%3E");
}

.hygtg-auth-slot .hygtg-auth-btn:hover,
.hygtg-auth-slot .hygtg-auth-btn:focus {
    color: #ffffff !important;
    text-decoration: none !important;
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: 0 10px 22px rgba(34, 158, 217, 0.34);
}

.hygtg-auth-slot .hygtg-auth-btn:focus {
    outline: 2px solid rgba(34, 158, 217, 0.38);
    outline-offset: 2px;
}

.hygtg-auth-title {
    margin: 0 0 10px;
    color: var(--hyg-muted);
    font-size: 14px;
    line-height: 1.5;
}

.hygtg-auth-btn {
    text-decoration: none;
}

.hygtg-notice {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 14px;
    line-height: 1.5;
}

.hygtg-notice--success {
    color: #3a275b;
    background: #f3ecff;
    border-color: #d9c5fa;
}

.hygtg-notice--error {
    color: #8a2e3b;
    background: #fdeff2;
    border-color: #f4c5ce;
}

.hygtg-account-fieldset {
    margin: 18px 0 0;
    padding: 16px;
    border: 1px solid var(--hyg-border);
    border-radius: 10px;
    max-width: 100%;
    overflow: hidden;
}

.hygtg-account-fieldset > legend {
    padding: 0 6px;
    font-weight: 700;
}

.hygtg-account-text {
    margin: 0 0 10px;
    color: var(--hyg-muted);
    word-break: break-word;
    overflow-wrap: anywhere;
}

.hygtg-account-text--ok {
    color: var(--hyg-text);
    font-weight: 600;
}

.hygtg-account-meta {
    margin: 0 0 6px;
    font-size: 14px;
    line-height: 1.45;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.hygtg-account-unlink-btn {
    margin-top: 12px;
    width: 100%;
}

.hygtg-account-bot-activation {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--hyg-border);
}

.hygtg-account-quick-activation {
    margin-top: 14px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--hyg-border);
    background: #f8f6ff;
}

.hygtg-account-cta,
.hygtg-account-qr {
    margin: 10px 0 0;
}

.hygtg-account-qr {
    display: flex;
    justify-content: center;
}

.hygtg-account-qr .hygtg-card__qr {
    width: min(220px, 100%);
    height: auto;
}

@media (max-width: 767px) {
    .hygtg-account-fieldset {
        margin-top: 12px;
        padding: 12px;
    }

    .hygtg-account-fieldset > legend {
        padding: 0;
    }

    .hygtg-account-unlink-btn,
    .hygtg-card__btn {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .hygtg-account-bot-activation {
        margin-top: 12px;
        padding-top: 12px;
    }
}

@media (min-width: 900px) {
    .hygtg-card {
        padding: 22px;
    }

    .hygtg-card__layout {
        grid-template-columns: minmax(0, 1fr) 240px;
        align-items: stretch;
    }

    .hygtg-card__btn {
        min-width: 280px;
    }

    .hygtg-card__aside {
        display: block;
        justify-self: end;
    }
}
