/* ============================================================
   CEWL Lightbox Styles (Phase 9.6)
   Contacts, Events, WebLinks, Locations overlay panel.
   ============================================================ */

/* --- Lightbox overlay --- */
.m-cewl-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Panel --- */
.m-cewl-lightbox-panel {
  position: relative;
  background: #fff;
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  border-radius: 0.75rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'BasicGothicWebPro', sans-serif;
}

@media (max-width: 767px) {
  .m-cewl-lightbox-panel {
    max-width: 100%;
    max-height: 100%;
    height: 100%;
    border-radius: 0;
  }
}

/* --- Header --- */
.m-cewl-lightbox-header {
  display: flex;
  justify-content: flex-end;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e9ecef;
  flex-shrink: 0;
}

.m-cewl-lightbox-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #6c757d;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}

.m-cewl-lightbox-close:hover {
  color: #212529;
}

/* --- Body (scrollable) --- */
.m-cewl-lightbox-body {
  overflow-y: auto;
  flex: 1;
}

/* --- Section --- */
.m-cewl-section {
  border-bottom: 1px solid #e9ecef;
}

.m-cewl-section:last-child {
  border-bottom: none;
}

.m-cewl-section-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  font-weight: 500;
  font-size: 15px;
  color: #212529;
  background: #f8f9fa;
}

.m-cewl-section-count {
  font-size: 0.75rem;
}

/* --- Section "Show all" button (three dots) --- */
.m-cewl-section-more {
  display: block;
  width: 48px;
  height: 48px;
  margin: 0 auto;
  padding: 0;
  background: none;
  border: none;
  color: #212529;
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 48px;
  text-align: center;
}

.m-cewl-section-more:hover {
  color: #6c757d;
}

/* --- Section map button --- */
.m-cewl-section-map {
  display: block;
  width: calc(100% - 2rem);
  margin: 0.625rem 1rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.375rem;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-align: center;
  cursor: pointer;
}

.m-cewl-section-map:hover {
  opacity: 0.85;
}

/* --- Row --- */
.m-cewl-row {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid #f0f0f0;
}

.m-cewl-row:last-child {
  border-bottom: none;
}

.m-cewl-row--hidden {
  display: none;
}

/* --- Row content (slidable) --- */
.m-cewl-row-content {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  padding: 0.625rem 1rem;
  position: relative;
  z-index: 1;
  background: #fff;
  cursor: default;
  transition: transform 0.2s ease;
  user-select: none;
}

/* --- Row actions (behind content) --- */
.m-cewl-row-actions--left,
.m-cewl-row-actions--right {
  position: absolute;
  top: 0;
  height: 100%;
  display: flex;
  z-index: 0;
}

.m-cewl-row-actions--left {
  left: 0;
}

.m-cewl-row-actions--right {
  right: 0;
}

.m-cewl-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 100%;
  border: none;
  color: #fff;
  font-size: 11px;
  cursor: pointer;
  gap: 0.2rem;
}

.m-cewl-action-btn i {
  font-size: 1.1rem;
}

.m-cewl-action-btn:hover {
  opacity: 0.85;
}

/* --- Row thumb --- */
.m-cewl-row-thumb {
  width: 45px;
  height: 45px;
  flex-shrink: 0;
  margin-right: 0.75rem;
  overflow: hidden;
  border-radius: 0.25rem;
  background: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
}

.m-cewl-row-thumb.rounded-circle {
  border-radius: 50%;
}

.m-cewl-row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.m-cewl-row-thumb--placeholder {
  color: #6c757d;
  font-size: 1.1rem;
}

/* --- Row date column (events) --- */
.m-cewl-row-date {
  width: 45px;
  flex-shrink: 0;
  margin-right: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 0.125rem;
}

.m-cewl-row-date-day {
  font-size: 35px;
  font-weight: 200;
  line-height: 1;
  color: var(--kon-brand-color, #cf0015);
}

.m-cewl-row-date-month {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  color: #212529;
  text-transform: uppercase;
}

/* --- Row event time --- */
.m-cewl-row-event-time {
  font-size: 11px;
  font-weight: 500;
  color: var(--kon-brand-color, #cf0015);
  text-transform: uppercase;
  line-height: 1.3;
}

/* --- Row info --- */
.m-cewl-row-info {
  flex: 1;
  min-width: 0;
}

.m-cewl-row-title {
  font-weight: 500;
  font-size: 15px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.m-cewl-row-subtitle {
  font-weight: 200;
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Row more button --- */
.m-cewl-row-more {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  color: #6c757d;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.125rem 0.25rem;
  line-height: 1;
}

.m-cewl-row-more:hover {
  color: #212529;
}

/* --- Contact expand panel --- */
.m-cewl-row-expand {
  width: 100%;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, padding 0.25s ease;
  display: flex;
  flex-wrap: nowrap;
  padding: 0 0;
}

.m-cewl-row-expand--open {
  max-height: 120px;
  padding: 0.5rem 0 0.25rem 0;
}

.m-cewl-expand-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  flex: 1;
  background: none;
  border: none;
  color: #6c757d;
  font-size: 11px;
  font-weight: 200;
  padding: 0.5rem 0;
  cursor: pointer;
}

.m-cewl-expand-btn i {
  font-size: 1.1rem;
}

.m-cewl-expand-btn:hover {
  color: #495057;
}

/* --- More modal overlay --- */
.m-cewl-more-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 10001;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 16.67vh;
}

.m-cewl-more-modal {
  background: #fff;
  border-radius: 0.75rem;
  max-width: 350px;
  width: 90%;
  padding: 1rem 0;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.m-cewl-more-title {
  font-weight: 500;
  font-size: 15px;
  padding: 0 1.25rem 0.75rem;
  border-bottom: 1px solid #e9ecef;
}

.m-cewl-more-action {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.75rem 1.25rem;
  background: none;
  border: none;
  font-size: 15px;
  color: #212529;
  cursor: pointer;
  text-align: left;
}

.m-cewl-more-action:hover {
  background: #f8f9fa;
}

.m-cewl-more-section {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #6c757d;
  padding: 0.75rem 1.25rem 0.25rem;
  letter-spacing: 0.05em;
  border-top: 1px solid #e9ecef;
  margin-top: 0.25rem;
}
.m-cewl-more-action--destructive { color: #dc3545; }

.m-cewl-more-cancel {
  display: block;
  width: 100%;
  padding: 0.75rem 1.25rem;
  background: none;
  border: none;
  border-top: 1px solid #e9ecef;
  font-size: 15px;
  color: #6c757d;
  cursor: pointer;
  text-align: center;
}

.m-cewl-more-cancel:hover {
  background: #f8f9fa;
}

/* --- Map layer (z-overlay inside panel) --- */
.m-cewl-map-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  z-index: 2;
  display: flex;
  flex-direction: column;
  border-radius: inherit;
}

.m-cewl-map-header {
  display: flex;
  justify-content: flex-end;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e9ecef;
  flex-shrink: 0;
}

.m-cewl-map-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #6c757d;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}

.m-cewl-map-close:hover {
  color: #212529;
}

.m-cewl-map-container {
  flex: 1;
  min-height: 0;
}
