/* E1 global delete controls.
   Loaded after every page-specific stylesheet from base.html, so the same
   interaction design wins consistently across the entire application.
   Header trash buttons match the translucent ID badge; other delete actions
   use a quiet neutral surface and the same solid-red hover. */

/* Header trash controls: match the ID badge in their emerald header. */
body.e1-app-page #dealDetailOverlay .crm-header-trash-button,
body.e1-app-page #contactDetailOverlay .crm-header-trash-button,
body.e1-app-page .company-detail-header .crm-header-trash-button,
body.e1-app-page #dealTaskInfoModal .deal-task-info-trash {
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    border:1px solid rgba(255,255,255,.35) !important;
    background:rgba(255,255,255,.15) !important;
    color:#FFFFFF !important;
    box-shadow:none !important;
    transform:none !important;
    transition:background .18s ease,border-color .18s ease,color .18s ease !important;
}
body.e1-app-page #dealDetailOverlay .crm-header-trash-button:hover:not(:disabled),
body.e1-app-page #contactDetailOverlay .crm-header-trash-button:hover:not(:disabled),
body.e1-app-page .company-detail-header .crm-header-trash-button:hover:not(:disabled),
body.e1-app-page #dealTaskInfoModal .deal-task-info-trash:hover:not(:disabled) {
    border-color:#B83A48 !important;
    background:#B83A48 !important;
    color:#FFFFFF !important;
    box-shadow:none !important;
    transform:none !important;
}
body.e1-app-page #dealDetailOverlay .crm-header-trash-button svg,
body.e1-app-page #contactDetailOverlay .crm-header-trash-button svg,
body.e1-app-page .company-detail-header .crm-header-trash-button svg,
body.e1-app-page #dealTaskInfoModal .deal-task-info-trash svg {
    display:block !important;
    stroke:currentColor !important;
}
body.e1-app-page #dealDetailOverlay .crm-header-trash-button img,
body.e1-app-page #contactDetailOverlay .crm-header-trash-button img,
body.e1-app-page .company-detail-header .crm-header-trash-button img,
body.e1-app-page #dealTaskInfoModal .deal-task-info-trash img {
    filter:brightness(0) invert(1) !important;
}
body.e1-app-page #dealDetailOverlay .crm-header-trash-button:focus-visible,
body.e1-app-page #contactDetailOverlay .crm-header-trash-button:focus-visible,
body.e1-app-page .company-detail-header .crm-header-trash-button:focus-visible,
body.e1-app-page #dealTaskInfoModal .deal-task-info-trash:focus-visible {
    outline:2px solid #FFFFFF !important;
    outline-offset:3px !important;
}
body.e1-app-page #dealDetailOverlay .crm-header-trash-button:disabled,
body.e1-app-page #contactDetailOverlay .crm-header-trash-button:disabled,
body.e1-app-page .company-detail-header .crm-header-trash-button:disabled,
body.e1-app-page #dealTaskInfoModal .deal-task-info-trash:disabled {
    opacity:.55 !important;
    cursor:wait !important;
}

/* Small icon controls that remove a file, phone, list value or checklist row. */
body.e1-app-page :is(
    #contactDetailOverlay .contact-custom-file-delete,
    #dealDetailOverlay .deal-file-remove,
    .company-phone-row .company-phone-remove,
    .company-email-remove,
    #contactDetailOverlay .contact-remove-phone,
    #dealDetailOverlay .deal-client-phone-remove,
    .crm-list-editor-remove,
    .crm-task-edit-checklist-remove,
    .deal-task-checklist-remove,
    .crm-task-checklist-remove
) {
    border:1px solid #D2E8DB !important;
    background:#F7FCF9 !important;
    color:#668575 !important;
    box-shadow:none !important;
    transform:none !important;
    transition:background .18s ease,border-color .18s ease,color .18s ease !important;
}
body.e1-app-page :is(
    #contactDetailOverlay .contact-custom-file-delete,
    #dealDetailOverlay .deal-file-remove,
    .company-phone-row .company-phone-remove,
    .company-email-remove,
    #contactDetailOverlay .contact-remove-phone,
    #dealDetailOverlay .deal-client-phone-remove,
    .crm-list-editor-remove,
    .crm-task-edit-checklist-remove,
    .deal-task-checklist-remove,
    .crm-task-checklist-remove
):hover:not(:disabled) {
    border-color:#B83A48 !important;
    background:#B83A48 !important;
    color:#FFFFFF !important;
    box-shadow:none !important;
    transform:none !important;
}
body.e1-app-page :is(
    #contactDetailOverlay .contact-custom-file-delete,
    #dealDetailOverlay .deal-file-remove,
    .company-phone-row .company-phone-remove,
    .company-email-remove,
    #contactDetailOverlay .contact-remove-phone,
    #dealDetailOverlay .deal-client-phone-remove,
    .crm-list-editor-remove,
    .crm-task-edit-checklist-remove,
    .deal-task-checklist-remove,
    .crm-task-checklist-remove
):hover:not(:disabled) img {
    filter:brightness(0) invert(1) !important;
}

/* Removing an image from the feed keeps its dark overlay until hover. */
body.e1-app-page .crm-feed-preview-remove {
    border:1px solid rgba(255,255,255,.35) !important;
    background:rgba(22,39,31,.80) !important;
    color:#FFFFFF !important;
    box-shadow:none !important;
}
body.e1-app-page .crm-feed-preview-remove:hover:not(:disabled) {
    border-color:#B83A48 !important;
    background:#B83A48 !important;
    color:#FFFFFF !important;
}

/* Text/menu delete actions: neutral at rest, solid red on hover. */
body.e1-app-page :is(
    .contacts-delete-selected,
    .crm-task-delete-button,
    .crm-section-action-delete,
    .company-comment-delete,
    .company-danger-button,
    .company-menu-danger,
    .crm-feed-delete,
    .crm-task-notify-delete-all,
    .stage-context-menu .stage-menu-delete,
    .deal-custom-menu-delete,
    .deal-file-menu .deal-file-menu-delete,
    .crm-deals-shell .deal-custom-menu button[data-action="delete-definition"],
    .crm-deals-shell .crm-field-definition-menu button[data-action="delete-definition"],
    #contactDetailOverlay .deal-custom-menu button[data-action="delete-definition"],
    #contactDetailOverlay .crm-field-definition-menu button[data-action="delete-definition"],
    .crm-deals-shell .deal-custom-file button[data-action="delete-file"],
    #contactDetailOverlay .deal-custom-file button[data-action="delete-file"],
    form.inline-form .btn-danger
) {
    border-color:#D2E8DB !important;
    background:#F7FCF9 !important;
    color:#B83A48 !important;
    box-shadow:none !important;
    transform:none !important;
    transition:background .18s ease,border-color .18s ease,color .18s ease !important;
}
body.e1-app-page :is(
    .contacts-delete-selected,
    .crm-task-delete-button,
    .crm-section-action-delete,
    .company-comment-delete,
    .company-danger-button,
    .company-menu-danger,
    .crm-feed-delete,
    .crm-task-notify-delete-all,
    .stage-context-menu .stage-menu-delete,
    .deal-custom-menu-delete,
    .deal-file-menu .deal-file-menu-delete,
    .crm-deals-shell .deal-custom-menu button[data-action="delete-definition"],
    .crm-deals-shell .crm-field-definition-menu button[data-action="delete-definition"],
    #contactDetailOverlay .deal-custom-menu button[data-action="delete-definition"],
    #contactDetailOverlay .crm-field-definition-menu button[data-action="delete-definition"],
    .crm-deals-shell .deal-custom-file button[data-action="delete-file"],
    #contactDetailOverlay .deal-custom-file button[data-action="delete-file"],
    form.inline-form .btn-danger
):hover:not(:disabled) {
    border-color:#B83A48 !important;
    background:#B83A48 !important;
    color:#FFFFFF !important;
    box-shadow:none !important;
    transform:none !important;
}
body.e1-app-page :is(
    .crm-feed-delete,
    .stage-context-menu .stage-menu-delete,
    .deal-file-menu .deal-file-menu-delete,
    .crm-deals-shell .deal-custom-menu button[data-action="delete-definition"],
    .crm-deals-shell .crm-field-definition-menu button[data-action="delete-definition"],
    .crm-deals-shell .deal-custom-file button[data-action="delete-file"],
    #contactDetailOverlay .deal-custom-menu button[data-action="delete-definition"],
    #contactDetailOverlay .crm-field-definition-menu button[data-action="delete-definition"],
    #contactDetailOverlay .deal-custom-file button[data-action="delete-file"]
):hover:not(:disabled) img {
    filter:brightness(0) invert(1) !important;
}
body.e1-app-page :is(
    .contacts-delete-selected,
    .crm-task-delete-button,
    .crm-section-action-delete,
    .company-comment-delete,
    .company-danger-button,
    .company-menu-danger,
    .crm-feed-delete,
    .crm-task-notify-delete-all,
    .stage-context-menu .stage-menu-delete,
    .deal-custom-menu-delete,
    .deal-file-menu .deal-file-menu-delete,
    .crm-deals-shell .deal-custom-menu button[data-action="delete-definition"],
    .crm-deals-shell .crm-field-definition-menu button[data-action="delete-definition"],
    #contactDetailOverlay .deal-custom-menu button[data-action="delete-definition"],
    #contactDetailOverlay .crm-field-definition-menu button[data-action="delete-definition"],
    .crm-deals-shell .deal-custom-file button[data-action="delete-file"],
    #contactDetailOverlay .deal-custom-file button[data-action="delete-file"],
    form.inline-form .btn-danger
):focus-visible {
    outline:2px solid #B83A48 !important;
    outline-offset:2px !important;
}
