/* 
 * Shared Seat Layout UI Component
 * This file contains the authoritative styles for the bus seat card template 
 * used in both admin seat designer and front-end seat selection.
 */

.wk-te-layout-canvas {
  position: relative;
  width: 760px;
  height: 620px;
  margin: 0 auto;
  border: 0;
  border-radius: 0;
  background: #fff;
}

.wk-te-layout-canvas--coach-card {
  --wk-te-coach-gap: 12px;
  --wk-te-coach-driver-size: 42px;
  --wk-te-coach-label-height: 13px;
  --wk-te-coach-side-padding: 18px;
  --wk-te-coach-header-height: 74px;
  display: block;
  box-sizing: border-box;
  min-width: 0;
  border: 1px solid #dbe5ee;
  border-radius: 8px;
  background: #fbfcfe;
}

.wk-te-coach-card-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
  height: var(--wk-te-coach-header-height);
  pointer-events: none;
}

.wk-te-coach-header {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  min-width: 0;
  height: 73px;
  border-top: 0;
  border-radius: 8px 8px 0 0;
  background: #fbfcfe;
  pointer-events: none;
}

.wk-te-coach-driver {
  left: 30%;
  top: var(--wk-te-coach-gap);
  transform: translateX(-50%);
}

.wk-te-coach-labels {
  position: absolute;
  top: calc(
    var(--wk-te-coach-gap) + var(--wk-te-coach-driver-size) +
      var(--wk-te-coach-gap)
  );
  left: 0;
  right: 0;
  z-index: 1;
  height: var(--wk-te-coach-label-height);
  pointer-events: none;
}

.wk-te-coach-divider {
  position: absolute;
  top: calc(
    var(--wk-te-coach-gap) + var(--wk-te-coach-driver-size) +
      var(--wk-te-coach-gap) + var(--wk-te-coach-label-height) +
      var(--wk-te-coach-gap)
  );
  left: 0;
  right: 0;
  z-index: 1;
  height: 1px;
  background: #e2e8f0;
  pointer-events: none;
  margin: 0 16px;
}

.wk-te-coach-header:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: #e2e8f0;
}

.wk-te-coach-label {
  position: absolute;
  bottom: 6px;
  color: #6B7C8C;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.wk-te-coach-labels .wk-te-coach-label {
  top: 0;
  bottom: auto;
}

.wk-te-coach-label-front {
  left: var(--wk-te-coach-side-padding);
}

.wk-te-coach-label-coach {
  right: var(--wk-te-coach-side-padding);
}

.wk-te-layout-canvas--double-deck {
  background: #f4f5fb;
  border-radius: 0;
}

.wk-te-deck-panel {
  position: absolute;
  z-index: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(16, 36, 61, 0.04);
}

.wk-te-deck-panel strong {
  position: absolute;
  top: 22px;
  right: 18px;
  color: #1f2937;
  font-size: 13px;
  font-weight: 800;
}

.wk-te-seat {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  color: #1e293b;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  cursor: pointer;
  isolation: isolate;
  text-shadow: none;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
}

/* Base colors by type */
.wk-te-seat-normal,
.wk-te-seat-type--normal {
  color: #10243d;
  border-color: #dfe7ef;
  background: #fff;
}

.wk-te-seat-vip,
.wk-te-seat-type--vip {
  color: #7c3aed;
  border-color: #7c3aed;
  background: #fff;
}

.wk-te-seat-vvip,
.wk-te-seat-type--vvip {
  color: #d97706;
  border-color: #d97706;
  background: #fff;
}

.wk-te-seat-sleeper,
.wk-te-seat-type--sleeper,
.wk-te-seat-double_sleeper,
.wk-te-seat-type--double_sleeper {
  --wk-te-seat-color: #7c3aed;
  color: #7c3aed;
  border-color: #7c3aed;
}

.wk-te-seat-cabin,
.wk-te-seat-type--cabin {
  --wk-te-seat-color: #14b8a6;
  color: #14b8a6;
  border-color: #14b8a6;
}

.wk-te-seat-ferry,
.wk-te-seat-type--ferry,
.wk-te-seat-open_deck,
.wk-te-seat-type--open_deck {
  --wk-te-seat-color: #49a8a2;
  color: #49a8a2;
  border-color: #49a8a2;
}

/* Layout for special types */
.wk-te-seat-sleeper,
.wk-te-seat-type--sleeper,
.wk-te-seat-double_sleeper,
.wk-te-seat-type--double_sleeper,
.wk-te-seat-cabin,
.wk-te-seat-type--cabin {
  align-items: center;
  justify-content: flex-start;
  min-width: 34px;
  width: 34px;
  height: 72px;
  padding: 0 4px;
  border-width: 2px;
  border-radius: 8px;
  font-size: 11px;
}

.wk-te-seat-aisle,
.wk-te-seat-type--aisle {
  --wk-te-seat-color: #c4ccd8;
  color: #10243d;
  border-style: dashed;
}

.wk-te-seat-blocked,
.wk-te-seat-disabled,
.wk-te-seat-status--blocked {
  color: #fff;
  border-color: #f04343;
  background: #f04343;
}

.wk-te-seat-status--booked {
  --wk-te-seat-color: #f1f5f9;
  border-color: #e2e8f0;
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

/* Interaction States */
.wk-te-seat:hover {
  border-color: #4db7a6;
  box-shadow: 0 0 0 3px rgba(77, 183, 166, 0.18);
  transform: translateY(-1px);
}

.wk-te-seat.is-active,
.wk-te-seat.is-selected {
  color: #fff;
  border-color: #4db7a6;
  background: #4db7a6;
  box-shadow: 0 0 0 3px rgba(77, 183, 166, 0.18);
  outline: 0;
  opacity: 1;
}

.wk-te-seat.is-selected:before,
.wk-te-seat.is-selected:after {
  background: rgba(255, 255, 255, 0.36);
  opacity: 1;
}

/* Driver Icon Box */
.wk-te-seat-driver,
.wk-te-driver-seat {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 1px dashed #94a3b8;
  border-radius: 10px;
  font-size: 20px;
  z-index: 10;
  overflow: hidden;
}

.wk-te-designer-driver.is-active {
  border-color: #4db7a6;
  box-shadow: 0 0 0 3px rgba(77, 183, 166, 0.18);
}

/* Row Markers */
.wk-te-seat-row-marker,
.wk-te-designer-row-marker {
  position: absolute;
  z-index: 10;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 36px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  pointer-events: none;
  left: 16px;
}

/* Shared Legend Dots */
.wk-te-dot {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 3px;
}

.wk-te-dot-normal {
  border: 1px solid #dfe7ef;
  background: #fff;
}

.wk-te-dot-vip {
  background: #7c3aed;
}

.wk-te-dot-vvip {
  background: #d97706;
}

.wk-te-dot-blocked {
  background: #f04343;
}

.wk-te-dot-driver {
  background: #aeb8c5;
}

.wk-te-dot-selected {
  background: #4db7a6;
}

.wk-te-dot-taken {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.wk-te-designer-row-marker--sleeper {
  height: 72px;
}

/* Designer Slots (Admin/Seller Only) */
.wk-te-designer-grid-slot {
  position: absolute;
  z-index: 0;
  box-sizing: border-box;
  width: 36px;
  height: 36px;
  border: 1px dashed #dbe5ee;
  border-radius: 7px;
  background: #fbfdff;
  pointer-events: none;
}

.wk-te-designer-grid-slot--sleeper {
  width: 34px;
  height: 72px;
  border-width: 2px;
  border-radius: 8px;
}

/* Context Menu (Admin/Seller Only) */
.wk-te-seat-context-menu {
  position: fixed;
  z-index: 10000;
  min-width: 150px;
  padding: 6px;
  border: 1px solid #cfd9e5;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(21, 34, 50, 0.18);
}

.wk-te-seat-context-menu button {
  display: block;
  width: 100%;
  min-height: 32px;
  padding: 7px 10px;
  color: #10243d;
  text-align: left;
  border: 0;
  border-radius: 4px;
  background: transparent;
  font-weight: 700;
}

.wk-te-seat-context-menu button:hover,
.wk-te-seat-context-menu button.is-active {
  background: #edf7f6;
  color: #18756f;
}

.wk-te-seat-context-menu button[data-seat-action="remove"] {
  margin-top: 4px;
  color: #dc2626;
  border-top: 1px solid #edf1f5;
}

.wk-te-seat-context-menu button[data-seat-action="remove"]:hover {
  color: #b91c1c;
  background: #fff1f2;
}

/* Booking View Components */
.wk-te-sleeper-deck-label {
  position: absolute;
  top: 0;
  z-index: 1;
  color: #0b1f3a;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
  transform: translateX(-50%);
  white-space: nowrap;
}

.wk-te-sleeper-deck-label--down {
  left: 30%;
}

.wk-te-sleeper-deck-label--upper {
  left: 74%;
}

.wk-te-seat-type-badge {
  position: absolute;
  left: 50%;
  top: 39px;
  z-index: 2;
  max-width: 58px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #fff;
  color: #24364d;
  box-shadow: 0 2px 6px rgba(20, 33, 55, 0.14);
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  padding: 3px 5px;
  text-shadow: none;
  text-transform: uppercase;
  white-space: nowrap;
}
