﻿
		/* ============ PSM Support Widget Base (REQUIRED) ============ */
.psm-support, .psm-support * { box-sizing: border-box; font-family: inherit; }
.psm-support{ direction: rtl; }

.psm-support__fab{
  position: fixed;
  bottom: 96px;
  right: 24px;
  left: auto;
  height: 56px;
  width: 56px;
  border-radius: 999px;
  border: none;
  background: #176b5b;
  color: #fff;
  cursor: pointer;
  z-index: 999999; /* یکم بالاتر */
  box-shadow: 0 10px 25px rgba(0,0,0,.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease, box-shadow .2s ease;
  overflow: visible;
}

.psm-support__fab:hover{
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,0,0,.22);
}

.psm-support__icon{
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
}

/* Hover label */
.psm-support__label{
  position: absolute;
  right: 60px;
  left: auto;
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  background: rgba(0,0,0,.18);
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 13px;
  transition: opacity .2s ease, transform .2s ease;
}
.psm-support__fab:hover .psm-support__label{
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Panel base */
.psm-support__panel{
  position: fixed;
  bottom: 92px;
  right: 24px;
  left: auto;
  width: 360px;
  max-width: calc(100vw - 48px);
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  z-index: 999999;
  box-shadow: 0 18px 50px rgba(0,0,0,.18);
  transform: translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.psm-support__panel.is-open{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.psm-support__header{
  background: linear-gradient(135deg, #176b5b, #1f8a75);
  color: #fff;
  padding: 14px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.psm-support__title{ font-weight: 800; font-size: 14px; }
.psm-support__subtitle{ font-size: 12px; opacity: .88; margin-top: 2px; }

.psm-support__close{
  border: none;
  background: rgba(255,255,255,.16);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
}

.psm-support__body{
  padding: 14px;
  background: #fff;
  overflow: auto;
}
.psm-support__note{
  background: #f7f8fb;
  border: 1px solid #eef1f6;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.9;
  color: #223;
}
.psm-support__group{ margin-top: 12px; }
.psm-support__field-label{
  display: block;
  font-size: 12px;
  color: #445;
  margin-bottom: 6px;
}
.psm-support__input{
  width: 100%;
  border: 1px solid #e3e7ef;
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
  font-size: 13px;
}
.psm-support__input:focus{
  border-color: #176b5b;
  box-shadow: 0 0 0 3px rgba(23,107,91,.12);
}
.psm-support__row{ display: flex; gap: 8px; margin-top: 8px; }

.psm-support__btn{
  border: 1px solid #e3e7ef;
  background: #fff;
  color: #176b5b;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
}
.psm-support__btn--primary{
  background: #176b5b;
  color: #fff;
  border-color: #176b5b;
}

.psm-support__bigbtn{
  width: 100%;
  border: none;
  background: #176b5b;
  color: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  margin-top: 12px;
}
.psm-support__mini{
  font-size: 12px;
  margin-top: 8px;
  color: #667;
  line-height: 1.8;
}

@media (max-width: 480px){
  .psm-support__panel{
    width: 100%;
    right: 0;
    left: auto;
    bottom: 0;
    border-radius: 18px 18px 0 0;
  }
  .psm-support__fab{ right: 16px; left: auto; bottom: 88px; }
  .psm-support__label{ display: none; }
}


	@import url('https://fonts.googleapis.com/css?family=Montserrat:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i|Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i|Playfair+Display:400,400i,700,700i,900,900i|Poppins:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i|Raleway:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i|Roboto+Condensed:300,300i,400,400i,700,700i|Roboto:100,100i,300,300i,400,400i,500,500i,700,700i,900,900i&display=swap');

	.user_panel{
		margin-right: 0 ;
	}

	.all_header{
		margin-right: 0;
	}
	
	@media (min-width: 768px) {
		.user_panel{
			margin-right: 20rem;
		}

		.all_header{
			margin-right: 25%;
		}
	}
	#menu-toggle {
    transition: transform 0.3s ease;
    cursor: pointer;
}
	#menu-toggle.open {
    transform: rotate(-90deg);
    transition: transform 0.3s;
	}
	.psm-support__flash{
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.8;
  border: 1px solid transparent;
}
.psm-support__flash--ok{ background: #f0fbf4; border-color: #bfe9cd; color: #145a2d; }
.psm-support__flash--err{ background: #fff3f3; border-color: #ffd0d0; color: #7a1a1a; }

.psm-support__step{ display: none; }
.psm-support__step.is-active{ display: block; }

.psm-support__btn--full{ width: 100%; margin-top: 10px; }

.psm-support__spinner{
  display: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.5);
  border-top-color: rgba(255,255,255,1);
  margin-right: 8px;
  margin-left: 0;
  animation: psmSpin .7s linear infinite;
}
.psm-support__btn.is-loading .psm-support__spinner{ display: inline-block; }
.psm-support__btn.is-loading{ opacity: .9; pointer-events: none; }

@keyframes psmSpin { to { transform: rotate(360deg); } }

.psm-support__chips{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #f7f8fb;
  border: 1px solid #eef1f6;
  padding: 10px 12px;
  border-radius: 14px;
  margin-bottom: 12px;
}
.psm-support__chip{
  font-size: 13px;
  color: #223;
}
.psm-support__chip-btn{
  border: none;
  background: transparent;
  color: #176b5b;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.psm-support__countdown{
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #556;
}
.psm-support__success{
  background: #f0fbf4;
  border: 1px solid #bfe9cd;
  padding: 12px 12px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.9;
  color: #145a2d;
  margin-bottom: 12px;
}



/* ============ Chat UI ============ */
.psm-chat{ margin-top: 10px; border: 1px solid #eef1f6; border-radius: 16px; overflow: hidden; }
.psm-chat__messages{
  height: 280px;
  max-height: 45vh;
  overflow: auto;
  background: #f7f8fb;
  padding: 10px;
}
.psm-chat__msg{
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 14px;
  margin: 8px 0;
  font-size: 13px;
  line-height: 1.8;
  word-break: break-word;
}
.psm-chat__msg--me{
  background:#176b5b;
  color:#fff;
  margin-inline-end:auto;
  margin-inline-start:0;
}
.psm-chat__msg--them{
  background:#fff;
  border:1px solid #e7eaf0;
  margin-inline-start:auto;
  margin-inline-end:0;
}

.psm-chat__composer{
  display:flex;
  gap:8px;
  padding:10px;
  background:#fff;
  border-top:1px solid #eef1f6;
  align-items:center;
  flex-wrap: nowrap;
}
.psm-chat__attach{
  width: 40px; height: 40px;
  border-radius: 12px;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  background:#f5f7fb;
  border:1px solid #e3e7ef;
}
.psm-chat__attach.is-disabled{ opacity:.45; cursor:not-allowed; pointer-events:none; }

.psm-chat__input{
  flex:1;
  min-width: 0;
  border:1px solid #e3e7ef;
  border-radius: 12px;
  padding: 10px 12px;
  font-size:13px;
  outline:none;
}
.psm-chat__input:focus{
  border-color:#176b5b;
  box-shadow:0 0 0 3px rgba(23,107,91,.12);
}
.psm-chat__send{
  border:none;
  background:#176b5b;
  color:#fff;
  border-radius:12px;
  padding:10px 14px;
  cursor:pointer;
  font-size:13px;
  white-space:nowrap;
  flex: 0 0 auto;
}
.psm-chat__hint{
  padding: 8px 10px;
  font-size: 12px;
  color:#667;
  background:#fff;
}


/* ============ Attachment Card ============ */
.psm-chat__text{ white-space: pre-wrap; }

.psm-attachmini{
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e7eaf0;
  text-decoration: none;
  color: #1d2b3a;
  max-width: 100%;
}

.psm-chat__msg--me .psm-attachmini{
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.2);
  color: #fff;
}

.psm-attachmini__thumb{
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #d5ddea;
  background: #f5f7fb;
  flex: 0 0 auto;
}

.psm-attachmini__thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.psm-attachmini__icon{
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d5ddea;
  background: #f5f7fb;
  font-size: 18px;
  flex: 0 0 auto;
}

.psm-attachmini__name{
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.psm-attachmini__actions{
  display: inline-flex;
  gap: 6px;
  margin-right: auto;
}

.psm-attachmini__action{
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid #e7eaf0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 13px;
  color: #176b5b;
  background: #ffffff;
}

.psm-chat__msg--me .psm-attachmini__action{
  color: #fff;
  border-color: rgba(255,255,255,.3);
  background: rgba(255,255,255,.15);
}

.psm-attach{
  margin-top: 10px;
  border: 1px solid #e7eaf0;
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
}

.psm-chat__msg--me .psm-attach{
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.10);
}

.psm-attach__head{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.psm-attach__icon{
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #f3f6fb;
  border: 1px solid #e3e7ef;
  position: relative;
  flex: 0 0 auto;
}

.psm-chat__msg--me .psm-attach__icon{
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.22);
}

/* icon glyph */
.psm-attach__icon::after{
  content: "📎";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 18px;
}

/* different icons by type */
.psm-attach--image .psm-attach__icon::after{ content: "🖼️"; }
.psm-attach--pdf   .psm-attach__icon::after{ content: "📄"; }
.psm-attach--audio .psm-attach__icon::after{ content: "🎵"; }
.psm-attach--video .psm-attach__icon::after{ content: "🎬"; }

.psm-attach__meta{ flex: 1; min-width: 0; }
.psm-attach__name{
  font-weight: 800;
  font-size: 13px;
  color: #223;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.psm-chat__msg--me .psm-attach__name{ color: #fff; }

.psm-attach__sub{
  margin-top: 4px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12px;
  color: #667;
}

.psm-chat__msg--me .psm-attach__sub{ color: rgba(255,255,255,.85); }

.psm-attach__badge{
  background: #f5f7fb;
  border: 1px solid #e3e7ef;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 11px;
  color: #176b5b;
}

.psm-chat__msg--me .psm-attach__badge{
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.22);
  color: #fff;
}

.psm-attach__actions{
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.psm-attach__btn{
  text-decoration: none;
  border: 1px solid #e3e7ef;
  background: #fff;
  color: #176b5b;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.psm-attach__btn--primary{
  background: #176b5b;
  border-color: #176b5b;
  color: #fff;
}

.psm-chat__msg--me .psm-attach__btn{
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.22);
  color: #fff;
}

.psm-chat__msg--me .psm-attach__btn--primary{
  background: rgba(255,255,255,.22);
  border-color: rgba(255,255,255,.30);
}

/* Preview for images */
.psm-attach__preview{
  display: block;
  border-top: 1px solid #eef1f6;
  background: #f7f8fb;
}
.psm-chat__msg--me .psm-attach__preview{
  border-top-color: rgba(255,255,255,.18);
  background: rgba(0,0,0,.10);
}
.psm-attach__preview img{
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
}

/* Audio/Video players */
.psm-attach__player{
  border-top: 1px solid #eef1f6;
  padding: 10px 12px;
  background: #f7f8fb;
}
.psm-chat__msg--me .psm-attach__player{
  border-top-color: rgba(255,255,255,.18);
  background: rgba(0,0,0,.10);
}
.psm-attach__player audio,
.psm-attach__player video{
  width: 100%;
}

@media (max-width: 520px){
  .psm-chat__messages{
    height: 45vh;
  }
  .psm-chat__composer{
    flex-wrap: wrap;
  }
  .psm-chat__attach{
    order: 1;
  }
  .psm-chat__input{
    order: 2;
    width: 100%;
  }
  .psm-chat__send{
    order: 3;
    width: 100%;
  }
}
