/* Medibox v309 — compact notifications + clearer patient actions */

/* Keep informational messages short and visually quiet. */
body.app-body .flash-stack,
.embedded-body .flash-stack {
    width: min(320px, calc(100vw - 28px));
    gap: 6px;
}

body.app-body .flash-stack .alert,
.embedded-body .flash-stack .alert {
    min-height: 0;
    padding: 8px 9px 8px 10px !important;
    align-items: center;
    gap: 8px;
    border-radius: 9px !important;
    font-size: 11.5px;
    line-height: 1.3;
    box-shadow: 0 7px 18px rgba(15, 23, 42, .10) !important;
}

body.app-body .flash-stack .alert > span,
.embedded-body .flash-stack .alert > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

body.app-body .flash-stack .alert button,
.embedded-body .flash-stack .alert button {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 7px;
    font-size: 16px;
    cursor: pointer;
}

body.app-body .flash-stack .alert button:hover,
.embedded-body .flash-stack .alert button:hover {
    background: rgba(15, 23, 42, .06);
}

/* "Profile" in the active examination should read as a real action. */
body.app-body .clinical-profile-patient-button,
.embedded-body .clinical-profile-patient-button {
    min-width: 126px !important;
    min-height: 40px !important;
    padding: 8px 14px !important;
    border: 1px solid #c7d2fe !important;
    border-radius: 10px !important;
    background: #eef2ff !important;
    color: #3f46b5 !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    box-shadow: 0 3px 10px rgba(79, 70, 229, .08) !important;
}

body.app-body .clinical-profile-patient-button:hover,
.embedded-body .clinical-profile-patient-button:hover {
    border-color: #aebcf9 !important;
    background: #e6eaff !important;
    color: #3730a3 !important;
    box-shadow: 0 5px 14px rgba(79, 70, 229, .12) !important;
}

body.app-body .clinical-profile-patient-button .ui-icon,
.embedded-body .clinical-profile-patient-button .ui-icon {
    width: 17px !important;
    height: 17px !important;
}

/* "New examination" is the primary patient-profile action. */
body.app-body .patient-profile-header-actions .patient-profile-direct-visit-form .patient-profile-schedule-button,
body.app-body .patient-profile-v3-actions .patient-profile-schedule-button,
body.app-body .patient-profile-v4-new-exam,
.embedded-body .patient-profile-v3-actions .patient-profile-schedule-button,
.embedded-body .patient-profile-v4-new-exam {
    min-width: 145px !important;
    min-height: 40px !important;
    padding: 8px 15px !important;
    border: 1px solid #4f46e5 !important;
    border-radius: 10px !important;
    background: #4f46e5 !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    box-shadow: 0 5px 14px rgba(79, 70, 229, .18) !important;
}

body.app-body .patient-profile-header-actions .patient-profile-direct-visit-form .patient-profile-schedule-button:hover,
body.app-body .patient-profile-v3-actions .patient-profile-schedule-button:hover,
body.app-body .patient-profile-v4-new-exam:hover,
.embedded-body .patient-profile-v3-actions .patient-profile-schedule-button:hover,
.embedded-body .patient-profile-v4-new-exam:hover {
    border-color: #4338ca !important;
    background: #4338ca !important;
    color: #fff !important;
    box-shadow: 0 7px 18px rgba(79, 70, 229, .24) !important;
}

body.app-body .patient-profile-header-actions .patient-profile-direct-visit-form .patient-profile-schedule-button .ui-icon,
body.app-body .patient-profile-v3-actions .patient-profile-schedule-button .ui-icon,
body.app-body .patient-profile-v4-new-exam .ui-icon,
.embedded-body .patient-profile-v3-actions .patient-profile-schedule-button .ui-icon,
.embedded-body .patient-profile-v4-new-exam .ui-icon {
    width: 17px !important;
    height: 17px !important;
}

@media (max-width: 620px) {
    body.app-body .flash-stack,
    .embedded-body .flash-stack {
        width: min(300px, calc(100vw - 20px));
    }

    body.app-body .clinical-profile-patient-button,
    .embedded-body .clinical-profile-patient-button {
        min-width: 0 !important;
    }
}
