/* =========================================================
   Call Popup Modal — Company sellers (call-popup.css)
   Two-column layout: managers (left) + company info (right)
   CRITICAL: No border-radius anywhere. Sharp corners only.
   ========================================================= */

/* ---- Overlay ---- */
.eps-call-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.eps-call-overlay.visible {
  opacity: 1;
}

/* ---- Modal shell ---- */
.eps-call {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 800px;
  max-width: 96vw;
  max-height: 90vh;
  background: #fff;
  border: 1px solid #E8E8E8;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  border-radius: 0;
}

.eps-call.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ---- Header ---- */
.eps-call-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 24px;
  border-bottom: 1px solid #E8E8E8;
  flex-shrink: 0;
}

.eps-call-header-icon {
  width: 24px;
  height: 24px;
  color: #2E6AAD;
  flex-shrink: 0;
}

.eps-call-header-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.eps-call-title {
  flex: 1;
  font-family: 'Rubik', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #0D0D0D;
  margin: 0;
  line-height: 1.3;
}

.eps-call-close {
  width: 32px;
  height: 32px;
  border: 1px solid #E8E8E8;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  border-radius: 0;
}

.eps-call-close svg {
  width: 16px;
  height: 16px;
  stroke: #666;
  stroke-width: 2;
  stroke-linecap: round;
}

.eps-call-close:hover {
  border-color: #ccc;
}

.eps-call-close:hover svg {
  stroke: #333;
}

/* ---- Body ---- */
.eps-call-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

/* Loading state */
.eps-call-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 200px;
  font-size: 1.5rem;
  color: #999;
}

/* ---- Two-column wrapper ---- */
.ecp-wrap {
  display: flex;
  flex: 1;
  min-height: 200px;
}

/* ---- LEFT COLUMN — Managers ---- */
.ecp-left {
  flex: 1;
  overflow-y: auto;
  min-width: 0;
}

/* Manager card */
.ecp-manager {
  padding: 20px;
  border-bottom: 1px solid #E8E8E8;
}

.ecp-manager:last-child {
  border-bottom: none;
}

.ecp-manager-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.ecp-manager-avatar {
  width: 66px;
  height: 66px;
  flex-shrink: 0;
  overflow: hidden;
  background: #F0F4F8;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
}

.ecp-manager-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.ecp-manager-avatar-placeholder {
  width: 66px;
  height: 66px;
  flex-shrink: 0;
  background: #F0F4F8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  border-radius: 0;
}

.ecp-manager-avatar-placeholder svg {
  width: 28px;
  height: 28px;
  stroke: #999;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ecp-manager-identity {
  flex: 1;
  min-width: 0;
}

.ecp-manager-name-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 5px;
}
.ecp-manager-name {
  font-family: 'Rubik', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #0D0D0D;
  line-height: 1.3;
}

.ecp-manager-role {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: #999;
}

/* Expertise */
.ecp-manager-expertise {
  margin-bottom: 6px;
}

.ecp-manager-expertise-label {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 11px;
  color: #999;
  margin-right: 4px;
}

.ecp-manager-tag {
  display: inline-block;
  background: #F0F4F8;
  padding: 2px 8px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 11px;
  color: #333;
  margin: 1px 2px;
  border-radius: 0;
}

/* Languages */
.ecp-manager-langs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}

.ecp-manager-langs svg {
  width: 13px;
  height: 13px;
  stroke: #999;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.ecp-manager-langs span {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 12px;
  color: #666;
}

/* Phone + messenger area */
.ecp-manager-contacts {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ecp-phone-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ecp-phone-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 33px;
  padding: 0 16px;
  background: #2E6AAD;
  color: #fff;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.15s;
  white-space: nowrap;
}

.ecp-phone-btn:hover {
  background: #245a93;
  color: #fff;
  text-decoration: none;
}

.ecp-phone-btn svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* Messenger buttons */
.ecp-messengers {
  display: flex;
  gap: 8px;
}

.ecp-msg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 33px;
  height: 33px;
  color: #fff;
  text-decoration: none;
  border-radius: 0;
  transition: opacity 0.15s;
}

.ecp-msg-btn:hover {
  opacity: 0.85;
  color: #fff;
  text-decoration: none;
}

.ecp-msg-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}
.ecp-msg-btn i {
  font-size: 14px;
}

.ecp-msg-whatsapp { background: #25D366; }
.ecp-msg-telegram { background: #0088CC; }
.ecp-msg-viber { background: #7360F2; }
.ecp-msg-signal { background: #666666; }

/* ---- RIGHT COLUMN — Company ---- */
.ecp-right {
  width: 320px;
  flex-shrink: 0;
  border-left: 1px solid #E8E8E8;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Company header */
.ecp-company-header {
  padding: 28px 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #E8E8E8;
}

.ecp-company-logo {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  overflow: hidden;
  background: #F0F4F8;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
}

.ecp-company-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.ecp-company-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ecp-company-name {
  font-family: 'Rubik', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #0D0D0D;
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.ecp-company-flag {
  width: 20px;
  height: auto;
  margin-top: -2px;
}

.ecp-company-website {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 12px;
  color: #2E6AAD;
  text-decoration: none;
}

.ecp-company-website:hover {
  text-decoration: underline;
  color: #2E6AAD;
}

.ecp-company-website svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Badges */
.ecp-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  border-top: 1px solid #E8E8E8;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 13px;
}
.ecp-badge-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.ecp-badge-title {
  font-weight: 600;
  color: #0D0D0D;
  font-size: 13px;
}
.ecp-badge-sub {
  font-size: 11px;
  color: #999;
}
.ecp-badge-sub a {
  color: #2E6AAD;
  text-decoration: none;
}
.ecp-badge-sub a:hover {
  text-decoration: underline;
}

.ecp-badge svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.ecp-badge-verified svg { stroke: #2E6AAD; }
.ecp-badge-offers svg { stroke: #4CAF50; }

/* Company details */
.ecp-details {
  padding: 14px 20px;
  border-top: 1px solid #E8E8E8;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ecp-detail-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.ecp-detail-row svg {
  width: 14px;
  height: 14px;
  stroke: #999;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  margin-top: 2px;
}

.ecp-detail-row span,
.ecp-detail-row div {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 12px;
  color: #666;
}

/* Opening hours schedule */
.ecp-hours-schedule {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 150px;
}

.ecp-hours-row {
  display: flex;
  justify-content: space-between;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 12px;
  color: #333;
}

.ecp-hours-day {
  color: #666;
}

.ecp-hours-time {
  font-weight: 500;
}

/* Product card */
.ecp-product {
  padding: 12px 20px;
  border-top: 1px solid #E8E8E8;
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: auto;
}

.ecp-product-img {
  width: 64px;
  height: 52px;
  object-fit: cover;
  flex-shrink: 0;
  background: #F0F4F8;
  border-radius: 0;
}

.ecp-product-info {
  flex: 1;
  min-width: 0;
}

.ecp-product-title {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #333;
  margin: 0 0 4px 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ecp-product-price {
  font-family: 'Rubik', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #0D0D0D;
  margin: 0 0 2px 0;
}

.ecp-product-loc {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 10px;
  color: #999;
  display: flex;
  align-items: center;
  gap: 3px;
}

.ecp-product-loc svg {
  width: 10px;
  height: 10px;
  stroke: #999;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- Footer ---- */
.eps-call-footer {
  background: #FAFAFA;
  border-top: 1px solid #E8E8E8;
  padding: 12px 24px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-shrink: 0;
}

.eps-call-footer svg {
  width: 14px;
  height: 14px;
  stroke: #999;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  margin-top: 1px;
}

.eps-call-footer p {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 11px;
  color: #999;
  margin: 0;
  line-height: 1.4;
}

/* ============================================================
   PRIVATE SELLER LAYOUT (single-column, 420px)
   ============================================================ */

/* Narrow modal when private seller content is loaded */
.eps-call:has(.ecp-private) {
  width: 420px;
}

.ecp-private {
  display: flex;
  flex-direction: column;
}

/* Seller info */
.ecp-priv-seller {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  border-bottom: 1px solid #E8E8E8;
}

.ecp-priv-avatar {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 0;
}

.ecp-priv-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.ecp-priv-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ecp-priv-name {
  font-family: 'Rubik', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #0D0D0D;
  line-height: 1.3;
}

.ecp-priv-label {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 13px;
  color: #999;
}

/* Badge */
.ecp-priv-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 24px;
  border-bottom: 1px solid #E8E8E8;
  font-family: 'IBM Plex Sans', sans-serif;
}

.ecp-priv-badge svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Phone section */
.ecp-priv-phone-section {
  padding: 16px 24px;
  border-bottom: 1px solid #E8E8E8;
}

.ecp-priv-phone-section .ecp-phone-fill {
  flex: 1;
  justify-content: center;
}

/* Product card */
.ecp-priv-product {
  padding: 12px 24px;
  border-bottom: 1px solid #E8E8E8;
  display: flex;
  gap: 12px;
  align-items: center;
}

/* ---- Error ---- */
.ecp-error {
  padding: 24px;
  text-align: center;
  color: #c00;
  font-size: 14px;
}

/* ---- Responsive ---- */
@media (max-width: 800px) {
  .eps-call {
    width: 100%;
    max-width: 100vw;
    max-height: 100vh;
    top: 0;
    left: 0;
    transform: none;
    height: 100vh;
  }

  .eps-call.visible {
    transform: none;
  }

  .ecp-wrap {
    flex-direction: column;
  }

  .ecp-right {
    width: 100%;
    border-left: none;
    border-top: 1px solid #E8E8E8;
  }

  .ecp-company-header {
    padding: 20px;
  }
}

/* ---- Dark mode ---- */
body.dark .eps-call {
  background: #1e1e1e;
}

body.dark .eps-call-header {
  border-color: #333;
}

body.dark .eps-call-title {
  color: #eee;
}

body.dark .eps-call-close {
  background: #1e1e1e;
  border-color: #444;
}

body.dark .eps-call-close svg {
  stroke: #aaa;
}

body.dark .ecp-manager {
  border-color: #333;
}

body.dark .ecp-manager-name {
  color: #eee;
}

body.dark .ecp-manager-avatar-placeholder {
  background: #2a2a2a;
}

body.dark .ecp-manager-tag {
  background: #2a2a2a;
  color: #ccc;
}

body.dark .ecp-right {
  border-color: #333;
}

body.dark .ecp-company-name {
  color: #eee;
}

body.dark .ecp-badge {
  border-color: #333;
}

body.dark .ecp-badge-verified span,
body.dark .ecp-badge-offers span {
  color: #ccc;
}

body.dark .ecp-details {
  border-color: #333;
}

body.dark .ecp-detail-row span,
body.dark .ecp-detail-row div,
body.dark .ecp-hours-row {
  color: #ccc;
}

body.dark .ecp-product {
  border-color: #333;
}

body.dark .ecp-product-title {
  color: #ccc;
}

body.dark .ecp-product-price {
  color: #eee;
}

body.dark .eps-call-footer {
  background: #1a1a1a;
  border-color: #333;
}
