/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Public booking time selection */
[data-controller~="public-booking"] .time-slot-btn {
  color: #111827;
  background-color: #fff;
  border-color: #d1d5db;
}

[data-controller~="public-booking"] .time-slot-btn:hover,
[data-controller~="public-booking"] .time-slot-btn:focus-visible {
  border-color: #be185d;
  background-color: #fdf2f8;
}

[data-controller~="public-booking"] .time-slot-btn[aria-pressed="true"],
[data-controller~="public-booking"] .time-slot-btn[aria-pressed="true"]:hover,
[data-controller~="public-booking"] .time-slot-btn[aria-pressed="true"]:focus-visible {
  color: #831843;
  background-color: #fce7f3;
  border-color: #be185d;
  font-weight: 600;
}

/* Agent panel */
.agent-trigger {
  position: fixed;
  right: calc(1rem + env(safe-area-inset-right, 0px));
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  z-index: 65;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid var(--border-pink);
  border-radius: 9999px;
  padding: 0.6rem 0.95rem;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-pink), #d81b60);
  box-shadow: 0 10px 28px rgba(233, 30, 99, 0.28);
  transition: all 0.2s ease;
}

.agent-trigger:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(233, 30, 99, 0.32);
}

.agent-panel-open .agent-trigger {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

@media (max-width: 640px) {
  .agent-trigger {
    right: calc(0.75rem + env(safe-area-inset-right, 0px));
    bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    padding: 0.55rem 0.9rem;
  }
}

.agent-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(18, 18, 18, 0.45);
  backdrop-filter: blur(2px);
}

.agent-panel {
  position: fixed;
  top: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 70;
  height: auto;
  width: min(48vw, 860px);
  min-width: 520px;
  max-width: calc(100vw - 1.5rem);
  background: #fcfcfc;
  border: 1px solid var(--border-light);
  border-radius: 0.85rem;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.12);
  transform: translateX(0);
  transition: transform 0.2s ease;
}

.agent-panel-hidden {
  transform: translateX(100%);
}

.agent-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-light);
  padding: 1rem 1.25rem;
}

.agent-kicker {
  font-size: var(--font-size-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.agent-panel-body {
  display: grid;
  grid-template-columns: 320px 1fr;
  height: calc(100% - 86px);
}

.agent-sidebar {
  padding: 1rem;
  border-right: 1px solid var(--border-light);
  background: #fafafa;
}

.agent-thread {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 1rem;
}

.agent-thread-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.agent-empty {
  border: 1px dashed var(--border-light);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.85);
  padding: 0.85rem;
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

.agent-message {
  border: 1px solid var(--border-light);
  border-radius: 0.9rem;
  padding: 0.8rem 0.9rem;
  background: white;
}

.agent-message-user {
  border-color: var(--border-pink);
  background: var(--accent-pink-light);
}

.agent-message-assistant {
  background: #ffffff;
}

.agent-conversation-button {
  width: 100%;
  border: 1px solid var(--border-light);
  border-radius: 0.7rem;
  padding: 0.65rem 0.75rem;
  text-align: left;
  font-size: var(--font-size-sm);
  background: white;
  transition: all 0.2s ease;
}

.agent-conversation-button:hover {
  border-color: var(--accent-pink-medium);
}

.agent-conversation-button-active {
  border-color: var(--accent-pink);
  background: var(--accent-pink-light);
}

.agent-suggestions {
  border: 1px solid var(--border-light);
  border-radius: 0.75rem;
  background: white;
  padding: 0.75rem;
}

@media (max-width: 1024px) {
  .agent-panel {
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    border-radius: 0;
    border-left: 1px solid var(--border-light);
    border-right: none;
    border-top: none;
    border-bottom: none;
    height: 100vh;
  }

  .agent-panel-body {
    grid-template-columns: 1fr;
    height: calc(100vh - 86px);
  }

  .agent-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    max-height: 40vh;
    overflow-y: auto;
  }
}
