.hgc-acym-terms-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.hgc-acym-terms-modal[hidden] {
    display: none !important;
}
div.acym_module_success {
    font-size: 12px;
}
.hgc-acym-terms-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.hgc-acym-terms-modal__panel {
    position: relative;
    width: 100%;
    max-width: 520px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
    padding: 28px 28px 24px;
    font-family: "Roboto", Sans-serif;
    font-size: 15px;
    color: #1e293b;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.hgc-acym-terms-modal__panel,
.hgc-acym-terms-modal__panel * {
    font-family: "Roboto", Sans-serif;
}

.hgc-acym-terms-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    border-radius: 8px;
    padding: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.hgc-acym-terms-modal__close:hover,
.hgc-acym-terms-modal__close:focus {
    background: #f1f5f9;
    color: #334155;
    font-size: 24px;
    outline: none;
    transform: none;
}

.hgc-acym-terms-modal__panel .hgc-acym-terms-modal__header,
.hgc-acym-terms-modal__header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding-right: 28px;
}

.hgc-acym-terms-modal__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #e8f2fc;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    color: #1e3a5f;
}

.hgc-acym-terms-modal__icon--success {
    background: #e8f8ef;
    color: #15803d;
}

.hgc-acym-terms-modal__icon--error {
    background: #fef3e8;
    color: #c2410c;
}

.hgc-acym-terms-modal__icon svg {
    width: 24px;
    height: 24px;
    display: block;
}

.hgc-acym-terms-modal__intro {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.hgc-acym-terms-modal__title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
}

.hgc-acym-terms-modal__title:hover {
    font-size: 22px;
}

.hgc-acym-terms-modal__info {
    background: #eef6fc;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.5;
    color: #475569;
}

.hgc-acym-terms-modal__info-content {
    min-width: 0;
}

.hgc-acym-terms-modal__info strong {
    display: block;
    font-size: 13px;
    color: #1e293b;
    margin-bottom: 4px;
}

.hgc-acym-terms-modal__info-body {
    display: block;
    font-size: 13px;
    line-height: 1.5;
}

.hgc-acym-terms-modal__success-body {
    margin: 0 0 20px;
    font-size: 15px;
    line-height: 1.55;
    color: #475569;
}

.hgc-acym-terms-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hgc-acym-terms-modal__actions--single {
    justify-content: flex-end;
}

.hgc-acym-terms-modal__actions--single .hgc-acym-terms-modal__btn--primary {
    margin-left: 0;
}

/* Hide default AcyMailing top callout when our success modal is used */
body.hgc-acym-modal-open #acym__callout__container,
body.hgc-acym-modal-open .acym_callout,
body.hgc-acym-modal-open .responseContainer.acym_module_error,
body.hgc-acym-modal-open .acym__field__error__block {
    display: none !important;
}

.hgc-acym-terms-modal__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.hgc-acym-terms-modal__btn:hover,
.hgc-acym-terms-modal__btn:focus {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
    font-size: 14px;
    font-weight: 600;
    outline: none;
    transform: none;
    scale: 1;
}

.hgc-acym-terms-modal__btn--primary {
    margin-left: auto;
    background: #1e3a5f;
    border-color: #1e3a5f;
    color: #fff;
}

.hgc-acym-terms-modal__btn--primary:hover,
.hgc-acym-terms-modal__btn--primary:focus {
    background: #2d5c9a;
    border-color: #2d5c9a;
    color: #fff;
    font-size: 14px;
}

.hgc-acym-terms-modal__btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

body.hgc-acym-modal-open {
    overflow: hidden;
}

@media (max-width: 560px) {
    .hgc-acym-terms-modal__panel {
        padding: 24px 20px 20px;
    }

    .hgc-acym-terms-modal__header {
        align-items: center;
        padding-right: 24px;
    }

    .hgc-acym-terms-modal__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hgc-acym-terms-modal__btn--primary {
        margin-left: 0;
        order: 3;
    }
}
