/* =========================================================================
 * Main-Tech Bot & Dynamic Quoter Styles (bot.css)
 * Premium Industrial Aesthetics, Modern Chat Interface & Sheet Preview Cards
 * ========================================================================= */

.mt-bot-card {
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-color, #cbd5e1);
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(0, 44, 102, 0.12);
  display: flex;
  flex-direction: column;
  height: 620px;
  max-width: 100%;
  overflow: hidden;
  position: relative;
}

.mt-bot-header {
  background: linear-gradient(135deg, #002c66 0%, #001a40 100%);
  color: #ffffff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #0044a3;
}

.mt-bot-close-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.mt-bot-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.mt-bot-header__info {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Fixed Undistorted Round Avatar Icon Container */
.mt-bot-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #001a40 0%, #0044a3 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 44, 102, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.35);
  overflow: hidden;
  padding: 0;
}

.mt-bot-avatar img,
.mt-bot-avatar svg {
  width: 28px;
  height: 28px;
  max-width: 28px;
  max-height: 28px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.mt-bot-title {
  font-size: 1.02rem;
  font-weight: 700;
  margin: 0;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.mt-bot-subtitle {
  font-size: 0.78rem;
  color: #93c5fd;
  margin: 2px 0 0 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mt-bot-status-dot {
  width: 8px;
  height: 8px;
  background-color: #22c55e;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px #22c55e;
}

.mt-bot-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #f8fafc;
}

/* Chat Messages */
.mt-msg {
  display: flex;
  flex-direction: column;
  max-width: 86%;
  animation: fadeInMsg 0.25s ease-out;
}

@keyframes fadeInMsg {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.mt-msg--bot {
  align-self: flex-start;
}

.mt-msg--user {
  align-self: flex-end;
}

.mt-msg__bubble {
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.45;
}

.mt-msg--bot .mt-msg__bubble {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  border-top-left-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.mt-msg--user .mt-msg__bubble {
  background: linear-gradient(135deg, #002c66 0%, #004191 100%);
  color: #ffffff;
  border-top-right-radius: 4px;
  box-shadow: 0 3px 10px rgba(0, 44, 102, 0.25);
}

.mt-msg__time {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 4px;
  align-self: flex-end;
}

.mt-msg--bot .mt-msg__time {
  align-self: flex-start;
}

/* Interactive Option Buttons (Industrial Maintenance Theme) */
.mt-bot-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.mt-opt-btn {
  background: #ffffff;
  border: 1.5px solid #0284c7;
  color: #002c66;
  padding: 10px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 5px rgba(2, 132, 199, 0.08);
  position: relative;
  overflow: hidden;
}

.mt-opt-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(2, 132, 199, 0.15), transparent);
  transition: left 0.5s ease;
}

.mt-opt-btn:hover::before {
  left: 100%;
}

.mt-opt-btn:hover {
  background: #0284c7;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
  border-color: #0284c7;
}

.mt-opt-btn:active {
  transform: translateY(0) scale(0.98);
}

.mt-opt-btn .material-symbols-outlined {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mt-opt-btn:hover .material-symbols-outlined {
  transform: rotate(45deg) scale(1.15);
  color: #ffffff;
}

/* Typing Indicator */
.mt-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  background: #ffffff;
  border-radius: 14px;
  border-top-left-radius: 4px;
  width: fit-content;
  border: 1px solid #e2e8f0;
}

.mt-typing-dot {
  width: 6px;
  height: 6px;
  background: #94a3b8;
  border-radius: 50%;
  animation: typingBounce 1.2s infinite ease-in-out;
}

.mt-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.mt-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Ficha Técnica Card */
.mt-datasheet-card {
  background: #ffffff;
  border: 1.5px solid #0284c7;
  border-radius: 12px;
  padding: 14px;
  margin-top: 8px;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.12);
}

.mt-datasheet-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #002c66;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 6px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 6px;
}

.mt-datasheet-name {
  font-weight: 700;
  color: #0284c7;
  font-size: 0.95rem;
}

.mt-datasheet-specs {
  font-size: 0.82rem;
  color: #475569;
  background: #f1f5f9;
  padding: 8px 10px;
  border-radius: 6px;
  margin: 8px 0;
}

.mt-datasheet-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.mt-datasheet-btn {
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mt-datasheet-btn--primary {
  background: #002c66;
  color: #ffffff;
}

.mt-datasheet-btn--primary:hover {
  background: #004191;
}

/* Cotización Card */
.mt-quote-card {
  background: #ffffff;
  border: 1.5px solid #16a34a;
  border-radius: 12px;
  padding: 14px;
  margin-top: 8px;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.12);
}

.mt-quote-title {
  color: #15803d;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 6px;
}

.mt-quote-badge {
  background: #dcfce7;
  color: #15803d;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 700;
}

.mt-quote-table {
  width: 100%;
  font-size: 0.82rem;
  border-collapse: collapse;
  margin-bottom: 10px;
}

.mt-quote-table th {
  text-align: left;
  color: #64748b;
  border-bottom: 1px solid #cbd5e1;
  padding: 4px 0;
}

.mt-quote-table td {
  padding: 6px 0;
  color: #1e293b;
  border-bottom: 1px dashed #e2e8f0;
}

.mt-quote-totals {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  background: #f8fafc;
  padding: 8px 10px;
  border-radius: 8px;
}

.mt-quote-row {
  display: flex;
  justify-content: space-between;
  color: #475569;
}

.mt-quote-row--total {
  font-weight: 800;
  color: #002c66;
  font-size: 0.95rem;
  border-top: 1px solid #cbd5e1;
  padding-top: 4px;
  margin-top: 2px;
}

/* Chat Input Bar */
.mt-bot-footer {
  padding: 12px 16px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 8px;
  align-items: center;
}

.mt-bot-input {
  flex: 1;
  border: 1.5px solid #cbd5e1;
  border-radius: 24px;
  padding: 10px 16px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.mt-bot-input:focus {
  border-color: #002c66;
}

.mt-bot-send {
  background: #002c66;
  color: #ffffff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.mt-bot-send:hover {
  background: #001a40;
}

/* Floating Drawer Container */
.mt-floating-widget {
  position: fixed;
  bottom: 84px;
  right: 24px;
  z-index: 9999;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 560px;
  display: none;
  flex-direction: column;
  box-shadow: 0 16px 48px rgba(0,0,0,0.25);
  border-radius: 16px;
  animation: widgetSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes widgetSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.mt-floating-widget.is-open {
  display: flex;
}

/* Cookie Card Styles */
.mt-cookie-card {
  background: #f8fafc;
  border: 1.5px solid #002c66;
  border-radius: 12px;
  padding: 14px;
  margin-top: 10px;
}

.mt-cookie-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #002c66;
  font-size: 0.95rem;
  border-bottom: 1px solid #cbd5e1;
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.mt-cookie-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
  font-size: 0.84rem;
}

.mt-cookie-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #ffffff;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  cursor: pointer;
}

.mt-cookie-row input[type="checkbox"] {
  accent-color: #002c66;
  margin-top: 3px;
}

/* Industrial Maintenance Floating Gear FAB Badge */
@keyframes mtGearRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes mtStatusPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1.08); box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.mt-industrial-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  background: linear-gradient(135deg, #001a40 0%, #002c66 50%, #0284c7 100%);
  color: #ffffff;
  padding: 10px 18px 10px 14px;
  border-radius: 40px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 10px 30px rgba(0, 44, 102, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  backdrop-filter: blur(10px);
}

.mt-industrial-fab:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 16px 38px rgba(2, 132, 199, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.5);
}

.mt-industrial-fab:active {
  transform: translateY(-1px) scale(0.98);
}

.mt-industrial-fab__gear-box {
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  position: relative;
  flex-shrink: 0;
}

.mt-industrial-fab__gear-img {
  width: 22px;
  height: 22px;
  animation: mtGearRotate 16s linear infinite;
  transition: animation-duration 0.3s;
}

.mt-industrial-fab:hover .mt-industrial-fab__gear-img {
  animation-duration: 4s;
}

.mt-industrial-fab__text {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.15;
}

.mt-industrial-fab__title {
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.mt-industrial-fab__sub {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  color: #bae6fd;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.mt-industrial-fab__status {
  width: 10px;
  height: 10px;
  background: #22c55e;
  border-radius: 50%;
  flex-shrink: 0;
  animation: mtStatusPulse 2s infinite;
}
