@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css');
        
 
h1 {
    margin-bottom: 20px;
}
.search-container {
    position: relative;
    width: 95%;
    margin:0 auto;
}
.search-input {
    width: calc(100% - 90px);  
    padding: 15px 75px 15px 40px;
    border-radius: 25px !important;
    border: 1px solid #ccc;
    outline: none;
    font-size: 16px;
} 
.search-icon, .search-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #aaa;
    cursor: pointer;
}
.search-icon {
    left: 10px;
}
.search-button {
    right: 30px;
}
.search-button:hover {
    color: #333;
}
.microphone-container {
    position: absolute;
    right: -14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer; 
    width: 35px;
    height: 35px;
    border-radius: 50% !important;
    background-color: rgba(0, 0, 0, 0.1);
}
.microphone-icon {
    font-size: 20px;
    color: #aaa;
    padding-top:8px;
    padding-left:10px;
}
.recording .microphone-icon {
    color: #fff;
    background-color: #ff0000; /* Roșu */
    border-radius: 50% !important;
}
.recording::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
    background-color: rgba(255, 0, 0, 0.2); 
    z-index: -1;
    animation: pulseRed 1s infinite;
}
.recording::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50% !important;
    background-color: rgba(0, 0, 0, 0.1); 
    z-index: -2;
    animation: pulseGrey 1s infinite;
}
@keyframes pulseRed {
    0% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}
@keyframes pulseGrey {
    0% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}
#status, #result, #result2 {
    margin-top: 2px;
    font-size: 16px;
}
#audio-player {
    margin-top: 20px;
}
body {
    background-image: url(https://www.ilegis.ro/assets/admin/layout2/img/bg-6-full.png) !important;
}

#result, #result2 {
    box-shadow: rgba(17, 17, 26, 0.05) 0px 4px 16px, rgba(17, 17, 26, 0.05) 0px 8px 32px;
    padding:20px;
    background:#fff;
}
#chat-act-panel {
position: fixed;
top: 0;
right: -100vw; /* ascuns inițial */
width: 100%; /* max 70% din lățimea ecranului */
max-width: 1400px; /* să nu depășească 600px pe desktop */
height: 100vh;
background: #fff;
box-shadow: -2px 0 12px rgba(0,0,0,0.25); 
display: flex;
flex-direction: column;
transition: right 0.4s ease;
}

body.drawer-opened #chat-act-panel {
right: 0;
}


body.drawer-opened #main-contentX {
transform: translateX(-700px);
transition: transform 0.4s ease;
}
#main-contentX {
transform: translateX(0);
transition: transform 0.4s ease;
}
#demo-questions ul {
list-style:none;
}
#act-text-panel1 {
transform: translateX(-100%);
transition: transform 0.4s ease, opacity 0.4s ease;
opacity: 0;
}

body.drawer-opened.act-visible #act-text-panel1 {
transform: translateX(0);
opacity: 1;
}

#chat-chat {
    height: 100vh;
    display: flex;
    flex-direction: column;
  }
  
  .chatul {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
  }
  
  /* Header fix */
  #chat-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #f7f7f7;
    border-bottom: 1px solid #ccc;
    padding: 10px;
  }
  
  /* Mesaje cu scroll */
  #chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    padding-bottom: 60px;
  }
  
  /* Input bar jos */
  #chat-input-bar {
    position: sticky;
    bottom: 0;
    background: white;
    border-top: 1px solid #ccc;
    padding: 10px;
    display: flex;
    z-index: 10;
  }
  
  #act-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #f7f7f7;
    border-bottom: 1px solid #ccc;
    padding: 11px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
  }
  
  #act-toolbar {
    position: sticky;
    top: 48px; /* ajustat în funcție de înălțimea headerului */
    z-index: 9;
    background: #f7f7f7;
    padding: 4px 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    border-bottom: 1px solid #ddd;
  }
  #act-text-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  
  
#demo-questions ul li {
background-color: #f9f9f9;
margin-bottom: 3px;
padding: 4px 6px;
border-radius: 8px !important;
transition: background-color 0.2s ease, box-shadow 0.2s ease;
font-size: 12px;
line-height: 1.2;
border: 1px solid #e0e0e0;
}
body.drawer-opened:not(.act-visible) #chat-act-panel1 {
max-width: 600px;
}
body.drawer-opened:not(.act-visible) #act-text-panel1 {
max-width: 600px; display: none !important;
} 

body.drawer-opened:not(.act-visible) body.drawer-opened #main-contentX { 
transform: translateX(-300px) !important;
transition: transform 0.4s ease;
}
#demo-questions ul li:hover {
background-color: #eef3fb;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
border-color: #c4d7f2;
cursor: pointer;
}

.btn-apple-blue,
.btn-apple-green,
.btn-apple-purple {
display: inline-block;
margin: 6px 4px;
padding: 4px 8px;
font-size: 12.5px;
font-weight: 500;
color: white;
border: none;
border-radius: 8px !important;
text-decoration: none;
box-shadow: 0 3px 6px rgba(0,0,0,0.1);
transition: all 0.15s ease-in-out;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.btn-apple-blue {
background-color: #007aff;
}
.btn-apple-blue:hover {
background-color: #0066cc;
box-shadow: 0 5px 10px rgba(0,0,0,0.12);
}

.btn-apple-green {
background-color: #34c759;
}
.btn-apple-green:hover {
background-color: #28a745;
box-shadow: 0 5px 10px rgba(0,0,0,0.12);
}

.btn-apple-purple {
background-color: #8e44ad;
}
.btn-apple-purple:hover {
background-color: #732d91;
box-shadow: 0 5px 10px rgba(0,0,0,0.12);
}

.loader-spinner {
display: inline-block;
width: 18px;
height: 18px;
border: 2px solid rgba(0,0,0,0.15);
border-top-color: #007aff;
border-radius: 50% !important;
animation: spin 0.7s linear infinite;
margin-right: 6px;
vertical-align: middle;
}

@keyframes spin {
to { transform: rotate(360deg); }
}

 
.chatAi {
    display: flex;
    width: 100%;
    height: 100%;  
  }
  
 
  .chat2 {
    flex: 0 0 60%;
    max-width: 60%;
  }
  
  .chat3 {
    flex: 0 0 40%;
    max-width: 40%;
  }
  
  
#result, #result2 {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}
.butoaneRez {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: flex-end;
}
.mr-2 {margin-right: 10px;}
.headerstrip-titlu {  
text-align: justify; 
}
#main-contentX {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; 
}


.chat-history-entry {
    transition: background-color 0.2s ease;
    cursor: pointer;
  }
  
  .chat-history-entry:hover {
    background-color: #eef2ff;
  }
  
  .chat-history-entry:active {
    background-color: #dbe4ff;
  }
  
.loader-dots {
width: 15px;
aspect-ratio: 1;
border-radius: 50% !important;
animation: l5 1s infinite linear alternate;
}
@keyframes l5 {
0%  {box-shadow: 20px 0 #000, -20px 0 #0002;background: #000 }
33% {box-shadow: 20px 0 #000, -20px 0 #0002;background: #0002}
66% {box-shadow: 20px 0 #0002,-20px 0 #000; background: #0002}
100%{box-shadow: 20px 0 #0002,-20px 0 #000; background: #000 }
}

.typing-indicator {
display: flex;
gap: 4px;
align-items: center;
justify-content: flex-start;
}

.typing-indicator span {
width: 6px;
height: 6px;
background-color: #666;
border-radius: 50% !important;
animation: blink 1.2s infinite;
}

.typing-indicator span:nth-child(2) {
animation-delay: 0.2s;
}
.typing-indicator span:nth-child(3) {
animation-delay: 0.4s;
}

@keyframes blink {
0%, 80%, 100% { opacity: 0.3; transform: scale(1); }
40% { opacity: 1; transform: scale(1.4); }
}
#chat-messages {
display: flex;
flex-direction: column;
}

.swal2-container { 
z-index: 9999 !important;
}
.copy-btn {
background: none;
border: none;
font-size: 16px;
color: #666;
cursor: pointer;
opacity: 0;
transition: opacity 0.2s ease, color 0.2s ease;
margin-top: 4px;
pointer-events: none; /* prevenim click din greșeală când e invizibil */
}

.copy-btn:hover {
color: #007aff;
}
#gpt-link-container {text-align:center;}
#result, #result2 {border-radius:5px !important;}

.bubble-copy-wrapper:hover .copy-btn {
opacity: 1;
pointer-events: auto;
} 
/* General condensed MUI-like */
#act-toolbar {
font-family: 'Roboto', sans-serif;
font-size: 13px;
}

/* Compact input stil MUI */
.mdl-textfield__input {
height: 26px;
font-size: 13px;
padding: 4px 6px;
border: 1px solid #ccc;
border-radius: 4px !important;
outline: none;
background: white;
box-sizing: border-box;
}

.mdl-textfield__label {
font-size: 11px;
color: #777;
top: -8px;
position: relative;
display: block;
line-height: 1;
padding: 0 2px;
}

/* Compact button stil MUI */
button.mdl-button {
height: 28px !important;
line-height: 28px !important;
font-size: 13px !important;
padding: 0 10px !important;
min-width: 36px !important;
}

/* Optional: icon-only buttons */
.mdl-button--icon i.material-icons {
font-size: 18px;
vertical-align: middle;
}

/* Fix align middle for icon+text */
.mdl-button i.material-icons {
font-size: 16px;
margin-right: 4px;
vertical-align: middle;
}

/* Hover effect similar MUI */
button.mdl-button:hover {
background-color: #e3f2fd;
color: #1976d2;
}
.highlight-hover {
position: relative;
border: 2px dashed #2597ce;
border-radius: 6px !important;
padding: 6px;
background: #f0faff;
transition: border 0.2s ease;
}
/* EVIDENȚIERE LA HOVER PE .S_ART, .S_ALN, .S_LIT */
.interpret-highlight {
position: relative;
border: 2px dashed #2597ce;
border-radius: 6px !important;
background-color: #f0faff;
box-shadow: 0 0 8px rgba(37, 151, 206, 0.2);
transition: all 0.25s ease-in-out;
}

/* BUTON AI – ELEGANT, FUTURIST */
.ai-interpret-btn {
position: absolute;
top: 6px;
right: 6px;
background: linear-gradient(135deg, #2597ce, #6ac6ff);
color: white;
font-size: 11px;
padding: 5px 10px;
border: none;
border-radius: 16px !important;
cursor: pointer;
z-index: 10;
display: none;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
font-weight: bold;
text-transform: uppercase;
letter-spacing: 0.5px;
font-family: 'Segoe UI', sans-serif;
transition: opacity 0.2s ease;
}

/* EFECT LA HOVER PE BUTON */
.ai-interpret-btn:hover {
background: linear-gradient(135deg, #1f7db0, #4ab5f7);
}

/* TOOLTIP INTEGRAT ÎN BUTON */
.ai-interpret-btn::after {
content: attr(data-tooltip);
visibility: hidden;
background-color: #333;
color: #fff;
font-size: 12px;
padding: 6px 8px;
border-radius: 6px !important;
position: absolute;
top: -38px;
right: 0;
white-space: nowrap;
opacity: 0;
transition: opacity 0.3s ease;
z-index: 999;
pointer-events: none;
}

.ai-interpret-btn:hover::after {
visibility: visible;
opacity: 1;
}

