/* Papirus Live Chat - TEST */
:root {
  --pap-chat-green: #087843;
  --pap-chat-green-dark: #056336;
  --pap-chat-bg: #ffffff;
  --pap-chat-text: #17231c;
  --pap-chat-muted: #718078;
  --pap-chat-border: #e2e9e4;
}

.pap-chat {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 99990;
  font-family: Inter, Arial, sans-serif;
  color: var(--pap-chat-text);
}

.pap-chat * {
  box-sizing: border-box;
}

.pap-chat-launcher {
  width: 62px;
  height: 62px;
  border: 0;
  border-radius: 50%;
  background: var(--pap-chat-green);
  color: #fff;
  box-shadow: 0 8px 28px rgba(0, 70, 32, .24);
  cursor: pointer;
}

.pap-chat-panel {
  width: 380px;
  height: min(590px, calc(100dvh - 110px));
  display: flex;
  flex-direction: column;
  background: var(--pap-chat-bg);
  border: 1px solid var(--pap-chat-border);
  border-radius: 18px;
  box-shadow: 0 18px 60px rgba(18, 35, 23, .18);
  overflow: hidden;
}

.pap-chat-header {
  padding: 19px;
  background: var(--pap-chat-green);
  color: #fff;
}

.pap-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  background: #f7faf8;
}

.pap-chat-bubble {
  max-width: 84%;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #fff;
  border: 1px solid var(--pap-chat-border);
}

.pap-chat-bubble--visitor {
  margin-left: auto;
  background: var(--pap-chat-green);
  color: #fff;
  border-color: var(--pap-chat-green);
}

.pap-chat-compose {
  display: flex;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--pap-chat-border);
  background: #fff;
}

.pap-chat-input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--pap-chat-border);
  border-radius: 12px;
  padding: 12px;
  font: inherit;
  resize: none;
}

.pap-chat-send {
  border: 0;
  border-radius: 12px;
  padding: 0 18px;
  background: var(--pap-chat-green);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.pap-chat-send:hover,
.pap-chat-launcher:hover {
  background: var(--pap-chat-green-dark);
}

.pap-chat button:focus-visible,
.pap-chat textarea:focus-visible {
  outline: 3px solid #92dab0;
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .pap-chat {
    right: 12px;
    bottom: 12px;
  }

  .pap-chat-panel {
    width: calc(100vw - 24px);
    height: min(680px, calc(100dvh - 24px));
    border-radius: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pap-chat *,
  .pap-chat *::before,
  .pap-chat *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Papirus Chat UI - ajustari PASUL 41 */

@media (min-width: 601px) {
  .pap-chat-panel {
    width: 400px;
  }
}

.pap-chat-panel:not([hidden]) + .pap-chat-launcher {
  display: none;
}

.pap-chat-messages {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.pap-chat-bubble {
  flex: 0 0 auto;
  margin-bottom: 0;
  padding: 10px 13px;
  line-height: 1.45;
  font-size: 14px;
  border-radius: 14px 14px 14px 4px;
}

.pap-chat-bubble--visitor {
  align-self: flex-end;
  margin-left: 0;
  border-radius: 14px 14px 4px 14px;
}

.pap-chat-input {
  min-height: 46px;
  max-height: 110px;
  font-size: 14px;
}

.pap-chat-send {
  font-size: 14px;
}

@media (max-width: 600px) {
  .pap-chat-panel {
    max-width: 100%;
  }
}

/* PAPIRUS CHAT INPUT FIX 116 */
.pap-chat .pap-chat-input {
    box-sizing: border-box;
    display: block;
    min-width: 0;
    min-height: 48px;
    padding: 13px 12px;
    line-height: 20px;
    color: #24352b;
    background: #ffffff;
    opacity: 1;
    resize: vertical;
}

.pap-chat .pap-chat-input::placeholder {
    color: #68786f;
    opacity: 1;
}

.pap-chat .pap-chat-input::-webkit-input-placeholder {
    color: #68786f;
    opacity: 1;
}

.pap-chat .pap-chat-input:focus {
    color: #24352b;
    background: #ffffff;
}

/* PAPIRUS INPUT FIX 118 - Safari */
.pap-chat textarea.pap-chat-input {
    box-sizing: border-box;
    flex: 1 1 auto;
    width: 100%;
    height: 54px;
    min-height: 54px;
    max-height: 100px;
    padding: 15px 12px;
    line-height: 22px;
    font-size: 14px;
    color: #24352b;
    background-color: #fff;
    overflow-y: auto;
    resize: none;
    -webkit-appearance: none;
    appearance: none;
}

.pap-chat textarea.pap-chat-input::placeholder {
    color: #65756b;
    opacity: 1;
}

/* PAPIRUS INPUT FINAL FIX 120 */
.pap-chat .pap-chat-compose {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pap-chat textarea.pap-chat-input {
    box-sizing: border-box;
    display: block;
    flex: 1 1 0%;
    width: auto;
    min-width: 0;
    height: 52px;
    min-height: 52px;
    max-height: 110px;
    margin: 0;
    padding: 14px 12px;
    line-height: 22px;
    font-size: 14px;
    color: #24352b;
    background: #fff;
    border-radius: 12px;
    resize: none;
    overflow-y: auto;
    vertical-align: middle;
    -webkit-appearance: none;
    appearance: none;
}

.pap-chat textarea.pap-chat-input::placeholder {
    color: #65756b;
    opacity: 1;
}

.pap-chat textarea.pap-chat-input::-webkit-input-placeholder {
    color: #65756b;
    opacity: 1;
}

/* PAPIRUS SEND BUTTON FIX 121 */
.pap-chat .pap-chat-compose .pap-chat-send {
    box-sizing: border-box;
    display: inline-flex;
    flex: 0 0 86px;
    align-items: center;
    justify-content: center;
    align-self: center;
    width: 86px;
    min-width: 86px;
    height: 52px;
    min-height: 52px;
    margin: 0;
    padding: 0 12px;
    border: 0;
    border-radius: 12px;
    background: #087b45;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    white-space: nowrap;
    text-align: center;
    cursor: pointer;
}

.pap-chat .pap-chat-compose .pap-chat-send:hover {
    background: #066638;
}

.pap-chat .pap-chat-compose .pap-chat-send:disabled {
    opacity: 0.65;
    cursor: wait;
}


/* PAPIRUS PHONE CONTACT FORM 142 */
.pap-chat .pap-chat-contact {
    padding: 18px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 9px;
    overflow-y: auto;
    min-height: 0;
    flex: 1 1 auto;
}
.pap-chat .pap-chat-contact[hidden],
.pap-chat .pap-chat-messages[hidden],
.pap-chat .pap-chat-compose[hidden] {
    display: none !important;
}
.pap-chat .pap-chat-contact strong {
    font-size: 17px;
    color: #183b2a;
}
.pap-chat .pap-chat-contact p {
    margin: 2px 0 7px;
    font-size: 13px;
    color: #52675b;
}
.pap-chat .pap-chat-contact label {
    font-size: 13px;
    font-weight: 600;
    color: #24352b;
}
.pap-chat .pap-chat-contact input {
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #cddbd2;
    border-radius: 9px;
    font-size: 14px;
    color: #24352b;
    background: #fff;
}
.pap-chat .pap-chat-contact input:focus {
    outline: 2px solid #8bd6aa;
}
.pap-chat .pap-chat-contact .pap-chat-contact-note {
    font-size: 11px;
    margin-top: 4px;
}
.pap-chat .pap-chat-contact .pap-chat-contact-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border: 0;
    border-radius: 9px;
    background: #087b45;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.pap-chat .pap-chat-contact .pap-chat-contact-submit:disabled {
    opacity: .65;
    cursor: wait;
}
/* PAPIRUS MOBILE PRIVACY TEXT 164 */
.pap-chat .pap-chat-contact .pap-chat-contact-note {
    font-size: 12px;
    line-height: 1.5;
    color: #52675b;
    margin: 8px 0;
}
.pap-chat .pap-chat-contact .pap-chat-contact-note a {
    color: #087b45;
    text-decoration: underline;
    font-weight: 600;
}

/* PAPIRUS CHAT STORE FIX 176 */

/* Respectam atributul hidden indiferent de CSS-ul magazinului. */
.pap-chat .pap-chat-panel[hidden],
.pap-chat .pap-chat-contact[hidden],
.pap-chat .pap-chat-messages[hidden],
.pap-chat .pap-chat-compose[hidden] {
    display: none !important;
}

/* Panou deschis - aranjare corecta. */
.pap-chat .pap-chat-panel:not([hidden]) {
    display: flex;
    flex-direction: column;
}

/* Titlu in stanga, inchidere in dreapta. */
.pap-chat .pap-chat-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.pap-chat .pap-chat-header .pap-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

/* Butonul de lansare este ascuns cat timp fereastra e deschisa. */
.pap-chat .pap-chat-panel:not([hidden]) + .pap-chat-launcher {
    display: none !important;
}

/* Reglaj pentru telefoane. */
@media (max-width: 600px) {
    .pap-chat {
        position: fixed;
        right: 12px;
        bottom: 12px;
        left: auto;
        z-index: 99990;
    }

    .pap-chat .pap-chat-panel {
        width: calc(100vw - 24px);
        max-width: 400px;
        height: min(620px, calc(100dvh - 24px));
        max-height: calc(100dvh - 24px);
        margin: 0;
    }

    .pap-chat .pap-chat-contact,
    .pap-chat .pap-chat-messages {
        min-height: 0;
        overflow-y: auto;
    }
}

/* PAPIRUS CHAT LAUNCHER ICON FIX 178 */
.pap-chat .pap-chat-launcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
  text-align: center;
}

@media (max-width: 600px) {
  .pap-chat .pap-chat-launcher {
    font-size: 30px;
  }
}

/* PAPIRUS CHAT CLOSED STATE 186 */
.pap-chat .pap-chat-closed[hidden] {
  display: none !important;
}

.pap-chat .pap-chat-closed {
  padding: 16px;
  background: #f2f8f4;
  border-top: 1px solid #dcebe1;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.pap-chat .pap-chat-closed strong {
  color: #145a36;
  font-size: 15px;
}

.pap-chat .pap-chat-closed p {
  margin: 0;
  color: #4b6456;
  font-size: 13px;
  line-height: 1.5;
}

.pap-chat .pap-chat-new-conversation {
  display: block;
  width: 100%;
  min-height: 45px;
  border: 0;
  border-radius: 9px;
  background: #087b45;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.pap-chat .pap-chat-new-conversation:disabled {
  opacity: .6;
  cursor: wait;
}

/* PAPIRUS CLIENT UNREAD 202 */
.pap-chat .pap-chat-launcher {
  position: relative;
}

.pap-chat .pap-chat-notification {
  position: absolute;
  top: -5px;
  right: -5px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 23px;
  height: 23px;
  padding: 0 5px;
  border: 2px solid white;
  border-radius: 99px;
  background: #e22c3d;
  color: #fff;
  font: 700 12px/1 Arial, sans-serif;
  pointer-events: none;
}

.pap-chat .pap-chat-notification[hidden] {
  display: none !important;
}


/* PAPIRUS VISITOR AVAILABILITY 241 */
.pap-chat .pap-chat-availability {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.4;
    color: rgba(255, 255, 255, .9);
}

.pap-chat .pap-chat-availability-dot {
    display: inline-block;
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e5e7eb;
}

.pap-chat .pap-chat-availability--online
.pap-chat-availability-dot {
    background: #9cf2b4;
    box-shadow: 0 0 0 2px rgba(156, 242, 180, .2);
}

.pap-chat .pap-chat-availability--offline
.pap-chat-availability-dot {
    background: #ffd18b;
}