/* Integration-only fixes: leave the supplied plugin's assets unchanged. */
html body .ecs-profile-card-modal .ecs-profile-card-modal-dialog {
    box-sizing: border-box;
    width: min(760px, 100%) !important;
    background: #fff;
}

/* The theme's generic button padding otherwise enlarges the close control. */
html body .ecs-profile-card-modal button.ecs-profile-card-modal-close {
    box-sizing: border-box !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
}

html body .ecs-profile-card-modal button.ecs-profile-card-modal-close::before,
html body .ecs-profile-card-modal button.ecs-profile-card-modal-close::after {
    content: none !important;
}

html body .ecs-profile-card-modal button.ecs-profile-card-modal-close:focus-visible {
    outline: 2px solid #ed780b !important;
    outline-offset: 2px !important;
}

html body .ecs-profile-card-modal div.ecs-profile-form-wrap .ecs-profile-form-eclinical h2,
html body .ecs-profile-card-modal div.ecs-profile-form-wrap .ecs-created-card-preview h3 {
    padding-inline-end: 44px !important;
}
.ecs-profile-card-modal[hidden] { display: none !important; }

/* Visible throughout photo preparation, page submission, rendering and download. */
html body .ecs-card-status {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: #eef7fa;
    border-left: 4px solid #0bbbd3;
    color: #0d3347;
    font: 500 15px/1.5 Montserrat, Arial, sans-serif;
    text-align: left;
    overflow-wrap: anywhere;
}
html body .ecs-card-status[data-state="busy"]::before {
    content: "";
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    box-sizing: border-box;
    border: 3px solid #bddce5;
    border-top-color: #0d3347;
    border-radius: 50%;
    animation: ecsCardSpinner 1s linear infinite;
}
html body .ecs-card-status[data-state="error"] {
    background: #fff5eb;
    border-color: #eb7724;
}
html body .ecs-profile-form button:disabled { cursor: wait !important; }
html body .ecs-card-status[hidden],
html body .ecs-profile-card-item .ecs-download-actions[hidden],
html body div.ecs-profile-form-wrap .ecs-profile-card-item .ecs-download-actions[hidden] { display: none !important; }
.ecs-rendered-card-loading button {
    padding: 12px 20px;
    background: #0d3347;
    color: #fff;
    border: 0;
    cursor: pointer;
}
@keyframes ecsCardSpinner { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    html body .ecs-card-status::before,
    html body .ecs-loading-squares span { animation: none !important; }
}
