/* DiscountHub AI Finder — full-page chat v3 (2026-10-01) */

/* The AI Finder page is the application itself. Remove the "card inside a page"
   feeling and let the conversation use the whole surface below the navbar. */
.ai-page .ai-page-title{
  display:none !important;
}

.ai-page .ai-shell{
  width:100%;
  max-width:none;
  height:calc(100svh - 82px);
  min-height:620px;
  margin:0;
  padding:0 max(28px,calc((100vw - 1280px)/2));
}

.ai-page .ai-workspace{
  display:block;
  width:100%;
  max-width:none;
  height:100%;
  margin:0;
}

.ai-page .ai-chat-card{
  width:100%;
  height:100%;
  min-height:0;
  overflow:hidden;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  backdrop-filter:none;
  display:grid;
  grid-template-rows:54px minmax(0,1fr) auto;
}

/* No separate DiscountHub Assistant panel header.
   Keep only the conversation action in the upper-right corner. */
.ai-page .ai-chat-head{
  min-height:54px;
  padding:10px 0 5px;
  gap:0;
  justify-content:flex-end;
  background:transparent;
  border:0;
}

.ai-page .ai-chat-head .ai-avatar,
.ai-page .ai-chat-head > div:nth-child(2){
  display:none !important;
}

.ai-page .ai-reset{
  min-height:36px;
  margin-left:auto;
  padding:0 13px;
  border-radius:11px;
  color:#b9c7df;
  background:rgba(255,255,255,.035);
  border:1px solid rgba(255,255,255,.08);
  box-shadow:none;
  font-size:11px;
  font-weight:800;
}

.ai-page .ai-reset:hover{
  color:#fff;
  border-color:rgba(66,234,255,.22);
  background:rgba(66,234,255,.05);
}

/* Conversation area */
.ai-page .ai-messages{
  width:100%;
  min-height:0;
  padding:22px 0 28px;
  overflow-y:auto;
  display:flex;
  flex-direction:column;
  gap:18px;
  scrollbar-width:thin;
  scrollbar-color:rgba(66,234,255,.22) transparent;
}

.ai-page .ai-message{
  width:100%;
  max-width:980px;
  margin:0 auto;
}

.ai-page .ai-message.assistant{
  align-items:flex-start;
  gap:11px;
}

.ai-page .ai-message.assistant::before{
  content:"";
  width:31px;
  height:31px;
  flex:0 0 31px;
  margin-top:2px;
  border-radius:9px;
  background:url("../assets/icon-180.png") center/cover no-repeat;
  box-shadow:0 6px 18px rgba(35,116,255,.16);
}

.ai-page .ai-message.assistant .ai-bubble{
  max-width:min(820px,84%);
  padding:5px 0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}

.ai-page .ai-message.user{
  justify-content:flex-end;
}

.ai-page .ai-message.user .ai-bubble{
  max-width:min(620px,72%);
  padding:11px 14px;
  border-radius:16px 16px 6px 16px;
  color:#fff;
  background:linear-gradient(135deg,rgba(35,116,255,.92),rgba(50,101,215,.84));
  border:1px solid rgba(116,174,255,.30);
  box-shadow:none;
}

.ai-page .ai-bubble p{
  margin:0;
  color:#edf4ff;
  font-size:14px;
  line-height:1.58;
}

.ai-page .ai-message.assistant .ai-bubble p{
  color:#e5edfb;
}

.ai-page .ai-message.loading::before{
  margin-top:8px;
}

.ai-page .ai-message.loading .ai-bubble{
  padding:10px 0;
}

.ai-page .ai-result-grid{
  width:min(938px,calc(100% - 42px));
  max-width:938px;
  margin:0 auto;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.ai-page .ai-result-card{
  border-radius:17px;
  background:rgba(4,11,29,.58);
  border-color:rgba(255,255,255,.09);
  box-shadow:none;
}

/* Composer floats naturally at the bottom of the page instead of living
   inside a boxed assistant card. */
.ai-page .ai-form{
  width:min(920px,calc(100% - 80px));
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  margin:0 auto 22px;
  padding:7px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:18px;
  background:rgba(8,18,43,.82);
  box-shadow:0 16px 48px rgba(0,0,0,.20),inset 0 1px 0 rgba(255,255,255,.035);
  backdrop-filter:blur(18px);
}

.ai-page .ai-form textarea{
  min-height:48px;
  max-height:140px;
  padding:13px 14px;
  border:0;
  border-radius:12px;
  color:#fff;
  background:transparent;
  box-shadow:none;
  font-size:14px;
  line-height:1.45;
}

.ai-page .ai-form textarea::placeholder{
  color:#6f82a8;
}

.ai-page .ai-form textarea:focus{
  border:0;
  background:transparent;
  box-shadow:none;
}

.ai-page .ai-form button{
  width:48px;
  min-width:48px;
  min-height:48px;
  padding:0;
  border-radius:13px;
  box-shadow:none;
}

.ai-page .ai-form button span{
  display:none;
}

.ai-page .ai-form button svg{
  width:19px;
  height:19px;
}

/* The normal marketing footer is not useful inside a full-screen chat. */
.ai-page > .footer{
  display:none;
}

@media(max-width:760px){
  .ai-page .ai-shell{
    height:calc(100svh - 72px);
    min-height:520px;
    padding-inline:13px;
  }

  .ai-page .ai-chat-card{
    grid-template-rows:48px minmax(0,1fr) auto;
  }

  .ai-page .ai-chat-head{
    min-height:48px;
    padding-top:7px;
  }

  .ai-page .ai-reset{
    min-height:34px;
    padding-inline:11px;
  }

  .ai-page .ai-messages{
    padding:14px 0 18px;
    gap:15px;
  }

  .ai-page .ai-message{
    max-width:100%;
  }

  .ai-page .ai-message.assistant::before{
    width:27px;
    height:27px;
    flex-basis:27px;
  }

  .ai-page .ai-message.assistant .ai-bubble{
    max-width:calc(100% - 40px);
  }

  .ai-page .ai-message.user .ai-bubble{
    max-width:86%;
  }

  .ai-page .ai-result-grid{
    width:calc(100% - 38px);
    grid-template-columns:1fr;
  }

  .ai-page .ai-form{
    width:100%;
    margin:0 0 10px;
    padding:6px;
    border-radius:16px;
  }

  .ai-page .ai-form button{
    width:44px;
    min-width:44px;
    min-height:44px;
  }
}
