/* ============================== */
/*    Assistant IA Panel          */
/* ============================== */
:root {
    --Brain-Degraded : linear-gradient(99deg, #FF6450 -1.03%, #FF95B7 29%, #4D56D1 65.19%, #63E0DD 97.81%);  
    --Spacing-S-20 : 25px;
    --ia-primary: #3D64ED;
    --ia-primary-light: #3D64ED1A;
    --ia-primary-hover: #2B4FD4;
    --ia-primary-soft: #EEF1FD;

    --ia-bg: #FFFFFF;
    --ia-bg-subtle: #F7F8FA;
    --ia-border: #E4E7EC;
    --ia-border-light: #F0F1F4;
    --ia-text-primary: #1A1D26;
    --ia-text-secondary: #6B7280;
    --ia-text-muted: #9CA3AF;

    --ia-star-color: #F59E0B;

    --ia-space-xs: 4px;
    --ia-space-sm: 8px;
    --ia-space-md: 12px;
    --ia-space-lg: 16px;
    --ia-space-xl: 20px;
    --ia-space-2xl: 24px;

    --ia-radius-sm: 6px;
    --ia-radius-md: 8px;
    --ia-radius-lg: 12px;
    --ia-radius-xl: 16px;

    --ia-transition-fast: 150ms ease;
    --ia-transition-normal: 250ms ease;
    --ia-transition-smooth: 300ms cubic-bezier(0.4, 0, 0.2, 1);

    --ia-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --ia-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --ia-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --ia-shadow-dropdown: 0 10px 40px rgba(61, 100, 237, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);

}

.ia-assistant-right-panel {
  width: 0%;
  height: 100%;
  border-left: 1px solid #e0e0e0;
  box-shadow: -1px 0 4px rgba(0, 0, 0, 0.04);
  background-color: white;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0%;
  transition: flex-basis 0.3s ease;
}

.ia-assistant-header-container {
	position: relative;
	padding: 10px 20px;
	font-weight: bold;
	font-size: 14px;
	min-height: 25px;
}

.ia-assistant-footer {
	display: flex;
	padding: 5px 5px;
	border-top: 1px solid #eee;
	width: 83%;
	left: 8px;
    top: calc(100vh - 162px) !important;
    .x-box-inner{
        height: 124px !important;
    }
}


.ia-assistant-collapsed {
  width: 0 !important;
  padding: 0 !important;
  border: none;
  overflow: hidden;
}

.ia-assistant-importbtn {
	display: flex;
	padding: 0px var(--Spacing-S-12, 12px);
	align-items: center;
	gap: 4px;
	border-radius: 8px;
	border: 1px solid var(--Primary-Primary-80, #304287) !important;
	background: var(--Neutral-Neutral-00, #FFF);
	color: var(--Primary-Primary-80, #304287);
	font-family: 'Inter', sans-serif;
	font-size: 14px;
	font-style: normal;
	font-weight: 700;
	line-height: 20px; /* 142.857% */
}

.ia-assistant-resizer {
	width: 5px;
	cursor: col-resize;
	background: #ccc;
}


.ia-assistant-panel-wrapper {
	display: flex;
	padding: 10px; 
	height: 100%;
	flex-direction: column;
	background: white;
	font-family: 'Inter', sans-serif;
}

.ia-assistant-panel-wrapper .x-box-inner {
	/*    width: 90%; */
	/*    height: 40%; */
	overflow: visible !important;
}

.ia-assistant-footer .x-box-inner {
	border: solid 1px;
	border-radius: 5px;
}

.ia-assistant-footer .ia-assistant-inputarea {
	padding: 2px 2px 2px 2px;
	width: 100% !important;
	height: 70% !important;
}

.ia-assistant-footer .ls-assist-ia-importbtn-container {
	padding-left: 8px;
	top: 60% !important;
	width: 98% !important;
	height: 30% !important;
	display: flex;       
	justify-content: space-between;
	align-items: center; 
}

.ia-assistant-footer .ia-assistant-inputarea > textarea {
	width: 95% !important;
	border: none;
	outline: none;
}

.ia-assistant-header-title {
	color: #222;
}

.ia-assistant-header-bar {
	height: 3px;
	background: linear-gradient(to right, #ec4899, #8b5cf6, #06b6d4);
	border-radius: 2px;
	margin-top: 5px;
}

.ia-assistant-right-panel .ia-assistant-dragndroparea {
	width: 100%;
	height: 100% ;
/* 	top: 5px !important; */
/* 	left: 0px !important; */
	position: absolute !important;
	z-index: 9998; 
    background-color: rgba(0, 0, 255, 0.1);
}

.ia-assistant-footer .ia-assistant-info-message { 
	position: absolute !important;
	top: 20px;
	left: 50%;
	transform: translateX(-50%);
	background-color: #2f5bea;
	color: white;
	padding: 8px 16px;
	border-radius: 8px;
	font-weight: bold;
	text-align: center;
	margin: 0 auto;
	z-index: 9999;
	box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.3);
	animation: fadeOut 3s forwards;
}

.disclaimer-panel {
    position: relative;
    text-align: center;
    font-family: Inter, sans-serif;
    font-size: 11px;
    font-style: normal;
    font-weight: normal;
    height: 20px;
    margin-top: -5px !important;
}

@keyframes fadeOut {
    0% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; display: none; }
}

.ia-assistant-HoveredBackgroundStyle {
	 background-color: #3D64ED33;
}

.ia-assistant-scenario-header {
    padding: 10px;
    width: 100%;
    flex: 0 0 auto !important;
}

.ia-assistant-body-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  height: 100%;
  width: 100%;
  overflow-y: auto;
   flex: 1 1 auto; 
  overflow: auto;
}



/* When header has dropdown, adjust body top - using !important to override inline style */
.ia-assistant-header-v2.ia-header-with-dropdown ~ .ia-assistant-body-scrollpanel,
.ia-header-with-dropdown + .ia-assistant-body-scrollpanel {
  top: 124px !important;
}

.ai-wrapped-field-with-submit table,
.ai-wrapped-field-with-submit table tbody,
.ai-wrapped-field-with-submit table tr {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    width: 100% !important;
    gap: 8px !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    padding-right: 6px !important;
}

.ai-wrapped-field-with-submit td {
    display: flex !important;
    flex-direction: row !important;
    padding: 0 !important;
    margin: 0 !important;
}

.ai-wrapped-field-with-submit td:not(:last-child) {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.ai-wrapped-field-with-submit td:last-child {
    flex: 0 0 32px !important;
    width: 32px !important;
    max-width: 32px !important;
}

.ai-wrapped-field-with-submit .ai-wrapped-submit-button {
    width: 32px !important;
    height: 32px !important;
    flex: 0 0 32px !important;
}

.ai-wrapped-field-with-submit .ai-wrapped-submit-button,
.ai-wrapped-field-with-submit .ai-wrapped-submit-button button {
    position: static !important;
    left: auto !important;
    bottom: auto !important;
    margin: 0 !important;
}

.ai-wrapped-field-with-submit.checkbox-with-submit table {
    align-items: center !important;
}

.ai-wrapped-field-with-submit.combo-with-submit table,
.ai-wrapped-field-with-submit.date-with-submit table,
.ai-wrapped-field-with-submit.number-with-submit table {
    align-items: center !important;
}

.ai-wrapped-field-with-submit.textarea-with-submit table {
    align-items: flex-end !important;
}

.ai-wrapped-submit-button button {
    background-color: transparent !important;
    background-image: url(/gxt/themes/legalsuite/images/legalsuite/button/send-red-icon.png);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 80%;
    padding: 0px;
    border: none;
    width: 100%;
    height: 100%;
}

.ia-assistant-preconfigured-question-section {
    display: block;
}

.ia-assistant-preconfigured-question-wrapper {
    width: 90%;
    background: #DCE4FD;
    color: #000;
    padding: 8px 12px;
	word-wrap: break-word;
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
    display: flex;
	border-radius: 4px;
    margin: 10px 0px !important;
	&:last-child {
        margin-bottom: 0px!important;
	}
    .ia-assistant-preconfigured-order {
        width: 26px;
        height: 26px;
        border: solid 2px #3CA7A2;
        color: #3CA7A2;
        text-align: center;
        align-self: center;
        p {
            margin-top: 3px;
            height: 14px;
            font-size: 16px;
            font-weight: bold;
            vertical-align: middle;
        }
    }
    .ia-assistant-preconfigured-question {
        width: calc(100% - 41px);
        margin-left: 8px;
    }
}

.ia-assistant-message-user, 
.ia-assistant-message-bot {
	color: #000;
	max-width: 75%;
	padding: 8px 12px;
	word-wrap: break-word;
	font-size: 14px;
	font-style: normal;
	font-weight: 500;
	line-height: 20px;
	border-radius: 8px;
	font-family: 'Inter', sans-serif;
	p {
	    font-size: 14px;
    	font-style: normal;
    	font-weight: 500;
        font-family: 'Inter', sans-serif;
	}
}

.ia-assistant-message-user {
  align-self: flex-end;
  clear: both;
  margin: 4px 14px 4px 50px;
  background: #DCE4FD;
}

.ia-assistant-message-bot {
  align-self: flex-start;
}

.ia-assistant-message-user-wrapper,
.ia-assistant-message-bot-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.ia-assistant-message-user-wrapper {
  align-items: flex-end;
}

.ia-assistant-message-bot-wrapper {
  align-items: flex-start;
  position: relative;
}

.ia-assistant-message-toolbar {
  display: none; /* hidden by default */
  gap: 8px;
  margin-top: 4px;
  padding-left: 8px;
}

.ia-assistant-message-bot-wrapper:hover .ia-assistant-message-toolbar {
  display: flex;
}

.ia-assistant-toolbar-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ia-assistant-toolbar-btn:hover {
  background: #f0f0f0;
}

.ia-assistant-toolbar-btn img {
  width: 16px;
  height: 16px;
  display: block;
}

.ia-assistant-action-button,
.ia-assistant-suggestion-button {
	display: flex;
	padding: 4px 8px;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 2px;
	border-radius: 4px;
	/* 	border: 1px solid var(--Brain-Degraded, #FF6450); */
	border: 1px solid;
	border-image: var(--Brain-Degraded) 1;
}

.ia-assistant-suggestion-button {
	align-self: flex-end;
	clear: both;
	margin: 4px 14px 4px 50px;
	border-radius: 8px;
}

.ia-assistant-suggestion-box {
    margin-top: 10px;
}

.ia-assistant-actions-header {
	color: #000;
	font-family: 'Inter', sans-serif;
	font-size: 14px;
	font-style: normal;
	font-weight: 500;
	line-height: 20px;
}

.ia-assistant-section-title {
	display: flex;
	align-items: center;
	gap: 8px;
}

.ia-assistant-section-title img {
    width: 24px;
    height: 24px;
    display: block;  
    object-fit: contain; 
}

.ia-assistant-action-selected {
	min-height: 30px;
	width: 180px;
	color: white;
	display: flex;
	padding: 4px 8px;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 2px;
	border-radius: 4px;
	/* 	border: 1px solid; */
	/* 	border-image: var(--Brain-Degraded) 1; */
	background: var(--Brain-Degraded, linear-gradient(99deg, #FF6450 -1.03%, #FF95B7 29%
		, #4D56D1 65.19%, #63E0DD 97.81%));
	font-family: 'Inter', sans-serif;
	font-size: 14px;
	font-style: normal;
	font-weight: 700;
	line-height: 20px;
}

.ia-assistant-change-button {
	color: #304287;
	font-family: 'Inter', sans-serif;
	font-size: 12px;
	font-style: normal;
	font-weight: 700;
	line-height: 18px; /* 150% */
}

.ia-assistant-quickaction-section {
	border-radius: 2px;
	border-bottom: 1px solid  #96ACF9;
	align-items: flex-start;
	flex-direction: column;
	gap: 8px;
}


.ia-assistant-scenario-header-row {
	padding-left: 32px;
	align-items: center;
	gap: 30px;
}

.ia-assistant-quickaction-section,
.ia-assistant-scenario-header-row {
	display: flex;
	min-width: 200px;
	padding: 16px 8px;
	align-self: stretch;
}

.ia-assistant-question {
    margin-bottom: 5px;
}

.ia-assistant-body-main {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

.ia-assistant-welcome {
	display: flex;
	padding: 8px 4px;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	gap: 2px;
	align-self: stretch;
}

.ia-assistant-welcome-title {
	color: #000;
	font-family: 'Inter', sans-serif;
	font-size: 16px;
	font-style: normal;
	font-weight: 700;
	line-height: 24px; /* 150% */
}

.ia-assistant-welcome-message {
	color: #000;
	font-family: 'Inter', sans-serif;
	font-size: 14px;
	font-style: normal;
	font-weight: 500;
	line-height: 20px; /* 142.857% */
}

.ia-assistant-actions-change-selection {
	color: #304287;
	font-family: 'Inter', sans-serif;
	font-size: 12px;
	font-style: normal;
	font-weight: 700;
	line-height: 18px; 
}

.ia-assistant-display-visio-btn {
    display: inline-flex;
    padding: 8px 175px;
    justify-content: center;
    align-items: center;
    gap: 4px;
    border-radius: 8px;
    background: var(--Primary-Primary-80, #304287) !important;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: background-color 0.2s ease;
    width: auto;       
    max-width: fit-content;
    
}

.ia-assistant-display-visio-btn:hover {
    background: var(--Primary-Primary-90, #3d52a0);
}

.ia-assistant-button-icon {
    width: 20px;
    height: 20px;
    display: block;
    flex-shrink: 0;
}

.ia-assistant-button-label {
    color: white;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.ia-assistant-btn-disabled {
    background: var(--Primary-Primary-40, #b0b7d8);
    cursor: not-allowed;
    opacity: 0.6;
}

.ia-assistant-btn-disabled:hover {
    background: var(--Primary-Primary-40, #b0b7d8);
}


.uploaded-file-tag {
    background-color: #eeeeee;
    border-radius: 12px;
    padding: 6px 12px;
    margin: 5px 5px;
    width: 90%;
    display: flex;
    align-items: center;
}

.file-badge {
	background-color: #e14b4b;
    color: white;
    font-weight: bold;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 6px;
    margin-right: 8px;
}

.file-name {
	color: #000; 
    font-weight: normal;
	margin-right: 8px;
	font-family: 'Inter', sans-serif;
	font-size: 14px;
	font-style: normal;
	line-height: 20px;
	text-decoration: none;
	overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-name:hover {
   font-weight: bold;
}

.file-close-button {
    cursor: pointer;
    color: #888;
    font-weight: bold;
}

.file-close-button:hover {
    color: #e14b4b;
}

.file-left {
    display: flex;
    align-items: center;
    overflow: hidden;
}

.rive-brain-container {
  width: 150px;
  height: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border-radius: 75px;
  background-color: transparent !important;
  position: relative;
}

.rive-brain-canvas {
  width: 150px;
  height: 150px;
  border-radius: 75px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  background-color: transparent !important;
}

.animation-overlay-style {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  width: 150px;
  height: 150px;
  transform: translate(-50%, -50%);
  background-color: transparent !important;
  z-index: 10000;
  justify-content: center;
  align-items: center;
}


.ls-wizard-toolbar {
  display: flex;
  justify-content: space-between; 
  align-items: center;
  padding: 0 16px;
}

.preview-cancel-btn {
  display: inline-flex;
  justify-content: left;
  align-items: left;
  height: 30px;
  padding: 0; 
  background-color: white;
  line-height: 0;
}

.preview-cancel-btn button {
  all: unset;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  border: 1px solid rgba(48, 66, 135, 1) !important;
  background-color: white;
  border-radius: 8px;
  width: fit-content;               
  line-height: 0;     
  padding: 0;
  width: 80% !important;
  margin-top: 2px;
  color: rgba(48, 66, 135, 1) !important;
}

.preview-cancel-btn button span {
  line-height: 1;
}

.ai-preview-download-btn {
  display: flex;              
  justify-content: flex-end; 
  align-items: center;  
  padding: 1px 1px 1px 1px;
}

.ai-preview-download-btn button{
  	width: 80% !important;
	height: 100% !important; 
	padding : 0px 0px 0px 0px;
	background-color: rgba(48, 66, 135, 1) !important;
	border-width: 1px !important;
    border-style: solid !important;
    border-image: initial !important;
    border-radius: 8px;
    margin-top: 2px;
}

.ai-preview-download-btn button .halflings {
    margin-right: 5px;
}

.softlaw-container .softlaw-fieldsets-container .ls-duration-field .duration-subfield input[type="text"]{
	width: 65px !important;
	padding-right: 30px !important;
}

.ia-assistant-disabled-action {
    opacity: 0.5;
    pointer-events: none;
}

.ia-assistant-message-bot.loading-message::before {
    content: "⏳";
    margin-right: 8px;
    display: inline-block;
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    to { transform: rotate(360deg); }
}


/* ==========================================================================
   1. HEADER V2 — with Actions button
   ========================================================================== */

.ia-assistant-header-v2 {
    display: flex;
    flex-direction: column;
    padding-bottom: var(--ia-space-sm);
    background: var(--ia-bg);
    border-bottom: 1px solid var(--ia-border);
    flex-shrink: 0;
    height: auto;
    min-height: auto;
}

.ia-header-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-width: 0;
}

.ia-header-title-area {
    flex: 1 1 auto;
    min-width: 0;
}

.ia-header-left-area {
    display: flex !important;
    align-items: center;
    gap: var(--ia-space-sm);
    min-width: 0;
}

.ia-header-left-area > * {
    display: inline-flex !important;
    align-items: center;
}

.ia-header-left {
    display: flex;
    align-items: center;
    gap: var(--ia-space-sm);
    min-width: 0;
}

.ia-header-logo {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.ia-header-title {
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	min-width: 0;
}

/* Actions trigger button */
.ia-header-right-area {
    display: flex;
    align-items: center;
    gap: var(--ia-space-sm);
    flex-shrink: 0;
}

.ia-header-actions-trigger {
    flex-shrink: 0;
    cursor: pointer;
}

/* Close button (×) */
.ia-header-close-btn {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--ia-radius-sm);
    transition: background var(--ia-transition-fast);
    flex-shrink: 0;
}

.ia-header-close-btn:hover {
    background: var(--ia-bg-subtle);
}

.ia-header-close-icon {
    font-size: 20px;
    color: var(--ia-text-muted);
    line-height: 1;
    transition: color var(--ia-transition-fast);
}

.ia-header-close-btn:hover .ia-header-close-icon {
    color: var(--ia-text-primary);
}


/* ---- Action Row ---- */
.ia-action-row {
    cursor: pointer;
    padding: 0 var(--ia-space-sm);
    transition: background var(--ia-transition-fast);
    border-radius: var(--ia-radius-sm);
    margin: 1px 0;
}

.ia-action-row:hover {
    background: var(--ia-primary-soft);
}

.ia-action-row:active {
    background: var(--ia-primary-light);
}

.ia-action-row-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--ia-space-sm) var(--ia-space-sm);
    min-height: 40px;
}

.ia-action-row-left {
    display: flex;
    align-items: center;
    gap: var(--ia-space-sm);
    flex: 1;
    min-width: 0;
}

.ia-action-row-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.7;
}

.ia-action-row-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--ia-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ia-action-row-star {
    color: var(--ia-star-color);
    font-size: 14px;
    flex-shrink: 0;
    margin-left: var(--ia-space-xs);
}

.ia-action-row-chevron {
    font-size: 16px;
    color: var(--ia-text-muted);
    flex-shrink: 0;
    margin-left: var(--ia-space-sm);
    transition: transform var(--ia-transition-fast);
}

.ia-action-row:hover .ia-action-row-chevron {
    color: var(--ia-primary);
    transform: translateX(2px);
}

/* Disabled state */
.ia-action-row-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.ia-action-row-disabled:hover {
    background: transparent;
}


/* ==========================================================================
   3. TAB BAR
   ========================================================================== */

.ia-assistant-tab-bar {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 var(--ia-space-lg);
    margin: var(--ia-space-md) 0 0 0;
    border-bottom: 2px solid var(--ia-border);
    background: transparent;
    flex-shrink: 0;
}

.ia-assistant-tab-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--ia-space-sm) var(--ia-space-lg);
    cursor: pointer;
    border: none;
    background: transparent;
    position: relative;
    transition: color var(--ia-transition-fast);
    user-select: none;
    -webkit-user-select: none;
}

.ia-assistant-tab-button .ia-tab-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--ia-text-secondary);
    letter-spacing: 0.01em;
    transition: color var(--ia-transition-fast);
}

/* Tab count badge (hidden by default) */
.ia-tab-count {
    display: none;
    margin-left: 6px;
    padding: 1px 6px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    background: var(--ia-primary, #304287);
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

.ia-tab-count-visible {
    display: inline-block;
}

.ia-assistant-tab-button:hover .ia-tab-label {
    color: var(--ia-text-primary);
}

.ia-assistant-tab-button::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: var(--ia-space-sm);
    right: var(--ia-space-sm);
    height: 2px;
    background: transparent;
    border-radius: 2px 2px 0 0;
    transition: background var(--ia-transition-normal);
}

.ia-assistant-tab-button.ia-tab-active .ia-tab-label {
    color: var(--ia-primary);
    font-weight: 600;
}

.ia-assistant-tab-button.ia-tab-active::after {
    background: var(--ia-primary);
}

.ia-assistant-tab-button:hover {
    background: var(--ia-primary-light);
    border-radius: var(--ia-radius-sm) var(--ia-radius-sm) 0 0;
}


/* ==========================================================================
   4. TAB CONTENT
   ========================================================================== */

.ia-tab-content {
    min-height: 0;
    flex: 1;
}

.ia-tab-content-chat {
    display: block;
}

.ia-tab-content-history {
    display: block;
}


/* ==========================================================================
   5. HISTORY PANEL
   ========================================================================== */

.ia-history-panel {
    padding: var(--ia-space-md);
}

.ia-history-empty-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--ia-space-2xl) var(--ia-space-lg);
}

.ia-history-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--ia-space-sm);
}

.ia-history-empty-icon {
    width: 40px;
    height: 40px;
    opacity: 0.3;
    margin-bottom: var(--ia-space-sm);
}

.ia-history-empty-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ia-text-secondary);
}

.ia-history-empty-subtitle {
    font-size: 12px;
    color: var(--ia-text-muted);
    max-width: 200px;
    line-height: 1.4;
}

.ia-history-list {
    display: flex;
    flex-direction: column;
    gap: var(--ia-space-xs);
}

.ia-history-entry {
    border-radius: var(--ia-radius-md);
    padding: var(--ia-space-md) var(--ia-space-lg);
    cursor: pointer;
    transition: background var(--ia-transition-fast);
    border: 1px solid transparent;
}

.ia-history-entry:hover {
    background: var(--ia-bg-subtle);
    border-color: var(--ia-border-light);
}

.ia-history-entry:active {
    background: var(--ia-primary-light);
}

.ia-history-entry-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--ia-space-md);
}

.ia-history-entry-content {
    flex: 1;
    min-width: 0;
}

.ia-history-entry-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ia-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.ia-history-entry-subtitle {
    font-size: 12px;
    color: var(--ia-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ia-history-entry-time {
    font-size: 11px;
    color: var(--ia-text-muted);
    white-space: nowrap;
    flex-shrink: 0;
    padding-top: 1px;
}

/* History entry with PDF button - flex row layout */
.ia-history-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ia-history-entry-clickable {
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

/* PDF Export Button */
.ia-history-pdf-btn-container {
    flex-shrink: 0;
    margin-left: var(--ia-space-sm, 8px);
}

.ia-history-pdf-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--ia-radius-md, 8px);
    background: transparent;
    color: var(--ia-text-secondary, #666);
    cursor: pointer;
    transition: all var(--ia-transition-fast, 0.15s ease);
}

.ia-history-pdf-btn:hover {
    background: var(--ia-primary-light, #e8edff);
    color: var(--ia-primary, #304287);
}

.ia-history-pdf-btn:active {
    background: var(--ia-primary, #304287);
    color: white;
}

.ia-history-pdf-btn svg {
    width: 16px;
    height: 16px;
}




/* ==========================================================================
   6. LAYOUT REFINEMENTS
   ========================================================================== */

/* Body main container needs position:relative for the dropdown overlay */
.ia-assistant-body-main {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    position: relative;
}

.ia-assistant-welcome {
    padding: var(--ia-space-xl) var(--ia-space-lg) var(--ia-space-md);
}

.ia-assistant-welcome-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--ia-text-primary);
    margin-bottom: var(--ia-space-xs);
    line-height: 1.3;
}

.ia-assistant-welcome-message {
    font-size: 13px;
    color: var(--ia-text-secondary);
    line-height: 1.5;
}

.ia-assistant-scenario-header {
    padding: var(--ia-space-xs) var(--ia-space-md);
    flex-shrink: 0;
}

.ia-assistant-body-scrollpanel {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.ia-assistant-body-container {
    padding: var(--ia-space-sm) 0;
}


/* ==========================================================================
   7. ANIMATIONS
   ========================================================================== */

.ia-tab-content-chat,
.ia-tab-content-history {
    animation: iaTabFadeIn var(--ia-transition-smooth) forwards;
}

@keyframes iaTabFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ia-history-entry {
    animation: iaHistoryEntryIn var(--ia-transition-smooth) forwards;
    opacity: 0;
}

.ia-history-entry:nth-child(1) { animation-delay: 0ms; }
.ia-history-entry:nth-child(2) { animation-delay: 40ms; }
.ia-history-entry:nth-child(3) { animation-delay: 80ms; }
.ia-history-entry:nth-child(4) { animation-delay: 120ms; }
.ia-history-entry:nth-child(5) { animation-delay: 160ms; }

@keyframes iaHistoryEntryIn {
    from { opacity: 0; transform: translateX(-4px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Action row stagger animation */
.ia-action-row {
    animation: iaActionRowIn var(--ia-transition-fast) forwards;
    opacity: 0;
}

.ia-action-row:nth-child(2) { animation-delay: 20ms; }
.ia-action-row:nth-child(3) { animation-delay: 40ms; }
.ia-action-row:nth-child(4) { animation-delay: 60ms; }
.ia-action-row:nth-child(5) { animation-delay: 80ms; }
.ia-action-row:nth-child(6) { animation-delay: 100ms; }
.ia-action-row:nth-child(7) { animation-delay: 120ms; }

@keyframes iaActionRowIn {
    from { opacity: 0; transform: translateX(4px); }
    to   { opacity: 1; transform: translateX(0); }
}


/* ==========================================================================
   8. RESPONSIVE
   ========================================================================== */

/* /* Dropdown container (Tâches d'extraction) — now positioned under header */ */
/* .ia-assistant-dropdown-container { */
/*     border-bottom: 1px solid var(--ia-border-light); */
/*     width: calc(100% + 2px); */
/*     height: auto; */
/*     min-height: 0; */
/*     margin-left: -1px; */
/* } */

/* /* Extraction task dropdown - match parent height */ */
/* .extraction-task-dropdown { */
/*     height: 100% !important; */
/*     width: calc(100% + 2px); */
/* } */

/* /* Extraction dropdown: hide list container when not expanded */ */
/* .extraction-task-dropdown .extraction-dropdown-list-container { */
/*     display: none; */
/*     max-height: 0; */
/*     overflow: hidden; */
/* } */

/* .extraction-task-dropdown.expanded .extraction-dropdown-list-container { */
/*     display: block; */
/*     max-height: 300px; */
/*     overflow-y: auto; */
/* } */

/* @media (max-width: 380px) { */
/* /*     .ia-action-dropdown { */ */
/* /*         width: 280px; */ */
/* /*         right: var(--ia-space-sm); */ */
/* /*     } */ */

/* /*     .ia-header-actions-label { */ */
/* /*         display: none; */ */
/* /*     } */ */

/*     .ia-assistant-tab-bar { */
/*         padding: 0 var(--ia-space-sm); */
/*     } */

/*     .ia-assistant-tab-button { */
/*         padding: var(--ia-space-xs) var(--ia-space-sm); */
/*     } */
/* } */


/* Container list */
.ia-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 6px;
}

/* Card */
.ia-history-card {
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

/* Clickable zone (hover) */
.ia-history-card-clickable {
  padding: 12px 12px 10px 12px;
  cursor: pointer;
}

.ia-history-card:hover {
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.10);
  border-color: rgba(15, 23, 42, 0.18);
}

.ia-history-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 12px;
}

.ia-history-card-time {
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
}

.ia-history-card-body {
  margin-top: 6px;
}

.ia-history-card-subtitle {
  font-size: 12px;
  color: #475569;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;   /* 2 lignes max */
  -webkit-box-orient: vertical;
}

/* File link in subtitle */
.ia-history-file-link {
  color: #2563eb;
  text-decoration: none;
  cursor: pointer;
}

.ia-history-file-link:hover {
  text-decoration: underline;
  color: #1d4ed8;
}

.ia-history-card-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  color: #334155;
  background: rgba(59, 130, 246, 0.10);
  padding: 4px 8px;
  border-radius: 999px;
}

.ia-history-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ia-history-card-btn {
  height: 30px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  color: #0f172a;
  font-size: 12px;
  cursor: pointer;
}

.ia-history-card-btn--icon {
  width: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ia-history-card-btn:hover {
  border-color: rgba(15, 23, 42, 0.22);
  background: rgba(248, 250, 252, 0.9);
}

.ia-assistant-header-v2{
  position: relative;
  overflow: visible;
}

.ia-assistant-header-v2::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--Brain-Degraded);
}

/* =========================================================
   IA Assistant - Historique (LegalSuite style)
   Add this block to your assistant history stylesheet
   ========================================================= */

/* Panel spacing */
.ia-history-panel{
  padding: 10px 12px;
}

/* Header row */
.ia-history-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 16px;
  margin-bottom: 8px;
}

/* "Supprimer tout" button */
.ia-history-delete-all-wrap {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
}

.ia-history-delete-all-btn {
  border: none;
  background: transparent;
  color: #6b7280;
  font-weight: 500;
  font-size: 13px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}

.ia-history-delete-all-btn:hover {
  background: #f3f4f6;
  color: #374151;
}

.ia-history-delete-all-btn svg {
  width: 14px;
  height: 14px;
}

.ia-history-delete-all-btn:hover svg {
  color: #dc2626;
}

.ia-history-delete-all-btn:focus {
  outline: 2px solid #c7d2fe;
  outline-offset: 2px;
}

/* List */
.ia-history-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 16px;
}

/* Card */
.ia-history-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
  transition: box-shadow .15s ease, border-color .15s ease;
  margin-bottom: 12px;
}

.ia-history-card:hover {
  box-shadow: 0 2px 8px rgba(30, 41, 59, 0.08);
  border-color: #d1d5db;
}

/* Clickable top area */
.ia-history-card-clickable {
  padding: 14px 16px 10px;
  cursor: default;
}

.ia-history-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.ia-history-card-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  font-size: 14px;
  color: #1f2937;
}

.ia-history-card-time {
  font-size: 12px;
  color: #9ca3af;
  white-space: nowrap;
  flex-shrink: 0;
}

.ia-history-card-body {
  margin-top: 4px;
}

.ia-history-card-subtitle {
  font-size: 13px;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Footer bar */
.ia-history-card-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  border-top: 1px solid #f3f4f6;
  background: #ffffff;
  gap: 8px;
}

/* Primary action buttons */
.ia-history-primary-wrap {
  flex: 0 1 auto;
}

.ia-history-primary-btn{
  border: 1px solid #dbe2f5;
  background: #eef2ff;
  color: #2f3aa6;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}

.ia-history-primary-btn svg{
  opacity: .9;
}

.ia-history-primary-btn:hover{
  background: #e0e7ff;
  border-color: #c7d2fe;
  transform: translateY(-1px);
}


/* Secondary actions group (right) */
.ia-history-card-actions {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  opacity: 0;
  transition: opacity .15s ease;
}

.ia-history-card:hover .ia-history-card-actions {
  opacity: 1;
}

/* Wrapper around icon buttons */
.ia-history-card-btn-wrap {
  display: inline-flex;
}

/* Icon buttons - neutral */
.ia-icon-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}

.ia-icon-btn:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

/* Icon buttons - danger (delete) */
.ia-icon-btn-danger {
  border-color: #fecaca;
}

.ia-icon-btn-danger:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

/* Accessibility focus */
.ia-history-card-clickable:focus,
.ia-icon-btn:focus,
.ia-history-primary-btn:focus {
  outline: 2px solid #c7d2fe;
  outline-offset: 2px;
}

/* Empty / loading blocks */
.ia-history-loading-container,
.ia-history-empty-container {
  margin-top: 12px;
}

/* Textarea assistant: auto-grow, puis scroll */
.ia-assistant-footer .ia-assistant-inputarea textarea.x-form-textarea{
  height: auto !important;
  min-height: 44px;
  max-height: 140px;     /* ajuste: 120/140/160 */
  overflow-y: auto !important;
  resize: none;          /* évite le resize manuel moche */
  line-height: 18px;
  word-break: break-word;
  white-space: pre-wrap;
}

/* Optionnel: éviter le scroll horizontal (si un mot très long) */
.ia-assistant-footer .ia-assistant-inputarea textarea.x-form-textarea{
  overflow-x: hidden;
}

/* Capsule container */
.ia-header-view-toggle {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d9dbe7;
  border-radius: 12px;
  padding: 3px;
  background: #f7f8fc;
  gap: 4px;
}

/* Each segment */
.ia-header-view-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  color: #4a4f6a;
  font-weight: 600;
}

/* Active segment */
.ia-header-view-active {
  background: #304287; 
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(109, 94, 252, 0.25);
}

.ia-header-view-icon {
  font-size: 14px;
  line-height: 14px;
}

.ia-header-view-label {
  font-size: 13px;
}


/* 1) Empêche le scroll horizontal dans tout le panel */
.ia-assistant-right-panel,
.ia-assistant-panel-wrapper,
.ia-assistant-body-scrollpanel,
.ia-assistant-body-main {
  overflow-x: hidden !important;
}

/* 2) GXT met souvent des widths inline en px sur .x-box-inner → on force 100% */
.ia-assistant-right-panel .x-box-inner {
  width: 100% !important;
  max-width: 100% !important;
}

/* 3) Même idée sur les items */
.ia-assistant-right-panel .x-box-item {
  max-width: 100% !important;
}

/* 4) Important : les composants doivent compter padding/border dans la largeur */
.ia-assistant-right-panel,
.ia-assistant-right-panel * {
  box-sizing: border-box;
}

/* 5) Les textes très longs (sans espaces) peuvent créer un overflow */
.ia-assistant-message-user,
.ia-assistant-message-bot,
.ia-assistant-body-container {
  overflow-wrap: anywhere;   /* le plus robuste */
  word-break: break-word;
}

/* 6) Textarea + input zone : éviter le dépassement */
.ia-assistant-inputarea,
.ia-assistant-inputarea textarea {
  width: 100% !important;
  max-width: 100% !important;
}



/* =========================================================
   IA Cards — Premium / Preprod
   ========================================================= */

.ia-chat-actions-root{
  --ls-accent: #5b6cf8;
  --ls-text: #0f172a;
  --ls-muted: rgba(15,23,42,.62);
  --ls-border: rgba(15,23,42,.10);
  --ls-bg: #fff;
  --ls-soft: rgba(91,108,248,.07);

  --radius: 12px;
  --shadow: 0 10px 30px rgba(15,23,42,.08);
  --shadow-hover: 0 16px 38px rgba(15,23,42,.12);
  --ring: 0 0 0 3px rgba(91,108,248,.18);
}

/* Sections: plus net + ligne de séparation */
.ia-chat-actions-section__label{
  font-size: 11px;
  letter-spacing: .08em;
  color: rgba(15,23,42,.42);
  display:flex;
  align-items:center;
  gap:10px;
  margin: 14px 0 10px;
}
.ia-chat-actions-section__label::after{
  content:"";
  height:1px;
  flex:1;
  background: rgba(15,23,42,.08);
}

/* Grid: 4 colonnes en large, sinon 2 puis 1 */
.ia-chat-actions-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 8px;
}

@media (max-width: 1200px) {
  .ia-chat-actions-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}

@media (max-width: 900px) {
  .ia-chat-actions-grid {
    grid-template-columns: 1fr;
  }
}

/* Card */
.ia-chat-action-card{
  background: var(--ls-bg);
  border: 1px solid var(--ls-border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  min-height: 84px;                /* hauteur homogène */
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, background .14s ease;
  cursor: pointer;
}

/* wash discret en haut (premium) */
.ia-chat-action-card::before{
  content:"";
  position:absolute;
  inset:0;
  background: radial-gradient(900px 240px at 18% 0%,
    rgba(91,108,248,.10) 0%,
    rgba(255,255,255,0) 55%);
  opacity:.55;
  pointer-events:none;
}

/* Chevron d'affordance - only in expanded mode */
.ia-chat-actions-grid--expanded .ia-chat-action-card::after{
  content:"›";
  position:absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: rgba(15,23,42,.30);
  transition: transform .14s ease, color .14s ease;
  pointer-events:none;
}

.ia-chat-action-card:hover{
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(91,108,248,.28);
  background: linear-gradient(0deg, var(--ls-soft), var(--ls-bg));
}
.ia-chat-actions-grid--expanded .ia-chat-action-card:hover::after{
  transform: translateY(-50%) translateX(2px);
  color: rgba(91,108,248,.9);
}
.ia-chat-action-card:active{
  transform: translateY(0) scale(.99);
  box-shadow: var(--shadow);
}

/* Focus clavier */
.ia-chat-action-card:focus,
.ia-chat-action-card:focus-within{
  outline: none;
  box-shadow: var(--shadow), var(--ring);
  border-color: rgba(91,108,248,.45);
}

/* Favorite : plus classe que border jaune fort */
.ia-chat-action-card--favorite{
  border-color: rgba(245,158,11,.35);
}
.ia-chat-action-card--favorite::before{
  background: radial-gradient(900px 240px at 18% 0%,
    rgba(245,158,11,.16) 0%,
    rgba(255,255,255,0) 55%);
}

/* Disabled */
.ia-chat-action-card--disabled{
  opacity:.45;
  cursor:not-allowed;
  pointer-events:none;
  filter: grayscale(.25);
}

/* Inner: layout pro → icône à gauche + texte */
.ia-chat-action-card__inner {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 14px;
  text-align: left;
}

/* Chip icône (fond) */
.ia-chat-action-card__top {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(91,108,248,.10);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.ia-chat-action-card__icon{
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.ia-chat-action-card__monogram{
  width: 32px;
  height: 32px;
  border-radius: 11px;
  background: linear-gradient(135deg, #5b6cf8, #8b5cf6);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  font-size:14px;
}

/* Badge étoile */
.ia-chat-action-card__star{
  position:absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(245,158,11,.95);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 10px;
  box-shadow: 0 8px 18px rgba(245,158,11,.22);
}

/* Label plus lisible */
.ia-chat-action-card__label{
	hite-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
	color: var(--ls-text);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.25;
	overflow: hidden;
}

.ia-chat-action-card__text {
  overflow: hidden;
  min-width: 0;
}

.ia-chat-action-card__desc{
  margin-top: 4px;
  font-size: 12px;
  color: var(--ls-muted);
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Compact : densité un peu + forte */
@media (max-width: 1200px) {

  .ia-chat-action-card__top {
    display: none;
  }

  .ia-chat-action-card__inner {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .ia-chat-action-card__label {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    white-space: normal;
    line-height: 1.3;
  }
}

@media (max-width: 900px) {

  .ia-chat-action-card__label {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ia-chat-action-card {
    min-height: 56px;
  }
}

/* ****Container du bouton help ****/
.ia-tab-help-button{
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  color: #d83a2e;              
  padding: 6px 10px;
  border-radius: 999px;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.ia-tab-help-button:hover{
  background-color: rgba(216, 58, 46, 0.08);
}

.ia-tab-help-button:active{
  background-color: rgba(216, 58, 46, 0.14);
}

.ia-tab-help-button:focus,
.ia-tab-help-button:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(216, 58, 46, 0.18);
}

/* Icône ? */
.ia-tab-help-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  background-color: #d83a2e;
}

.ia-tab-help-icon.ia-compliance-admin-help-icon {
  height: 17px;
  background-color: #3D64ED;
}

/* ==========================================================================
   9. HISTORY PANEL FILTERS & BADGES
   ========================================================================== */

/* Filter row container */
.ia-history-filter-row {
  display: flex;
  align-items: center;
  width: auto;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

/* Search container */
.ia-history-search-container {
  display: flex;
  align-items: center;
  width: auto;
  flex: 1 1 150px;
  min-width: 130px;
  padding: 6px 10px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ia-history-search-container:focus-within {
  border-color: #5b6cf8;
  box-shadow: 0 0 0 2px rgba(91, 108, 248, 0.12);
}

.ia-history-search-icon {
  font-size: 14px;
  margin-right: 6px;
  opacity: 0.5;
}

.ia-history-search-input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  outline: none !important;
  font-size: 13px;
  color: #1f2a44;
  padding: 2px 0 !important;
  box-shadow: none !important;
}

.ia-history-search-input::placeholder {
  color: #9ca3af;
}

/* Date filter dropdown */
.ia-history-date-filter {
  flex: 0 1 150px;
  min-width: 130px;
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid #e6e9f2;
  border-radius: 8px;
  background: #fff;
  color: #1f2a44;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s ease;
}

.ia-history-date-filter:hover {
  border-color: #d8deee;
}

.ia-history-date-filter:focus {
  border-color: #5b6cf8;
  box-shadow: 0 0 0 2px rgba(91, 108, 248, 0.12);
}

/* Category badges */
.ia-history-badge {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ia-history-card-meta {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.ia-badge-blue {
  background: rgba(59, 130, 246, 0.15);
  color: #2563eb;
}

.ia-badge-purple {
  background: rgba(139, 92, 246, 0.15);
  color: #7c3aed;
}

.ia-badge-green {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}

.ia-badge-orange {
  background: rgba(249, 115, 22, 0.15);
  color: #ea580c;
}

.ia-badge-teal {
  background: rgba(20, 184, 166, 0.15);
  color: #0d9488;
}

.ia-badge-pink {
  background: rgba(236, 72, 153, 0.15);
  color: #db2777;
}

.ia-badge-red {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

.ia-badge-indigo {
  background: rgba(99, 102, 241, 0.15);
  color: #4f46e5;
}

/* ====== Main History Title Section ====== */
.ia-history-main-title {
  padding: 20px 16px 12px 16px;
}

.ia-history-main-title-text {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.3;
  margin-bottom: 2px;
}

.ia-history-main-subtitle {
  font-size: 13px;
  color: #64748b;
  line-height: 1.4;
}

/* ====== Documents analysés banner section (History tab) ====== */
.ia-history-analyzed-docs-banner {
  background: #f8f5ff;
  border: 1px solid #e8e4f8;
  border-radius: 10px;
  padding: 14px 16px;
  margin: 10px 16px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ia-history-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ia-history-banner-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ede9fe;
  border-radius: 8px;
}

.ia-history-banner-icon img,
.ia-history-banner-icon svg {
  width: 20px;
  height: 20px;
}

.ia-history-banner-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
}

.ia-history-banner-title {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.3;
}

.ia-history-banner-desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

.ia-history-banner-btn-wrap {
  align-self: flex-start;
}


.ia-history-banner-btn:hover .ia-history-banner-btn-arrow {
  transform: translateX(2px);
}

/* Section label */
.ia-history-section-label {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  padding: 0 16px 12px 16px;
}

/* ===================== Pagination ===================== */
.ia-history-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px;
  border-top: 1px solid #f3f4f6;
  background: #ffffff;
}

.ia-history-pagination-btn {
  border: none;
  background: transparent;
  color: #304287;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background .15s ease, color .15s ease;
}

.ia-history-pagination-btn:hover:not([disabled]) {
  background: #f5f3ff;
  color: #304287;
}

.ia-history-pagination-btn[disabled] {
  color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.5;
}

.ia-history-pagination-indicator {
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
}

.ia-assistant-body-main {
    display: flex;
    flex-direction: column;
/*     height: 100%; */
    overflow: hidden;
}

.ia-assistant-tab-bar {
    flex-shrink: 0;
}

.ia-assistant-body-scrollpanel {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}


/* Mode Chat — laisse de la place pour le footer (input) */
.ia-assistant-body-scrollpanel {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: calc(100vh - 350px) !important;
    width: 100%;
}

/* Mode Historique — pas de footer, prend quasi toute la hauteur */
.ia-assistant-body-scrollpanel.ia-scroll-history-mode {
    height: calc(100vh - 180px) !important;
}


/* ============================================
   ASSISTANT IA — LAYOUT STRUCTURE
   Force CSS Flexbox over GXT VBoxLayout
   ============================================ */

/* Le right-panel lui-même */
.ia-assistant-right-panel {
    overflow: hidden !important;
}

/* Wrapper principal */
.ia-assistant-panel-wrapper {
    height: 100% !important;
    overflow: hidden !important;
}

/* CRITICAL: Override GXT's x-box-inner — c'est lui qui contrôle tout */
.ia-assistant-panel-wrapper > .x-box-inner {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    width: 100% !important;
    overflow: hidden !important;
}

/* CRITICAL: Kill GXT absolute positioning on ALL children */
.ia-assistant-panel-wrapper > .x-box-inner > .x-box-item {
    position: relative !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
}

/* Header — taille auto */
.ia-assistant-panel-wrapper > .x-box-inner > .ia-assistant-header-v2 {
    flex-shrink: 0 !important;
    height: auto !important;
}

/* Body — prend TOUT l'espace restant, scrolle en interne */
.ia-assistant-panel-wrapper > .x-box-inner > .ia-assistant-body-main {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: hidden !important;   /* PAS de scroll ici — le scroll est dans innerScroll */
}

/* Footer — taille auto, ne shrink pas */
.ia-assistant-panel-wrapper > .x-box-inner > .ia-assistant-footer {
    flex-shrink: 0 !important;
    height: auto !important;
}

/* Disclaimer — taille auto, ne shrink pas */
.ia-assistant-panel-wrapper > .x-box-inner > .disclaimer-panel {
    flex-shrink: 0 !important;
    height: auto !important;
}


/* ============================================
   BODY — scroll interne uniquement
   ============================================ */
.ia-assistant-body-main {
    overflow: hidden !important;
}

/* L'outer wrapper prend toute la hauteur du body */
.ia-assistant-body-outer {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Le tab bar est fixe en haut */
.ia-assistant-tab-bar {
    flex-shrink: 0;
}

/* Le scrollpanel interne prend le reste */
.ia-assistant-body-scrollpanel {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto !important;
}

/* Scrollbar fine */
.ia-assistant-body-scrollpanel::-webkit-scrollbar {
    width: 4px;
}
.ia-assistant-body-scrollpanel::-webkit-scrollbar-track {
    background: transparent;
}
.ia-assistant-body-scrollpanel::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}


/* ============================================
   FOOTER
   ============================================ */
.ia-assistant-footer {
    padding: 8px 12px 4px 12px !important;
    background: transparent;
    box-sizing: border-box !important;
    width: 100% !important;
}


/* ============================================
   PILL WRAPPER
   ============================================ */
.ia-footer-input-wrapper {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end;
    border: 1px solid #d0d0d0;
    border-radius: 16px;
    background: #ffffff;
    padding: 4px;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.ia-footer-input-wrapper:focus-within {
    border-color: #304287;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.15);
}


/* ============================================
   TEXTAREA — override GXT inline styles
   ============================================ */
.ia-footer-textarea {
    width: 100% !important;
    box-sizing: border-box !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    position: relative !important;
    height: auto !important;
}

.ia-footer-textarea textarea,
.ia-footer-textarea .x-form-field,
.ia-footer-textarea .x-form-textarea {
    width: 100% !important;
    box-sizing: border-box !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    resize: none !important;
    font-size: 14px;
    line-height: 1.5;
    padding: 8px 12px !important;
    padding-right: 40px !important;
    margin: 0 !important;
    min-height: 40px;
    max-height: 200px;
    overflow-y: hidden;
    font-family: inherit;
    color: #1a1a1a;
}

.ia-footer-textarea textarea::placeholder,
.ia-footer-textarea .x-form-empty-field {
    color: #9ca3af !important;
    font-style: normal !important;
}

.ia-footer-textarea .x-form-text-wrap {
    border: none !important;
    background: none !important;
    padding: 0 !important;
    width: 100% !important;
}

.ia-footer-textarea .x-form-focus {
    border: none !important;
    box-shadow: none !important;
}

.ia-footer-textarea .x-form-invalid {
    border: none !important;
    background: none !important;
}

/* Scrollbar fine sur textarea */
.ia-footer-textarea textarea::-webkit-scrollbar {
    width: 4px;
}
.ia-footer-textarea textarea::-webkit-scrollbar-track {
    background: transparent;
}
.ia-footer-textarea textarea::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

/* Voice button */
.ia-footer-textarea .ls-textarea-voice-button {
    bottom: 8px !important;
    top: auto !important;
    right: 8px !important;
}


/* ============================================
   TOOLBAR
   ============================================ */
.ia-footer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 8px;
    border-top: 1px solid #f0f0f0;
    height: 36px;
    min-height: 36px;
    flex-shrink: 0;
    box-sizing: border-box;
}

.ia-footer-toolbar-right {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}


/* ============================================
   IMPORT BUTTON
   ============================================ */

.ia-footer-toolbar .ia-assistant-importbtn:hover {
    background: rgba(220, 228, 253, 1) !important;
}

.ia-footer-toolbar .ia-assistant-importbtn img {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}


/* ============================================
   USER MENTION POPUP (@-trigger)
   ============================================ */
.ia-mention-popup {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12),
                0 2px 6px rgba(15, 23, 42, 0.06) !important;
    padding: 6px !important;
    overflow: hidden !important;
}

/* Hide GXT default shadow element; our box-shadow handles it */
.ia-mention-popup + .x-shadow,
.ia-mention-popup .x-shadow {
    display: none !important;
}

.ia-mention-popup .ia-mention-listview {
    background: transparent !important;
    border: none !important;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 220px;
}

/* Thin scrollbar inside the popup */
.ia-mention-popup .ia-mention-listview::-webkit-scrollbar {
    width: 6px;
}
.ia-mention-popup .ia-mention-listview::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

.ia-mention-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.12s ease;
}

.ia-mention-item:hover,
.ia-mention-item.x-view-over {
    background: #f3f4f6;
}

.ia-mention-item.x-view-selected,
.ia-mention-item.x-view-item-sel {
    background: #eef2ff;
}

.ia-mention-avatar {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    user-select: none;
}

.ia-mention-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
}

.ia-mention-name {
    font-size: 13px;
    font-weight: 500;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.ia-mention-email {
    font-size: 11px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    margin-top: 2px;
}


/* ============================================
   SEND BUTTON
   ============================================ */

.ia-footer-send-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    border-radius: 12px !important;
    border: none !important;
    background: #304287 !important;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(48, 66, 135, 0.3);
}

.ia-footer-send-btn:hover {
    background: #263670 !important;
    box-shadow: 0 4px 12px rgba(48, 66, 135, 0.45);
    transform: translateY(-1px);
}

.ia-footer-send-btn:active {
    transform: translateY(0px);
    box-shadow: 0 1px 4px rgba(48, 66, 135, 0.3);
}

/* Cacher l'image existante */
.ia-footer-send-btn img {
    display: none !important;
}

/* Flèche  — SVG inline via CSS */
.ia-footer-send-btn::after {
    content: '';
    display: block;
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19V5'/%3E%3Cpath d='M5 12l7-7 7 7'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform 0.2s ease;
}

.ia-footer-send-btn:hover::after {
    transform: translateY(-2px);
}

.ia-footer-send-btn:disabled {
    background: #e5e7eb !important;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.ia-footer-send-btn:disabled::after {
    opacity: 0.4;
}

/* ============================================
   DISCLAIMER
   ============================================ */
.disclaimer-panel {
    text-align: center;
    padding: 4px 12px 8px 12px !important;
    font-size: 11px;
    color: #9ca3af;
    line-height: 1.3;
}


.ia-assistant-inputarea {
    width: 100% !important;
    border: none !important;
}

.ls-assist-ia-importbtn-container {
    display: none !important;
}


/* Scrollbar plus large et facile à attraper dans le textarea */
.ia-footer-textarea textarea {
    scrollbar-width: thin;
    scrollbar-color: rgba(48, 66, 135, 0.3) transparent;
}

.ia-footer-textarea textarea::-webkit-scrollbar {
    width: 8px;
}

.ia-footer-textarea textarea::-webkit-scrollbar-track {
    background: transparent;
    margin: 4px 0;
}

.ia-footer-textarea textarea::-webkit-scrollbar-thumb {
    background: rgba(48, 66, 135, 0.25);
    border-radius: 8px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.ia-footer-textarea textarea::-webkit-scrollbar-thumb:hover {
    background: rgba(48, 66, 135, 0.5);
    border: 1px solid transparent;
    background-clip: padding-box;
}

.ia-footer-textarea textarea::-webkit-scrollbar-thumb:active {
    background: rgba(48, 66, 135, 0.7);
}

.ia-assistant-body-scrollpanel {
    height: calc(100vh - 350px) !important;
}

/* Le wrapper implicite de GWT ScrollPanel */
.ia-assistant-body-main > div {
    height: 100%;
}

.ia-assistant-body-outer {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ia-assistant-body-scrollpanel {
    flex: 1;
    min-height: 0;
    overflow-y: auto !important;
}

/* ============================================================
   AssistantIaHistoryPanel — extracted from inline Java styles
   ============================================================ */


/* Section row: label on TOP, filters BELOW */
.ia-history-analyses-section-row {
    display: flex;
    flex-direction: column;       /* ← colonne au lieu de row */
    align-items: flex-start;      /* ← aligné à gauche */
    padding: 12px 16px;
    gap: 16px;                    /* ← espace entre le label et les filtres */
}

/* Left part: icon + title + description — inchangé */
.ia-history-section-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ia-assistant-context-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin: 12px 10px 14px !important;
  padding: 0 !important;
  min-height: 32px;
}

/* Titre compact */
.ia-assistant-context-title {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #1f2940 !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* Petite icône discrète */
.ia-assistant-context-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background: url("../img/iapanel/ia-assistant-change-selection.svg") center center / 14px 14px no-repeat;
  opacity: 0.9;
}

/* Bouton action léger */
.ia-assistant-context-action {
  flex: 0 0 auto !important;
}

.ia-assistant-context-action button.com-legalsuite-core-client-widgets-LsButton-ComponentResources-Style-btnModifier {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 30px !important;
  padding: 0 10px !important;
  border: none !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: #4b5bb5 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  border-radius: 999px !important;
  cursor: pointer !important;
}

.ia-assistant-context-action button.com-legalsuite-core-client-widgets-LsButton-ComponentResources-Style-btnModifier:hover {
  background: #f4f7ff !important;
  color: #31429f !important;
}

.ia-assistant-context-action .lib,
.ia-assistant-context-action-inner {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  line-height: 1 !important;
}

.ia-assistant-context-action-inner img {
  width: 13px !important;
  height: 13px !important;
  display: block !important;
  opacity: 0.9;
}

/* Mobile */
@media (max-width: 768px) {
  .ia-assistant-context-bar {
    flex-wrap: wrap;
    align-items: flex-start !important;
  }

  .ia-assistant-context-title {
    white-space: normal !important;
  }
}
/* =========================================================
   CONTEXTE / SCENARIO EN COURS
   ========================================================= */

.ia-assistant-scenario-header {
  margin: 8px 0 14px;
  padding: 0;
}

.ia-assistant-scenario-header-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* =========================================================
   TITRE SCENARIO
   ========================================================= */

.ia-assistant-action-selected,
.ia-assistant-context-title {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 6px 12px !important;
  min-height: 32px !important;
  max-width: 100% !important;
  border-radius: 999px !important;
  border: 1px solid #e2e7fb !important;
  background: linear-gradient(180deg, #f8f9ff 0%, #f1f4ff 100%) !important;
  color: #24315f !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: -0.01em !important;
  white-space: nowrap !important;
  box-shadow: 0 1px 4px rgba(77, 86, 209, 0.06) !important;
  text-overflow: ellipsis !important;
  overflow: hidden !important;
  background-image: none !important;
}

/* Icône subtile avant le titre */
.ia-assistant-action-selected::before,
.ia-assistant-context-title::before {
  content: "";
  display: inline-block !important;
  width: 14px !important;
  height: 14px !important;
  flex-shrink: 0 !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #ff7d6b 0%, #7b61ff 55%, #63e0dd 100%) !important;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95) inset !important;
}

/* Si tu veux garder un curseur propre sur le label */
.ia-assistant-action-selected.sweezy-custom-cursor-default-hover {
  cursor: default !important;
}

/* =========================================================
   BOUTON "REVENIR AUX ACTIONS"
   ========================================================= */

.ia-assistant-change-button,
.ia-assistant-context-action {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Bouton GXT / LsButton */
.ia-assistant-change-button button.com-legalsuite-core-client-widgets-LsButton-ComponentResources-Style-btnModifier,
.ia-assistant-context-action button.com-legalsuite-core-client-widgets-LsButton-ComponentResources-Style-btnModifier {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 32px !important;
  padding: 0 10px !important;
  margin: 0 !important;
  border-radius: 999px !important;
  border: 1px solid transparent !important;
  background: #f6f8ff !important;
  background-image: none !important;
  color: #4253ae !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  box-shadow: none !important;
  outline: none !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
  white-space: nowrap !important;
}

/* Hover */
.ia-assistant-change-button button.com-legalsuite-core-client-widgets-LsButton-ComponentResources-Style-btnModifier:hover,
.ia-assistant-context-action button.com-legalsuite-core-client-widgets-LsButton-ComponentResources-Style-btnModifier:hover {
  background: #eef2ff !important;
  color: #2f3f98 !important;
  border-color: transparent !important;
}

/* Focus */
.ia-assistant-change-button button.com-legalsuite-core-client-widgets-LsButton-ComponentResources-Style-btnModifier:focus,
.ia-assistant-context-action button.com-legalsuite-core-client-widgets-LsButton-ComponentResources-Style-btnModifier:focus {
  box-shadow: 0 0 0 3px rgba(77, 86, 209, 0.12) !important;
}

/* Contenu interne du bouton */
.ia-assistant-change-button .lib,
.ia-assistant-context-action .lib,
.ia-assistant-change-btn-inner,
.ia-assistant-context-action-inner {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
}

/* Icône du bouton */
.ia-assistant-change-button .lib img,
.ia-assistant-context-action .lib img,
.ia-assistant-change-btn-inner img,
.ia-assistant-context-action-inner img {
  width: 12px !important;
  height: 12px !important;
  display: block !important;
  object-fit: contain !important;
  opacity: 0.92 !important;
}

/* Texte bouton */
.ia-assistant-actions-change-selection {
  display: inline-block !important;
  color: #4253ae !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

/* =========================================================
   VARIANTE PLUS "LIEN" AU LIEU DE PILULE
   Décommente si tu veux un rendu encore plus léger
   ========================================================= */

/*
.ia-assistant-change-button button.com-legalsuite-core-client-widgets-LsButton-ComponentResources-Style-btnModifier,
.ia-assistant-context-action button.com-legalsuite-core-client-widgets-LsButton-ComponentResources-Style-btnModifier {
  min-height: auto !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  color: #4b5bb5 !important;
}

.ia-assistant-change-button button.com-legalsuite-core-client-widgets-LsButton-ComponentResources-Style-btnModifier:hover,
.ia-assistant-context-action button.com-legalsuite-core-client-widgets-LsButton-ComponentResources-Style-btnModifier:hover {
  background: transparent !important;
  color: #2f3f98 !important;
  text-decoration: underline;
}
*/

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 768px) {
  .ia-assistant-scenario-header-row {
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  .ia-assistant-action-selected,
  .ia-assistant-context-title {
    max-width: 100% !important;
    white-space: normal !important;
    line-height: 1.25 !important;
  }

  .ia-assistant-change-button,
  .ia-assistant-context-action {
    width: auto !important;
  }
}

/* =========================================================
   PETITES AMELIORATIONS GENERALES SI BESOIN
   ========================================================= */

/* Évite que GXT rajoute des effets bizarres */
.ia-assistant-change-button.x-component,
.ia-assistant-context-action.x-component {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Nettoie certains span/button internes GXT */
.ia-assistant-change-button button span,
.ia-assistant-context-action button span {
  vertical-align: middle !important;
}


.ia-missing-file-message {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 14px 0 18px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #ffe1b8;
  background: linear-gradient(180deg, #fffaf2 0%, #fff6e9 100%);
  box-shadow: 0 2px 8px rgba(255, 166, 0, 0.06);
}

.ia-missing-file-message-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffbf66 0%, #ff8a3d 100%);
  position: relative;
}

.ia-missing-file-message-icon::before {
  content: "!";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.ia-missing-file-message-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ia-missing-file-message-title {
  margin: 0;
  color: #8c4c00;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.ia-missing-file-message-text {
  color: #6f5b3f;
  font-size: 13px;
  line-height: 1.5;
}

.ia-assistant-body-scrollpanel {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto !important;
}

/* Scrollbar fine au repos */
.ia-assistant-body-scrollpanel::-webkit-scrollbar {
    width: 4px;
}
.ia-assistant-body-scrollpanel::-webkit-scrollbar-track {
    background: transparent;
}
.ia-assistant-body-scrollpanel::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

/* Au hover sur le panel — scrollbar s'élargit et devient bleue */
.ia-assistant-body-scrollpanel:hover::-webkit-scrollbar {
    width: 7px;
}
.ia-assistant-body-scrollpanel:hover::-webkit-scrollbar-track {
    background: rgba(48, 66, 135, 0.06);
    border-radius: 4px;
}
.ia-assistant-body-scrollpanel:hover::-webkit-scrollbar-thumb {
    background: rgba(48, 66, 135, 0.35);
    border-radius: 4px;
}

/* Au hover direct sur le thumb */
.ia-assistant-body-scrollpanel::-webkit-scrollbar-thumb:hover {
    background: rgba(48, 66, 135, 0.65);
    cursor: grab;
}

/* Au clic */
.ia-assistant-body-scrollpanel::-webkit-scrollbar-thumb:active {
    background: #304287;
    cursor: grabbing;
}

/* Conteneur positionné en bas du outerWrapper */
.ia-scroll-bottom-container {
    position: relative;
    height: 0;
    overflow: visible;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

/* Bouton flottant */
.ia-scroll-bottom-btn {
    position: absolute;
    bottom: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid rgba(48, 66, 135, 0.2);
    box-shadow: 0 2px 8px rgba(48, 66, 135, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #304287;
    transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
    pointer-events: auto;
}

.ia-scroll-bottom-btn:hover {
    background: #f0f3ff;
    box-shadow: 0 4px 12px rgba(48, 66, 135, 0.25);
    transform: translateY(-1px);
}

.ia-scroll-bottom-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(48, 66, 135, 0.2);
}

/* Wrap — gère l'animation apparition/disparition */
.ia-scroll-bottom-btn-wrap {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.ia-assistant-context-action button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius:24px;
    border: 1px solid #d0d5dd;
    background: #ffffff !important;
    color: #24315f !important;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
 
.ia-assistant-context-action button:hover {
    background: #f0f4ff !important;
    border-color: #304287;
    color: #304287 !important;
    box-shadow: 0 2px 8px rgba(48, 66, 135, 0.12);
}
 
.ia-assistant-context-action .lib {
    display: inline-flex;
    align-items: center;
}
 
.ia-assistant-context-action-inner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    pointer-events: none;
}
 
.ia-assistant-context-action-inner img {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
 
.ia-assistant-context-action-inner span {
    font-size: 13px;
    font-weight: 600;
    color: inherit;
}
/* desactivate full screen button */
.ia-header-view-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Toolbar toujours visible, discrète par défaut */
.ia-assistant-message-toolbar {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  opacity: 0.4;
  transition: opacity 0.2s ease;
}

/* S'intensifie au survol du message parent */
.ia-assistant-message-bot:hover .ia-assistant-message-toolbar,
.ia-assistant-message-toolbar:hover {
  opacity: 1;
}

/* Boutons modernes */
.ia-assistant-toolbar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.ia-assistant-toolbar-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  transform: scale(1.1);
}

.ia-assistant-toolbar-btn:active {
  transform: scale(0.95);
}

/* Relaunch button - wider to host icon + label, and honours the disabled state. */
.ia-assistant-toolbar-btn-relaunch {
  width: auto;
  padding: 0 8px;
  gap: 4px;
  color: #3D64ED;
}
.ia-assistant-toolbar-btn-relaunch.ia-assistant-btn-disabled,
.ia-assistant-toolbar-btn-relaunch[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Toolbar visible uniquement si message complet (pas loading, pas info) */
.ia-assistant-message-bot-wrapper:has(.ia-assistant-message-bot:not(.loading-message):not(.info-message)) .ia-assistant-message-toolbar {
  display: flex;
}

/* Toolbar masquée explicitement sur le wrapper info */
.ia-no-toolbar .ia-assistant-message-toolbar {
  display: none !important;
}

/* ===================================================================
   PlaybookClausesWindow  —  Legal Editorial esthetic
   =================================================================== */

/* ── variables locales ─────────────────────────────────────────── */
.pcw-panel {
  --pcw-navy:          #1B2559;
  --pcw-navy-dark:     #111840;
  --pcw-navy-mid:      #2E3862;
  --pcw-accent:        #C8922A;        /* amber – sévérité / accent */
  --pcw-accent-soft:   #FFF4E0;
  --pcw-parchment:     #FAF8F3;        /* fond colonne document     */
  --pcw-parchment-mid: #F2EFE8;
  --pcw-divider:       rgba(27,37,89,0.12);
  --pcw-card-bg:       #FFFFFF;
  --pcw-card-hover-bg: #FAFCFF;
  --pcw-label-color:   #7A8299;
  --pcw-text:          #1A1D2E;
  --pcw-text-soft:     #4A5068;
  --pcw-radius:        10px;
  --pcw-radius-sm:     6px;
  --pcw-ease:          cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── panneau racine ────────────────────────────────────────────── */
.pcw-panel {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--pcw-parchment);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(100%);
  transition: transform 0.45s var(--pcw-ease);
  box-shadow: -8px 0 40px rgba(27, 37, 89, 0.18), -1px 0 0 rgba(27,37,89,0.08);
  pointer-events: auto;
}

/* ── header ────────────────────────────────────────────────────── */
/*
.pcw-header {
  background: linear-gradient(135deg, var(--pcw-navy-dark) 0%, var(--pcw-navy-mid) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 28px;
  box-sizing: border-box;
  flex-shrink: 0;
  height: 52px;
  position: relative;
  border-bottom: 2px solid var(--pcw-accent);
}*/

/* subtil motif de fond dans le header */
/*
.pcw-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 18px,
    rgba(255,255,255,0.025) 18px,
    rgba(255,255,255,0.025) 19px
  );
  pointer-events: none;
}*/
/*
.pcw-header-title {
  color: #FFFFFF;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;           /* au-dessus du ::before */
}
*/

/* ── body ──────────────────────────────────────────────────────── */
.pcw-body {
  flex: 1;
  display: flex;
  flex-direction: row;
  min-height: 0;
  overflow: hidden;
}

/* ── colonne gauche : document original ────────────────────────── */
.pcw-left-column {
  flex: 1;
  border-right: 1px solid var(--pcw-divider);
  background: white;
  padding: 28px 32px;
  box-sizing: border-box;
  min-width: 0;
  /* encart "papier" */
  box-shadow: inset -4px 0 12px rgba(27,37,89,0.04);
}

/* ── colonne droite : clauses normalisées ──────────────────────── */
.pcw-right-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: white !important;
}

/* ── zone re-extraction ────────────────────────────────────────── */
.pcw-reextract-zone {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  border-bottom: 1px solid var(--pcw-divider);
  background: linear-gradient(to bottom, #ECEFFE, #E8EBFA);
  flex-shrink: 0;
}

.pcw-reextract-label {  
	Palette  : navy #1B2559  ·  parchment #FAF8F3  ·  amber #C8922A;
   Typography : Georgia (titles) · system-ui (body) · mono (labels);
  flex: 1;
  color: var(--pcw-text-soft);
  font-size: 12px;
  letter-spacing: 0.01em;
}

/* ── scroll des clauses ────────────────────────────────────────── */
.pcw-clauses-scroll {
  flex: 1;
  min-height: 0;
}

.pcw-clauses-list {
  padding: 20px 16px 24px;
}

/* ── card d'une clause ─────────────────────────────────────────── */
.pcw-clause-card {
  background: var(--pcw-card-bg);
  border: 1px solid rgba(27, 37, 89, 0.10);
  border-left: 3px solid var(--pcw-navy-mid);
  border-radius: var(--pcw-radius);
  margin-bottom: 14px;
  overflow: hidden;
  transition:
    box-shadow 200ms ease,
    transform  200ms ease,
    border-left-color 200ms ease;
}

.pcw-clause-card:hover {
  box-shadow: 0 4px 18px rgba(27, 37, 89, 0.10);
  transform: translateY(-1px);
  border-left-color: var(--pcw-accent);
}

/* animation d'entrée décalée pour chaque carte */
.pcw-clauses-list .pcw-clause-card {
  animation: pcw-card-in 0.35s var(--pcw-ease) both;
}
.pcw-clauses-list .pcw-clause-card:nth-child(1)  { animation-delay: 0.04s; }
.pcw-clauses-list .pcw-clause-card:nth-child(2)  { animation-delay: 0.08s; }
.pcw-clauses-list .pcw-clause-card:nth-child(3)  { animation-delay: 0.12s; }
.pcw-clauses-list .pcw-clause-card:nth-child(4)  { animation-delay: 0.16s; }
.pcw-clauses-list .pcw-clause-card:nth-child(5)  { animation-delay: 0.20s; }
.pcw-clauses-list .pcw-clause-card:nth-child(n+6){ animation-delay: 0.24s; }

@keyframes pcw-card-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0);   }
}

/* ── titre de la card ──────────────────────────────────────────── */
.pcw-clause-card-title {
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--pcw-navy);
  padding: 10px 14px 8px;
  border-bottom: 1px solid rgba(27,37,89,0.07);
  background: linear-gradient(to bottom, #F7F9FF, #F0F3FB);
  line-height: 1.45;
}

/* la sévérité inline reste en gris clair, on la distingue */
.pcw-clause-card-title span {
  font-family: system-ui, sans-serif;
  font-size: 11px;
  color: var(--pcw-label-color);
  font-weight: 400;
  letter-spacing: 0;
}

/* ── formulaire de la card ─────────────────────────────────────── */
.pcw-clause-form {
  padding: 10px 14px 8px;
}

/* ── ligne label + champ ───────────────────────────────────────── */
.pcw-field-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 7px;
}

.pcw-field-label {
  width: 76px;
  min-width: 76px;
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  font-weight: bold;
  color: var(--pcw-label-color);
  padding-top: 7px;
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
  /* séparateur vertical subtil */
  /*border-right: 1px solid rgba(27,37,89,0.10);*/
  padding-right: 10px;
}

.pcw-field-input {
  flex: 1;
  min-width: 0;
}

.pcw-btn-reextract {
  border: 2px solid rgba(27, 37, 89, 0.15);
}

/* ── inputs / textareas ────────────────────────────────────────── */
.pcw-clause-form input[type="text"],
.pcw-clause-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid transparent;
  border-bottom: 1px solid rgba(27,37,89,0.14);
  border-radius: 0;
  background: transparent;
  padding: 5px 4px;
  font-size: 14px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--pcw-text);
  line-height: 1.5;
  transition:
    border-color 160ms ease,
    background   160ms ease,
    box-shadow   160ms ease;
  resize: vertical;
  outline: none;
}

/* mode édition : champ activé visuellement */
.pcw-clause-form input[type="text"]:not([readonly]):focus,
.pcw-clause-form textarea:not([readonly]):focus {
  background: #F0F4FF;
  border-color: var(--ia-primary);
  border-radius: var(--pcw-radius-sm);
  box-shadow: 0 0 0 3px rgba(61, 100, 237, 0.12);
}

.pcw-clause-form input[type="text"]:not([readonly]):hover,
.pcw-clause-form textarea:not([readonly]):hover {
  border-bottom-color: var(--pcw-navy-mid);
  background: rgba(61,100,237,0.03);
}

/* mode lecture : épuré, non-interactif */
.pcw-clause-form input[readonly],
.pcw-clause-form textarea[readonly] {
  background: transparent;
  color: var(--pcw-text-soft);
  cursor: default;
  border-bottom-color: transparent;
}

.pcw-field-input textarea {
	font-family: 'Inter', sans-serif;
	font-size: 13px;
	line-height: 1.6;
}

/* ── états vide / erreur ───────────────────────────────────────── */
.pcw-empty {
  color: var(--pcw-label-color);
  padding: 40px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-style: italic;
}

/* ── footer scoped dans pcw-panel ──────────────────────────────── */
  .pcw-footer {
    min-height: 52px;                                                                                                                                                                     
    padding: 12px;                                      
    border-top: 1px solid rgb(174, 185, 207);
    flex-shrink: 0;
    display: flex;                                                                                                                                                                        
    justify-content: center;
    align-items: center;                                                                                                                                                                  
    gap: 8px;                                           
  }



.pcw-error {
  color: #B91C1C;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  background: #FEF2F2;
  border-left: 3px solid #EF4444;
  margin: 16px;
  border-radius: var(--pcw-radius-sm);
}

  .pcw-add-clause-bar {
    flex-shrink: 0;                                                                                                                                                                       
    padding: 12px 20px;
    border-top: 1px solid rgba(27,37,89,0.12);                                                                                                                                            
    background: linear-gradient(to bottom, #ECEFFE, #E8EBFA);                                                                                                                                                                  
    color: #1B2559;
    font-size: 13px;                                                                                                                                                                      
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    cursor: pointer;                                                                                                                                                                      
    display: flex;                                      
    align-items: center;                                                                                                                                                                  
    gap: 8px;                                           
    transition: background 150ms ease;
  }                                                                                                                                                                                       
  
  .pcw-add-clause-bar:hover {                                                                                                                                                             
    background: #EEF1FB;                                
  }                                                                                                                                                                                       
  
  .pcw-add-clause-plus {                                                                                                                                                                  
    font-size: 18px;                                    
    font-weight: 300;
    color: #C8922A;                                                                                                                                                                       
    line-height: 1;
  }
  
    .pcw-btn {
    display: inline-flex;                                                                                                                                                                 
    align-items: center;                                
    justify-content: center;
    padding: 0 16px;
    height: 32px;                                                                                                                                                                         
    border-radius: 4px;
    font-size: 13px;                                                                                                                                                                      
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    cursor: pointer;                                                                                                                                                                      
    user-select: none;                                  
    transition: background 150ms ease;                                                                                                                                                    
  }                                                                                                                                                                                       
  
  .pcw-btn-validate {                                                                                                                                                                     
    background: #EDEff5;                                
    color: #333333;                                                                                                                                                                       
    border: 1px solid rgba(27,37,89,0.2);
  }                                                                                                                                                                                       
                                                        
  .pcw-btn-validate:hover {                                                                                                                                                               
    background: #DDE1F0;                                
  }                                                                                                                                                                                       
  
  .pcw-btn-close {                                                                                                                                                                        
    background: transparent;                            
    color: #4A5068;
    border: 1px solid rgba(27,37,89,0.15);                                                                                                                                                
  }
                                                                                                                                                                                          
  .pcw-btn-close:hover {
    background: rgba(27,37,89,0.06);
  }

/* ── status zones (in-progress / failed) ──────────────────────── */
.pcw-status-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 40px 24px;
}

.pcw-status-message {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--pcw-text-soft);
  padding: 20px 24px;
  background: var(--pcw-card-bg);
  border-radius: var(--pcw-radius);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.pcw-status-error {
  color: #B91C1C;
  background: #FEF2F2;
  border-left: 3px solid #B91C1C;
}

.pcw-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--pcw-divider);
  border-top-color: var(--pcw-navy);
  border-radius: 50%;
  animation: pcw-spin 0.8s linear infinite;
}

.ia-footer-back-btn-hidden {
    display: none !important;
}

@keyframes pcw-spin {
  to { transform: rotate(360deg); }
}

.softlaw-tab-icon {
    background-image: url("../img/iapanel/ia-assistant-generalaction-pic.svg");
}



/* open pdf button */

.attached-file-card {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 10px;
    background: #f1f1f3;
    border-radius: 12px;
}

.attached-file-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-view-button {
    flex-shrink: 0;
    padding: 5px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #304287;
    color: #304287;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.file-remove-button {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.file-remove-button:hover {
    background: #fee2e2;
    color: #dc2626;
}

.file-view-button:hover {
    background: #304287;
    border-color: #304287;
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 6px 14px rgba(109, 40, 217, .22);
}
.attached-file-card:hover {
    background: #f8f7ff;
    border-color: #ddd6fe;
}

/* ============================================
   SPLIT CONTAINER — panneau IA en mode split
   ============================================ */
.ia-split-container {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
}

/* Slot droit (chat) — prend tout l'espace par défaut */
.ia-split-right-slot {
    flex: 1;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ============================================
   DOC VIEWER — cachée par défaut
   ============================================ */
.ia-doc-viewer-panel {
    display: none;
    flex: 0 0 60%;
    height: 100%;
    flex-direction: column;
    border-right: 2px solid #e5e7eb;
    background: #fff;
    overflow: hidden;
}

/* Mode split actif — la visionneuse apparaît */
.ia-split-active .ia-doc-viewer-panel {
    display: flex;
}

/* Mode split actif — le chat rétrécit à 40% */
.ia-split-active .ia-split-right-slot {
    flex: 0 0 40%;
    min-width: 280px;
}

/* ============================================
   HEADER DE LA VISIONNEUSE
   ============================================ */
.ia-doc-viewer-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 6px 10px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
    height: 36px;
    box-sizing: border-box;
}

/* ============================================
   BOUTON ✕ FERMER
   ============================================ */
.ia-doc-viewer-close-btn {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    padding: 4px 12px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    text-decoration: none;
    line-height: 1.4;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.ia-doc-viewer-close-btn:hover {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
    text-decoration: none;
}

/* ============================================
   IFRAME PDF.JS
   ============================================ */
.ia-doc-viewer-frame {
    width: 100%;
    flex: 1;
    border: none;
    display: block;
}

.pcw-panel .pcw-clause-card .ls-combo-styled.x-item-disabled .x-form-trigger
 {
    visibility: hidden;
}
.pcw-panel .pcw-clause-card .pcw-delete-clause-btn.x-item-disabled {
	display: none;
	
	}
/* ══════════════════════════════════════════════════════════════════════════
   Phase 2 block — éléments du playbook non couverts
   Displayed in the report header, after stats, before conclusion.
   ══════════════════════════════════════════════════════════════════════════ */

.phase2-block {
    background: #fff8e1;
    border-left: 4px solid #f57f17;
    border-radius: 0 8px 8px 0;
    padding: 16px 20px;
    margin-bottom: 16px;
}

.phase2-title {
    font-size: 1rem;
    font-weight: 600;
    color: #e65100;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.phase2-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.phase2-item {
    background: #fff;
    border: 1px solid #ffe082;
    border-radius: 6px;
    padding: 10px 14px;
}

.phase2-rule {
    font-weight: 600;
    color: #333;
    display: block;
    margin-bottom: 4px;
}

.phase2-risk {
    font-size: .85rem;
    color: #c62828;
    margin-top: 4px;
}

.phase2-action {
    font-size: .85rem;
    color: #555;
    margin-top: 4px;
}

/* ══════════════════════════════════════════════════════════════════════════
   Conclusion block — synthèse de conformité
   Displayed after phase 2 block, before the clauses table.
   ══════════════════════════════════════════════════════════════════════════ */

.conclusion-block {
    background: #f0f4ff;
    border-left: 4px solid #1a73e8;
    border-radius: 0 8px 8px 0;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.conclusion-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a557a;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.conclusion-body {
    font-size: .9rem;
    color: #333;
    line-height: 1.7;
}
.ia-sources-block {
    margin-top: 8px;
    border-top: 1px solid #e2e8f0;
    padding-top: 8px;
}
 
.ia-sources-block-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
 
.ia-sources-block-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
 
.ia-source-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
 
.ia-source-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 2px 8px rgba(37,99,235,0.08);
}
 
.ia-source-card--active {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
}
 
.ia-source-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}
 
.ia-source-card-badge {
    background: #2563eb;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}
 
.ia-source-card-docname {
    font-size: 12px;
    font-weight: 600;
    color: #1e3a5f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
 
.ia-source-card-text {
    font-size: 12px;
    color: #475569;
    display: block;
    margin-bottom: 8px;
    line-height: 1.5;
}
 
.ia-source-card-link {
    font-size: 12px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}
 
.ia-source-card-link:hover {
    text-decoration: underline;
}
/* ═══════════════════════════════════════════════════════════
   SOURCES BLOCK — conteneur principal
   ═══════════════════════════════════════════════════════════ */

.ia-sources-block {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

.ia-sources-block-header {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 8px;
    color: #64748b;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ia-sources-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ═══════════════════════════════════════════════════════════
   SOURCE CARD — carte individuelle
   ═══════════════════════════════════════════════════════════ */

.ia-source-card {
    background: #ffffff;
    border: 0.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    cursor: default;
}

.ia-source-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.07);
}

/* ── État actif : carte sélectionnée ── */
.ia-source-card--active {
    background: #eff6ff !important;
    border: 1.5px solid #2563eb !important;
    border-left: 3px solid #2563eb !important;
    border-radius: 10px;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08) !important;
}

/* ── Carte masquée (sources supplémentaires) ── */
.ia-source-card--hidden {
    display: none;
}

/* ═══════════════════════════════════════════════════════════
   HEADER DE LA CARTE
   ═══════════════════════════════════════════════════════════ */

.ia-source-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    gap: 8px;
}

.ia-source-card-header-left {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0; /* permet le text-overflow sur le nom */
    flex: 1;
}

/* Numéro badge bleu rond */
.ia-source-badge {
    background: #2563eb;
    color: #ffffff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    min-width: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 500;
    flex-shrink: 0;
    line-height: 1;
}

/* Nom du document */
.ia-source-docname {
    font-size: 12px;
    font-weight: 500;
    color: #1e3a5f;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Badge "Document" à droite */
.ia-source-card-type {
    font-size: 11px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 0;
    gap: 2px;
}

/* ═══════════════════════════════════════════════════════════
   EXTRAIT DU TEXTE SOURCE
   ═══════════════════════════════════════════════════════════ */

.ia-source-excerpt {
    font-size: 12px;
    color: #64748b;
    margin: 0 0 8px 0;
    line-height: 1.55;
    word-break: break-word;
}

/* Citation stylée sur carte active */
.ia-source-card--active .ia-source-excerpt {
    color: #334155;
    border-left: 2px solid #93c5fd;
    padding-left: 8px;
    font-style: italic;
    margin-left: 0;
}

/* ═══════════════════════════════════════════════════════════
   BOUTON "VOIR DANS LE DOCUMENT"
   ═══════════════════════════════════════════════════════════ */

.ia-source-view-btn-wrapper {
    cursor: pointer;
    display: inline-block;
}

.ia-source-view-btn {
    font-size: 12px;
    color: #2563eb;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    user-select: none;
}

.ia-source-view-btn-wrapper:hover .ia-source-view-btn {
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════
   BOUTON "VOIR PLUS DE SOURCES"
   ═══════════════════════════════════════════════════════════ */

.ia-sources-show-more {
    text-align: center;
    padding: 6px 0 2px;
}

.ia-sources-show-more-btn {
    font-size: 12px;
    color: #2563eb;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    user-select: none;
}

.ia-sources-show-more-btn:hover {
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════
   TOAST "PASSAGE NON LOCALISÉ" — affiché sur le viewer PDF
   (injecté dynamiquement via JS, pas via GWT)
   ═══════════════════════════════════════════════════════════ */

#ia-viewer-toast {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #f97316;
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-family: system-ui, sans-serif;
    z-index: 9999;
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.35);
    pointer-events: none;
    white-space: nowrap;
    transition: opacity 0.5s ease;
}

/* ═══════════════════════════════════════════════════════════
   VIEWER DOC — conteneur split
   ═══════════════════════════════════════════════════════════ */

.ia-doc-viewer-panel {
    position: relative; /* nécessaire pour le toast en absolute */
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.ia-doc-viewer-header {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    flex-shrink: 0;
}

.ia-doc-viewer-close-btn {
    font-size: 12px;
    color: #64748b;
    text-decoration: none;
    cursor: pointer;
}

.ia-doc-viewer-close-btn:hover {
    color: #1e3a5f;
    text-decoration: underline;
}

.ia-doc-viewer-frame {
    flex: 1;
    width: 100%;
    height: 100%;
    border: none;
}

/* ── Header cliquable avec toggle ── */
.ia-sources-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    padding: 2px 0;
}
.ia-sources-block-header:hover { opacity: 0.8; }

.ia-sources-header-left {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #64748b;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ia-sources-toggle-btn {
    color: #94a3b8;
    display: flex;
    align-items: center;
    cursor: pointer;
}

/* ── Nom document en ellipsis ── */
.ia-source-docname {
    font-size: 12px;
    font-weight: 500;
    color: #1e3a5f;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px; /* tronque si trop long */
}