/* Instarem branch locator modal */
.branches_modal .modal-dialog {
  max-width: 960px;
}

.branches_modal .branches-modal-content {
  border: 0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.branches_modal .branches-modal-header {
  background: linear-gradient(135deg, #fe0095 0%, #cc08cc 100%);
  color: #fff;
  padding: 1.5rem 1.75rem 1.25rem;
}

.branches_modal .branches-modal-header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.branches_modal .branches-modal-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  margin-bottom: 0.55rem;
}

.branches_modal .branches-modal-title {
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.35rem;
  color: #fff;
}

.branches_modal .branches-modal-subtitle {
  margin: 0;
  font-size: 0.92rem;
  opacity: 0.92;
}

.branches_modal .modal-header {
  border: 0;
  padding: 0;
}

.branches_modal .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
  opacity: 0.85;
  margin: 0;
  padding: 0.5rem;
}

.branches_modal .btn-close:hover {
  opacity: 1;
}

.branches_modal .branches-modal-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.branches_modal .branches-modal-search {
  flex: 1 1 220px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 0.55rem 0.85rem;
  color: #64748b;
}

.branches_modal .branches-modal-search input {
  border: 0;
  outline: 0;
  width: 100%;
  font-size: 0.92rem;
  color: #1a1f24;
  background: transparent;
}

.branches_modal .branches-modal-search input::placeholder {
  color: #94a3b8;
}

.branches_modal .branches-modal-count {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
}

.branches_modal .branches-modal-body {
  padding: 1.25rem 1.5rem 1.5rem;
  background: #f8fafc;
  height: min(68vh, 640px);
  min-height: min(68vh, 640px);
  max-height: min(68vh, 640px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.branches_modal .branches-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  align-content: start;
  padding-right: 0.15rem;
  scrollbar-gutter: stable;
}

.branches_modal .branches-modal-grid--empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.branches_modal .branch-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.1rem 1.15rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  height: 100%;
}

.branches_modal .branch-card:hover {
  border-color: #ffb8de;
  box-shadow: 0 10px 24px rgba(254, 0, 149, 0.08);
  transform: translateY(-2px);
}

.branches_modal .branch-card-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.branches_modal .branch-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fce7f3;
  color: #fe0095;
  font-size: 1rem;
  flex-shrink: 0;
}

.branches_modal .branch-card .branch_city {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  color: #111827;
  margin: 0;
}

.branches_modal .branch-card .branch_address {
  font-size: 0.88rem;
  line-height: 1.6;
  color: #475569;
  margin: 0 0 0.85rem;
}

.branches_modal .branch-card-contacts {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.branches_modal .branch-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.84rem;
  font-weight: 500;
  color: #334155;
  text-decoration: none;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  word-break: break-word;
}

.branches_modal .branch-contact-link i {
  color: #fe0095;
  flex-shrink: 0;
}

.branches_modal .branch-contact-link:hover {
  color: #fe0095;
  border-color: #ffb8de;
  background: #fff5fb;
}

.branches_modal .branches-modal-message {
  width: 100%;
  text-align: center;
  padding: 2rem 1rem;
  color: #64748b;
  font-size: 0.95rem;
  margin: 0;
}

.branches_modal .branches-modal-loading {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  align-content: start;
}

.branches_modal .branch-card-skeleton {
  height: 180px;
  border-radius: 16px;
  background: linear-gradient(90deg, #eef2f7 25%, #e2e8f0 50%, #eef2f7 75%);
  background-size: 200% 100%;
  animation: branches-shimmer 1.4s infinite;
}

@keyframes branches-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (max-width: 767.98px) {
  .branches_modal .branches-modal-header {
    padding: 1.15rem 1.15rem 1rem;
  }

  .branches_modal .branches-modal-title {
    font-size: 1.35rem;
  }

  .branches_modal .branches-modal-body {
    padding: 1rem;
    height: min(72vh, 640px);
    min-height: min(72vh, 640px);
    max-height: min(72vh, 640px);
  }

  .branches_modal .branches-modal-grid,
  .branches_modal .branches-modal-loading {
    grid-template-columns: 1fr;
  }

  .branches_modal .branches-modal-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .branches_modal .branches-modal-count {
    text-align: center;
  }
}
