/* =========================================================
   MIRAI STARK — shared component styles
   Carousel arrows / Detail modal / Chatbot widget
   Uses the same CSS custom properties defined on each page:
   --bg --surface --surface-2 --line --text --text-mute --accent --accent-2
   ========================================================= */

/* CAROUSEL */
.carousel{
  position:relative;
}
.carousel-track{
  display:flex;
  gap:22px;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  scroll-behavior:smooth;
  padding-bottom:6px;
  -ms-overflow-style:none;
  scrollbar-width:none;
}
.carousel-track::-webkit-scrollbar{ display:none; }
.carousel-track > *{ scroll-snap-align:start; flex:0 0 auto; }

.carousel-arrow{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:42px; height:42px;
  border-radius:50%;
  border:1px solid var(--line);
  background:rgba(10,12,16,0.85);
  color:var(--text);
  font-size:18px;
  cursor:pointer;
  z-index:5;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}
.carousel-arrow:hover{ border-color:var(--accent); color:var(--accent-2); }
.carousel-arrow:disabled{ opacity:0.3; cursor:default; }
.carousel-arrow.prev{ left:-14px; }
.carousel-arrow.next{ right:-14px; }
@media (max-width:640px){
  .carousel-arrow{ width:36px; height:36px; }
  .carousel-arrow.prev{ left:-6px; }
  .carousel-arrow.next{ right:-6px; }
}

/* DETAIL MODAL */
.ms-modal{
  position:fixed;
  inset:0;
  z-index:200;
  display:none;
}
.ms-modal.is-open{ display:block; }
.ms-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(5,6,8,0.78);
  backdrop-filter:blur(3px);
}
.ms-modal-panel{
  position:relative;
  max-width:860px;
  margin:6vh auto;
  max-height:88vh;
  overflow-y:auto;
  background:var(--surface, #12151b);
  border:1px solid var(--line, #232a34);
  display:grid;
  grid-template-columns:1fr 1fr;
}
.ms-modal-img{ background:#000; }
.ms-modal-img img{ width:100%; height:100%; object-fit:cover; display:block; }
.ms-modal-body{ padding:32px; }
.ms-modal-body .idx{
  font-family:'JetBrains Mono', monospace;
  font-size:12px;
  color:var(--accent-2, #ffb200);
  letter-spacing:0.08em;
}
.ms-modal-body h3{
  font-family:'Rajdhani', sans-serif;
  font-weight:700;
  text-transform:uppercase;
  font-size:28px;
  margin:6px 0 14px;
  color:var(--text, #eef1f5);
}
.ms-modal-body p{
  color:var(--text-mute, #8b95a3);
  font-size:14.5px;
  line-height:1.6;
  margin:0 0 18px;
}
.ms-modal-body ul{
  padding-left:18px;
  margin:0;
  color:var(--text, #eef1f5);
  font-size:14px;
  line-height:1.7;
}
.ms-modal-close{
  position:absolute;
  top:14px; right:14px;
  width:34px; height:34px;
  border-radius:50%;
  border:1px solid var(--line, #232a34);
  background:rgba(10,12,16,0.7);
  color:var(--text, #eef1f5);
  font-size:20px;
  line-height:1;
  cursor:pointer;
  z-index:2;
}
.ms-modal-close:hover{ border-color:var(--accent, #ff6a1a); }
@media (max-width:720px){
  .ms-modal-panel{ grid-template-columns:1fr; margin:3vh 16px; max-height:92vh; }
  .ms-modal-img{ height:220px; }
}

/* QUOTE FORM MODAL */
.ms-quote-panel{
  position:relative;
  max-width:520px;
  margin:6vh auto;
  max-height:88vh;
  overflow-y:auto;
  background:var(--surface, #12151b);
  border:1px solid var(--line, #232a34);
  padding:36px;
}
.ms-quote-panel .section-label{
  font-family:'JetBrains Mono', monospace;
  font-size:12px;
  letter-spacing:0.14em;
  color:var(--accent-2, #ffb200);
  text-transform:uppercase;
  display:block;
  margin-bottom:8px;
}
.ms-quote-panel h3{
  font-family:'Rajdhani', sans-serif;
  font-weight:700;
  text-transform:uppercase;
  font-size:28px;
  margin:0 0 10px;
  color:var(--text, #eef1f5);
}
.ms-quote-intro{
  color:var(--text-mute, #8b95a3);
  font-size:14px;
  line-height:1.6;
  margin:0 0 24px;
}
#ms-quote-form{
  display:flex;
  flex-direction:column;
  gap:16px;
}
#ms-quote-form label{
  display:flex;
  flex-direction:column;
  gap:6px;
  font-family:'JetBrains Mono', monospace;
  font-size:11px;
  letter-spacing:0.06em;
  text-transform:uppercase;
  color:var(--text-mute, #8b95a3);
}
#ms-quote-form label .req{ color:var(--accent, #ff6a1a); margin-left:2px; }
#ms-quote-form input,
#ms-quote-form textarea{
  background:var(--surface-2, #171c24);
  border:1px solid var(--line, #232a34);
  color:var(--text, #eef1f5);
  font-family:'Inter', sans-serif;
  font-size:14px;
  padding:11px 12px;
  resize:vertical;
}
#ms-quote-form input:focus,
#ms-quote-form textarea:focus{
  outline:none;
  border-color:var(--accent, #ff6a1a);
}
#ms-quote-form .btn{ align-self:flex-start; margin-top:4px; }
.ms-quote-status{
  font-size:13px;
  margin:4px 0 0;
  min-height:18px;
}
.ms-quote-status.ok{ color:#3ddc84; }
.ms-quote-status.error{ color:var(--accent, #ff6a1a); }
@media (max-width:640px){
  .ms-quote-panel{ margin:4vh 16px; padding:26px; }
}

/* CHATBOT WIDGET */
.ms-chat-launcher{
  position:fixed;
  bottom:24px; right:24px;
  z-index:150;
  display:flex;
  align-items:center;
  gap:8px;
  background:linear-gradient(135deg, var(--accent, #ff6a1a), var(--accent-2, #ffb200));
  color:#12100c;
  border:none;
  padding:13px 20px;
  font-family:'Rajdhani', sans-serif;
  font-weight:700;
  letter-spacing:0.06em;
  font-size:14px;
  cursor:pointer;
  clip-path:polygon(0 0, 100% 0, 100% 70%, 90% 100%, 0 100%);
  box-shadow:0 8px 26px -6px rgba(255,106,26,0.5);
}
.ms-chat-dot{
  width:8px; height:8px;
  border-radius:50%;
  background:#12100c;
  display:inline-block;
  opacity:0.55;
}
.ms-chat-dot.on{ background:#3ddc84; opacity:1; box-shadow:0 0 6px #3ddc84; }

.ms-chat-panel{
  position:fixed;
  bottom:88px; right:24px;
  z-index:150;
  width:340px;
  max-width:calc(100vw - 32px);
  height:440px;
  max-height:calc(100vh - 140px);
  background:var(--surface, #12151b);
  border:1px solid var(--line, #232a34);
  display:none;
  flex-direction:column;
  box-shadow:0 20px 60px -12px rgba(0,0,0,0.6);
}
.ms-chat-panel.is-open{ display:flex; }
.ms-chat-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 16px;
  border-bottom:1px solid var(--line, #232a34);
  font-family:'Rajdhani', sans-serif;
  color:var(--text, #eef1f5);
  font-size:14px;
}
.ms-chat-head .mono{ font-family:'JetBrains Mono', monospace; font-size:11px; color:var(--text-mute,#8b95a3); }
.ms-chat-close{
  background:none; border:none; color:var(--text-mute,#8b95a3); font-size:20px; cursor:pointer; line-height:1;
}
.ms-chat-body{
  flex:1;
  overflow-y:auto;
  padding:14px 16px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.ms-msg{
  font-size:13.5px;
  line-height:1.5;
  padding:10px 12px;
  max-width:85%;
  border:1px solid var(--line, #232a34);
}
.ms-msg-bot{
  align-self:flex-start;
  background:var(--surface-2, #171c24);
  color:var(--text, #eef1f5);
}
.ms-msg-user{
  align-self:flex-end;
  background:var(--accent-dim, rgba(255,106,26,0.14));
  border-color:var(--accent, #ff6a1a);
  color:var(--text, #eef1f5);
}
.ms-chat-chips{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  padding:0 16px 10px;
}
.ms-chip{
  font-family:'JetBrains Mono', monospace;
  font-size:11px;
  color:var(--accent-2, #ffb200);
  background:transparent;
  border:1px solid var(--line, #232a34);
  padding:5px 9px;
  cursor:pointer;
}
.ms-chip:hover{ border-color:var(--accent, #ff6a1a); }
.ms-chat-input{
  display:flex;
  border-top:1px solid var(--line, #232a34);
}
.ms-chat-input input{
  flex:1;
  background:transparent;
  border:none;
  padding:12px 14px;
  color:var(--text, #eef1f5);
  font-family:'Inter', sans-serif;
  font-size:13px;
}
.ms-chat-input input:focus{ outline:none; }
.ms-chat-input button{
  background:var(--accent, #ff6a1a);
  color:#12100c;
  border:none;
  padding:0 18px;
  font-family:'Rajdhani', sans-serif;
  font-weight:700;
  letter-spacing:0.04em;
  cursor:pointer;
}
