/* 17.93 — Modalità coerenti per modal server, JS e bulk (struttura Bootstrap).
   Stessa base visiva; le varianti cambiano solo dimensioni e contenuto. */
body .modal .modal-content {
  border:1px solid #dce4f2;
  border-radius:16px!important;
  background:#fff;
  box-shadow:0 22px 60px rgba(17,39,80,.20);
}
body .modal .modal-header {
  min-height:60px;
  padding:14px 20px!important;
  margin:0!important;
  color:#213e86!important;
  background:#f5f8ff!important;
  border:0!important;
  border-bottom:1px solid #dfe7f4!important;
}
body .modal .modal-header .solid-border {
  border:0!important;
  margin:0!important;
  padding:0!important;
  min-height:32px;
}
body .modal .modal-header .modal-title {font-size:1.08rem;line-height:1.3;font-weight:800;}
body .modal .modal-body {padding:20px!important;min-width:0;}
body .modal .modal-footer {
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  align-items:center;
  gap:8px;
  min-height:62px;
  padding:12px 20px!important;
  background:#f8faff!important;
  border:0!important;
  border-top:1px solid #dfe7f4!important;
  margin:0!important;
}
/* Do not enlarge the close glyph to the size of a form action button. */
body .modal .modal-header .btn-close,
body .modal .modal-header button.close:not(.btn-close) {
  box-sizing:border-box;
  flex:0 0 36px!important;
  width:36px!important;height:36px!important;
  min-width:36px!important;min-height:36px!important;
  padding:0!important;margin:0 0 0 auto!important;
  border:1px solid #d6deef!important;
  border-radius:10px!important;
  background-color:#fff;
  opacity:1!important;
}
body .modal .modal-header .btn-close {
  background-size:13px 13px!important;
  background-position:center!important;
  background-repeat:no-repeat!important;
}
body .modal .modal-header button.close:not(.btn-close){font-size:23px!important;line-height:1!important;}
body .modal .modal-footer .btn {
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  min-height:40px;padding:8px 15px;
  border-radius:10px!important;font-size:.94rem;font-weight:700;line-height:1.25;
}
body .modal .modal-footer .btn i.bi {font-size:1rem!important;line-height:1;}
/* Neutral exit, positive save/clone/approve; preserve danger for destructive actions. */
body .modal .modal-footer .modal-btn-close:not(.btn-danger),
body .modal .modal-footer .btn[data-bs-dismiss="modal"]:not(.btn-danger):not(.btn-primary) {
  color:#445571!important;background:#fff!important;border:1px solid #cbd6e7!important;
}
body .modal .modal-footer :is(.modal-btn-save,.modal-btn-clone,.modal-btn-approve,.modal-btn-print) {
  color:#fff!important;background:#16875b!important;border-color:#16875b!important;
}
body .modal .modal-footer :is(.modal-btn-save,.modal-btn-clone,.modal-btn-approve,.modal-btn-print):hover {
  background:#116d49!important;border-color:#116d49!important;
}
@media(max-width:575.98px){
  body .modal .modal-header{padding:12px 15px!important;}
  body .modal .modal-body{padding:15px!important;}
  body .modal .modal-footer{padding:10px 15px!important;}
}

/* Livescore modal system – shared shell + compact calendar fixture (patch 11).
   Opt-in shell avoids layout changes to legacy modal behaviours. */
body .live-standard-modal .modal-content{border-radius:18px!important;overflow:hidden;box-shadow:0 20px 64px rgba(19,47,88,.24)}
body .live-standard-modal .modal-header{display:flex!important;align-items:center;gap:10px;flex-wrap:nowrap;background:#fff!important;color:#094fa3!important;border-bottom:1px solid #dce5f2!important;min-height:64px}
.live-modal-heading{display:flex;align-items:center;gap:10px;min-width:0;flex:1}
.live-modal-heading .modal-title{margin:0;overflow-wrap:anywhere}
.live-modal-icon{width:36px;height:36px;display:grid;place-items:center;background:#eaf1fb;color:#094fa3;border-radius:10px;flex:none;font-size:1.1rem}
body .live-standard-modal .modal-header .modal-header-actions{margin:0!important;padding:0!important;flex:none}
body .live-standard-modal .modal-header .btn-close{margin:0!important;flex-shrink:0!important}
body .live-standard-modal .modal-header .dropdown-toggle{color:#094fa3!important;border:1px solid #b8cce7!important;background:#fff!important;border-radius:9px!important;min-height:36px;font-weight:500!important}
body .live-standard-modal .modal-body{background:#f4f7fb;color:#24364f}
body .live-standard-modal .modal-footer{background:#fff!important;border-color:#dce5f2!important;gap:8px}
body .live-standard-modal .modal-footer .btn{font-weight:600!important;font-size:13px;min-height:38px;padding:8px 13px;border-radius:9px!important;margin:0}
body .live-standard-modal .modal-footer .btn-primary,body .live-standard-modal .modal-footer .modal-btn-save{color:#fff!important;background:#094fa3!important;border-color:#094fa3!important}
body .live-standard-modal .modal-footer .btn-primary:hover,body .live-standard-modal .modal-footer .modal-btn-save:hover{background:#073e82!important;border-color:#073e82!important}
body .live-standard-modal .modal-footer .modal-btn-print{color:#094fa3!important;background:#fff!important;border:1px solid #b8cce7!important}
body .live-standard-modal .modal-footer .modal-btn-print:hover{background:#edf4fe!important}
body .live-standard-modal .modal-footer .btn:disabled{opacity:.55}
body .live-event-modal .modal-dialog{max-width:min(760px,calc(100vw - 24px))}
body .live-event-modal .modal-footer #goToMatch{background:#094fa3!important;color:#fff!important;font-weight:600!important;border-radius:9px!important;text-decoration:none}
.live-event-hero,.live-modal-game-hero{background:linear-gradient(125deg,#073c80,#094fa3);color:#fff!important;border-radius:14px;padding:18px 20px;box-shadow:0 5px 18px rgba(9,79,163,.12)}
.live-event-sport,.live-modal-game-hero .game-form-hero-sport{color:#ffb66f!important;text-transform:uppercase;font-size:12px;font-weight:700;letter-spacing:.065em;opacity:1!important}
.live-event-hero .live-event-number{color:#fff!important;font-size:clamp(18px,3vw,24px);line-height:1.25;font-weight:750;margin:4px 0 2px}
.live-event-hero .live-event-project{color:#dbe8fa!important;font-size:13px;margin:0;line-height:1.4}
.live-event-fixture{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:12px;align-items:center;text-align:center;margin:20px 0 12px}
.live-event-team{display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0}
.live-event-team strong{color:#fff!important;line-height:1.25;font-size:14px;font-weight:650;overflow-wrap:anywhere}
.live-event-team__logo{width:58px;height:58px;display:grid;place-items:center;background:#fff;border-radius:12px;position:relative;overflow:hidden;color:#94a9c8;font-size:26px;flex:none}
.live-event-team__logo img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;padding:4px;background:#fff}
.live-event-scores{display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:nowrap;min-width:0;max-width:100%}
.live-event-score{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:6px 8px;min-width:0;min-height:42px;white-space:nowrap;border-radius:8px;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.24);color:#fff;font-variant-numeric:tabular-nums;font-size:14px;line-height:1.1}
.live-event-score.is-final{background:#fff;color:#094fa3;border-color:#fff;font-size:22px;font-weight:750}
.live-event-score small{font-size:10px;letter-spacing:.04em;opacity:.85;margin-top:4px}
.live-event-partials{display:flex;flex-wrap:wrap;gap:5px;justify-content:center;margin:8px 0 12px}
.live-event-partial{background:#e5efff;color:#17447e;border-radius:6px;padding:4px 8px;font-size:12px;font-weight:650;font-variant-numeric:tabular-nums;white-space:nowrap}
.live-event-details{display:flex;align-items:center;flex-wrap:wrap;gap:8px 14px;padding-top:12px;border-top:1px solid rgba(255,255,255,.24);font-size:13px;color:#fff}
.live-event-details>span{display:inline-flex;align-items:center;gap:5px;line-height:1.35}
.live-event-state{margin-left:auto;border-radius:7px;padding:5px 8px;font-size:12px;font-weight:650;white-space:nowrap}
.live-event-state.is-final{background:#e5f5eb;color:#167047}.live-event-state.is-unofficial{background:#fff0e5;color:#934811}.live-event-state.is-pending{background:#eaf1fc;color:#3c587f}
.live-event-address{color:#dbe8fa;font-size:12px;margin-top:6px}
@media(max-width:575.98px){
 .live-event-hero,.live-modal-game-hero{padding:13px 12px}
 .live-event-fixture{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;margin-top:14px}
 .live-event-team{grid-row:1}.live-event-team:last-child{grid-column:2}
 .live-event-scores{grid-row:2;grid-column:1/-1;overflow-x:auto;justify-content:center}
 .live-event-score{padding:6px;font-size:13px}.live-event-score.is-final{font-size:19px}
 .live-event-team__logo{width:46px;height:46px}.live-event-team strong{font-size:13px}
 .live-event-state{margin-left:0}
 body .live-standard-modal .modal-header{gap:7px} .live-modal-icon{width:30px;height:30px}
}
body .live-standard-modal .modal-fullscreen .modal-content{border-radius:0!important}
body #eventModal.live-event-modal .modal-dialog{max-width:min(760px,calc(100vw - 24px))}
body #eventModal.live-event-modal .modal-title{color:#094fa3!important;font-size:1.08rem;letter-spacing:0}
body #eventModal.live-event-modal .modal-content{border-radius:18px!important}
.live-event-scores{align-items:stretch}

/* All standard action lists, including DataTables menus portalled to body.
   Use borders on visible rows, not generated clickable items. */
html body .dropdown-menu:has(>li>.dropdown-item):not(.live-profile-menu,.live-notifications__menu,.notifications,.profile) > li > .dropdown-item,
html body .dropdown-menu.live-dropdown-screen-menu .dropdown-item,
html body .live-entity-action-list .dropdown-item{
  font-weight:400!important;font-size:13px;line-height:1.35;border-radius:5px;white-space:normal;
}
html body .dropdown-menu:has(>li>.dropdown-item):not(.live-profile-menu,.live-notifications__menu,.notifications,.profile) > li:not(.d-none):has(>.dropdown-item) ~ li:not(.d-none):has(>.dropdown-item){border-top:1px solid #e5eaf1;}
html body .dropdown-menu:has(>li>.dropdown-item):not(.live-profile-menu,.live-notifications__menu,.notifications,.profile) > li:has(>hr.dropdown-divider){display:none!important;}
html body .dropdown-menu:has(>li>.dropdown-item):not(.live-profile-menu,.live-notifications__menu,.notifications,.profile) > li > .dropdown-item{padding:9px 12px;}

html body .dropdown-menu.live-action-menu{background:#fff;border:1px solid #dce5f2;border-radius:10px;padding:4px;min-width:195px;box-shadow:0 12px 30px rgba(18,43,81,.18)}

/* Header condiviso per i modal gara; l'anteprima ha dimensioni ridotte. */
body .live-standard-modal .modal-header{padding:12px 22px!important;min-height:68px;border-bottom:1px solid #d4dfed!important;background:#fff!important;box-shadow:0 2px 7px rgba(19,47,88,.04)}
.live-standard-modal .live-edit-heading{gap:12px}
.live-standard-modal .live-edit-heading .live-modal-icon{width:42px;height:42px;background:#094fa3;color:#fff;border-radius:11px;font-size:19px}
.live-standard-modal .live-edit-heading__text{min-width:0;border-left:1px solid #d4dfed;padding-left:12px}
.live-standard-modal .live-edit-heading__eyebrow{font-size:10px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:#a64b06;line-height:1.2;margin-bottom:3px}
body .live-standard-modal .live-edit-heading .modal-title{font-size:19px!important;line-height:1.2;color:#173d72!important;font-weight:700!important}
body #eventModal.live-event-modal .modal-header.live-event-compact-header{position:relative;z-index:3;padding:11px 16px!important;min-height:56px;gap:8px}
#eventModal .live-edit-heading{gap:8px}
#eventModal .live-edit-heading .live-modal-icon{width:34px;height:34px;font-size:16px;border-radius:8px}
#eventModal .live-edit-heading__text{padding-left:8px}
body #eventModal.live-event-modal .live-edit-heading .modal-title{font-size:15px!important;margin:0}
body #eventModal.live-event-modal .modal-header .dropdown-toggle{min-height:28px!important;padding:4px 8px!important;font-size:12px!important;line-height:1.25;border-radius:7px!important}
body #eventModal.live-event-modal .modal-header .btn-close{flex:0 0 28px!important;width:28px!important;height:28px!important;min-width:28px!important;min-height:28px!important;background-size:10px 10px!important;border-radius:7px!important}
body #eventModal.live-event-modal .modal-body{padding:18px 20px 16px!important;color:#24364f!important;background:#fff!important}
#eventModal .live-event-hero{background:none!important;box-shadow:none!important;border-radius:0;padding:0!important;display:block}
#eventModal .live-event-heading{border-bottom:1px solid #e0e8f1;padding-bottom:12px;overflow-wrap:anywhere}
#eventModal .live-event-sport{font-size:11px;letter-spacing:.055em;color:#a64b06!important}
#eventModal .live-event-number{font-size:17px!important;font-weight:650;line-height:1.25;margin:3px 0 2px;color:#173d72!important}
#eventModal .live-event-project{font-size:12px;line-height:1.35;color:#52657e!important;margin:0}
#eventModal .live-event-address{color:#52657e!important}
#eventModal .live-event-hero{color:#24364f!important}
#eventModal .live-event-team strong{color:#173d72!important}
#eventModal .live-event-team__logo{border:1px solid #e0e8f1;background:#fff;color:#8195b0}
#eventModal .live-event-score{background:#f0f5fc;border-color:#dce5f2;color:#173d72}
#eventModal .live-event-score.is-final{background:#094fa3;border-color:#094fa3;color:#fff}
#eventModal .live-event-partial{background:#f0f5fc;color:#17447e;border:1px solid #dce5f2}
#eventModal .live-event-details{border-color:#e0e8f1;color:#344965}
#eventModal .live-event-details>span:not(.live-event-state)>i{color:#094fa3}
@media(max-width:575.98px){
 body .live-standard-modal .modal-header{padding:10px 13px!important;min-height:60px}
 .live-standard-modal .live-edit-heading .live-modal-icon{width:36px;height:36px}
 body .live-standard-modal .live-edit-heading .modal-title{font-size:17px!important}
 body #eventModal.live-event-modal .modal-header.live-event-compact-header{padding:10px 12px!important;gap:6px}
 body #eventModal.live-event-modal .modal-body{padding:13px 12px!important}
 #eventModal .live-event-number{font-size:15px!important}
}
/* Footer globale: azioni raccolte a destra, uscita a sinistra del gruppo.
   Non forzare display per rispettare loader, permessi e workflow. */
html body .modal .modal-footer{justify-content:flex-end!important;align-items:center;flex-wrap:wrap}
html body .modal .modal-footer > :is(.btn,button,a.btn,.btn-group){flex:0 0 auto!important;margin-left:0!important;margin-right:0!important;margin-inline:0!important}
html body .modal .modal-footer > :is(.modal-btn-close,[data-bs-dismiss="modal"].btn-secondary,[data-bs-dismiss="modal"].btn-outline-secondary){order:-1!important}

/* Shared modal shell: preserve approval/danger semantics and native visibility. */
body .live-standard-modal .modal-footer :is(.modal-btn-save,.modal-btn-clone){color:#fff!important;background:#094fa3!important;border-color:#094fa3!important}
body .live-standard-modal .modal-footer :is(.modal-btn-save,.modal-btn-clone):hover{background:#073e82!important;border-color:#073e82!important}
body .live-standard-modal .modal-footer .modal-btn-approve{color:#fff!important;background:#16875b!important;border-color:#16875b!important}
body .live-standard-modal .modal-footer .modal-btn-approve:hover{background:#116d49!important;border-color:#116d49!important}
body .live-standard-modal .modal-footer .modal-btn-print:hover{color:#094fa3!important;background:#edf4fe!important;border-color:#b8cce7!important}
body .live-standard-modal:not(.live-event-modal) .modal-content{overflow:visible}
body .live-standard-modal:not(.live-event-modal) .modal-dialog-scrollable .modal-content{overflow:hidden}
body .live-standard-modal .modal-header>.live-modal-heading{flex:1;min-width:0}
body .live-standard-modal .modal-header .live-edit-heading__text{overflow-wrap:anywhere}


/* Patch 16 – confirmation dialogs: same compact heading as the event preview,
   white content, scoped semantic actions. No global modal or form changes. */
body .live-confirm-modal .modal-dialog{max-width:min(560px,calc(100vw - 24px));margin:clamp(12px,3vh,28px) auto!important;min-height:0!important;align-items:flex-start!important}
body .live-confirm-modal .modal-dialog-scrollable{height:calc(100% - 2 * clamp(12px,3vh,28px))!important}
body .live-confirm-modal .modal-dialog-centered::before{display:none!important}
body .live-confirm-modal .modal-content{overflow:hidden;border:1px solid #dce5f2;background:#fff}
body .live-confirm-modal .modal-header{padding:11px 16px!important;min-height:56px;gap:8px;box-shadow:none}
body .live-confirm-modal .live-edit-heading{gap:8px}
body .live-confirm-modal .live-edit-heading .live-modal-icon{width:34px;height:34px;flex:0 0 34px;font-size:16px;border-radius:8px}
body .live-confirm-modal .live-edit-heading__text{padding-left:8px}
body .live-confirm-modal .live-edit-heading .modal-title{font-size:15px!important;line-height:1.25;margin:0}
body .live-confirm-modal .modal-header .btn-close{flex:0 0 28px!important;width:28px!important;height:28px!important;min-width:28px!important;min-height:28px!important;background-size:10px 10px!important;border-radius:7px!important}
body .live-confirm-modal .modal-body{background:#fff!important;color:#24364f;padding:18px 20px!important;overflow-wrap:anywhere}
body .live-confirm-modal .modal-body > :last-child{margin-bottom:0}
body .live-confirm-modal .modal-body .alert{border-radius:9px}
body .live-confirm-modal .modal-footer{padding:10px 16px!important}
body .live-confirm-modal .modal-footer .btn{font-size:13px!important;min-height:36px;padding:7px 12px;white-space:normal}
/* Negative/affirmative meaning, independent of the destructive action itself.
   CSS icons survive dynamic .text() / .html() label updates without changing handlers. */
html body .live-confirm-modal .modal-footer > .btn{--live-confirm-color:#16875b;--live-confirm-hover:#116d49;--live-confirm-icon-rotation:0deg;color:#fff!important;background:var(--live-confirm-color)!important;border-color:var(--live-confirm-color)!important}
html body .live-confirm-modal .modal-footer > .btn:is(.modal-btn-close,[data-bs-dismiss="modal"],#btnSkipGoldenSet,#existing-obj-reject,#delete-obj-reject){--live-confirm-color:#c32f3d;--live-confirm-hover:#a82532;--live-confirm-icon-rotation:180deg;color:#fff!important;background:var(--live-confirm-color)!important;border-color:var(--live-confirm-color)!important;order:-1!important}
html body .live-confirm-modal .modal-footer > .btn:hover:not(:disabled),html body .live-confirm-modal .modal-footer > .btn:is(.modal-btn-close,[data-bs-dismiss="modal"],#btnSkipGoldenSet,#existing-obj-reject,#delete-obj-reject):hover:not(:disabled){background:var(--live-confirm-hover)!important;border-color:var(--live-confirm-hover)!important}
html body .live-confirm-modal .modal-footer > .btn > i.bi{display:none!important}
html body .live-confirm-modal .modal-footer > .btn::before{content:"";display:inline-block;flex:0 0 16px;width:16px;height:16px;background:currentColor;transform:rotate(var(--live-confirm-icon-rotation));mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10v12M15 5.9 14 10h5.8a2 2 0 0 1 1.95 2.48l-1.9 8A2 2 0 0 1 17.9 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.8a2 2 0 0 0 1.8-1.1L12 2a3.4 3.4 0 0 1 3 3.9Z'/%3E%3C/svg%3E") center/contain no-repeat}
@media(max-width:575.98px){
 body .live-confirm-modal .modal-header{padding:10px 12px!important;gap:6px}
 body .live-confirm-modal .modal-body{padding:14px 12px!important}
 body .live-confirm-modal .modal-footer{padding:10px 12px!important}
}

