* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

/* ===== View Container ====== */
.view-container {
  width: 100%;
  min-height: 100vh;
  background-color: #ffffff;
}

/* ===== Header ===== */
.header {
  width: 100%;
  padding: 20px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.logo { height: 35px; }

.auth-buttons { display: flex; gap: 16px; }

.btn {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  border: none;
}

.login { background: black; color: white; }
.signup { background: transparent; border: 1px solid #E0E0E0; color: black; }

/* Mobile header spacing tweaks */
@media (max-width: 768px) {
  .header { padding: 12px 16px; }
  .logo { height: 30px; }
  .auth-buttons { gap: 8px; }
  .btn { padding: 8px 12px; font-size: 14px; }
}

/* ===== Main ===== */
.main-container {
  text-align: center;
  margin-top: 60px;
}

.main-container h1 {
  font-size: 36px;
  line-height: 1.4;
  margin-bottom: 40px;
  color: #1A1A1A;
}

/* ===== Coach Card ===== */
.coach-card {
  width: 300px;
  margin: auto;
  background: white;
  border-radius: 12px;
  padding: 30px 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.coach-photo-wrap { position: relative; width: 88px; height: 88px; }

.coach-img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: block;
}

.rating {
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  background: #454343;
  color: white;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
}

.star { color: #FFD700; }

.status-dot {
  position: absolute;
  right: -4px;
  top: 10px;
  width: 16px;
  height: 16px;
  background: #22C55E;
  border-radius: 50%;
  border: 2px solid white;
  z-index: 5;
  /* half on image, half outside - positioned like reference */
  transform: translate(0, 0);
}

.coach-info h2 {
  font-size: 18px;
  color: #1A1A1A;
  display: flex;
  align-items: center;
  gap: 8px;
}

.verified { width: 20px; height: 20px; }

.coach-info p {
  font-size: 14px;
  color: #666;
  line-height: 1.4;
}

/* ===== Chat Box ===== */
.chat-box {
  width: 600px;
  max-width: 90vw;
  margin: 40px auto;
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 12px;
}

#chat-input {
  flex: 1;
  padding: 16px;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  font-size: 16px;
  background: #FAFAFA;
  border: none;
  outline: none;
  font-size: 16px;
  color: #9E9E9E;
}

.plus-icon { width: 20px; margin-right: 10px; }

.send-btn {
  background: black;
  border: none;
  border-radius: 50%;
  padding: 10px;
  cursor: pointer;
}

.send-btn img { width: 20px; transform: rotate(90deg); }

/* ===== Suggestions ===== */
.suggestions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.suggestions span {
  background: #FAFAF8;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  color: #4F4F4F;
  border: 1px solid rgba(209, 209, 209, 0.64);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  cursor: pointer;
}

/* ===== Modal (Login + Signup) ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-overlay.active { display: flex; }

.modal-box {
  width: 420px;
  max-width: 92vw;
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
  position: relative;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.modal-close {
  position: absolute;
  right: 12px;
  top: 10px;
  font-size: 22px;
  background: none;
  border: 0;
  cursor: pointer;
  color: #666;
}

.modal-foot { 
  text-align: center; 
  margin-top: 16px; 
}

.link { 
  color: #1a73e8; 
  text-decoration: none; 
  font-size: 14px;
}
.link:hover { text-decoration: underline; }

/* ===== Clerk Override (so it fits modal) ===== */
.cl-card {
  box-shadow: none !important;
  border: none !important;
}
.cl-card, .cl-rootBox {
  width: 100% !important;
}
.cl-header, .cl-footer {
  text-align: center;
}

/* ===== Prevent Overlapping Login Boxes ===== */
/* Hide any potential hidden login forms */
[data-clerk-component="sign-in"],
[data-clerk-component="sign-up"] {
  display: none !important;
}

/* Ensure only our modal shows */
#clerk-login,
#clerk-signup {
  width: 100%;
  min-height: 300px;
}

/* Hide any other potential login elements */
.cl-rootBox:not(.modal-box .cl-rootBox) {
  display: none !important;
}

/* Force modal positioning */
.modal-overlay.active {
  z-index: 9999 !important;
}

/* Hide any background login forms */
body > .cl-rootBox:not(.modal-box .cl-rootBox) {
  display: none !important;
}

/* Ensure Clerk components only show in our modals */
.cl-rootBox {
  position: relative !important;
  z-index: 1 !important;
}

/* Additional aggressive hiding */
/* Hide any floating login forms */
form[action*="login"],
form[action*="signin"],
form[action*="signup"],
.login-form,
.signin-form,
.signup-form {
  display: none !important;
}

/* Hide any hidden elements that might contain login forms */
[style*="display: none"] form,
[style*="visibility: hidden"] form,
.hidden form {
  display: none !important;
}

/* Ensure our modals are on top */
#auth-modal-overlay,
#signup-modal-overlay {
  z-index: 10000 !important;
}

/* Hide any other modals or overlays */
.modal:not(#auth-modal-overlay):not(#signup-modal-overlay),
.overlay:not(#auth-modal-overlay):not(#signup-modal-overlay) {
  display: none !important;
}

/* Force hide any Clerk elements outside our modals */
body > [data-clerk-component],
body > .cl-rootBox,
body > .cl-card {
  display: none !important;
}

/* Only allow Clerk elements inside our modal boxes */
.modal-box [data-clerk-component],
.modal-box .cl-rootBox,
.modal-box .cl-card {
  display: block !important;
}
