/* ------------------------ RESET & BASE ------------------------ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body, html {
  height: 100%;
  font-family: "Poppins", sans-serif;
  background: #f4f4f8;
  color: #2d3748;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* ------------------------ HEADER ------------------------ */
header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 70px;
  background: linear-gradient(135deg, #544dd1 0%, #7c3aed 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  z-index: 1001;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-circle img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 50%;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

/* ------------------------ HAMBURGER BUTTON - MOBILE ONLY ------------------------ */
.sidebar-toggle-btn {
  display: none;
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  border: none;
  color: white;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 1.6rem;
  cursor: pointer;
  transition: all 0.3s ease;
}
.sidebar-toggle-btn:hover {
  background: linear-gradient(135deg, #8a63f7 0%, #5c52e0 100%);
  transform: scale(1.05);
}

/* ------------------------ SIDEBAR (DESKTOP LEFT) ------------------------ */
.sidebar {
  position: fixed;
  top: 70px; 
  left: 0;
  width: 240px; 
  height: calc(100vh - 70px);
  background: linear-gradient(135deg, #544dd1 0%, #7c3aed 100%);
  padding: 20px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  overflow-y: auto;
  z-index: 1000;
}

.sidebar a, .sidebar button.customer-care-btn {
  display: block;
  padding: 12px 18px;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  background: linear-gradient(135deg, #473dfd 0%, #7c3aed 100%);
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  text-align: left;
  font-size: 1rem;
}

.sidebar a:hover, .sidebar a.active-tab, .sidebar button.customer-care-btn:hover {
  background: linear-gradient(135deg, #6d5fed 0%, #9c75ff 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

/* ------------------------ MAIN IFRAME ------------------------ */
#mainFrame {
  position: fixed;
  top: 70px; 
  left: 240px; /* sidebar width */
  width: calc(100% - 240px);
  height: calc(100vh - 70px);
  border: none;
  background: white;
  transition: all 0.3s ease;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
  border-radius: 4px;
}

/* ------------------------ BACK BUTTON ------------------------ */
.back-btn {
  position: fixed; 
  bottom: 20px; 
  right: 20px;
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  color: white; 
  border: none; 
  padding: 14px 20px; 
  border-radius: 10px;
  font-weight: 600; 
  cursor: pointer; 
  box-shadow: 0 6px 18px rgba(0,0,0,0.35); 
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 1002;
}
.back-btn:hover {
  transform: translateY(-2px); 
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

/* ------------------------ CUSTOMER CARE PANEL ------------------------ */
#supportPanel {
  position: fixed; 
  top: 100px; 
  right: 20px; 
  width: 320px;
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  color: white;
  padding: 20px; 
  border-radius: 16px; 
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  font-family: "Poppins", sans-serif; 
  z-index: 1003;
  opacity: 0; 
  pointer-events: none; 
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#supportPanel.show {
  opacity: 1; 
  pointer-events: auto; 
  transform: translateY(0);
}

#supportPanel h3 {
  margin-top: 0; 
  font-size: 1.4rem;
}
#supportPanel p {
  font-size: 0.95rem; 
  line-height: 1.4; 
  margin: 0.5em 0;
}
#supportPanel a {
  color: #ffd966; 
  text-decoration: underline;
}
#supportPanel button {
  width: 100%; 
  padding: 12px; 
  font-size: 1rem; 
  font-weight: 600; 
  color: #4f46e5; 
  background: white; 
  border: none; 
  border-radius: 8px; 
  cursor: pointer; 
  margin-top: 10px;
  transition: transform 0.2s ease;
}
#supportPanel button:hover {
  background: #e0e7ff; 
  transform: translateY(-2px);
}

/* ------------------------ SEARCH BOX ------------------------ */
.search-box {
  display: none; /* desktop: hidden */
  margin: 15px auto;
  width: 80%;
  max-width: 300px;
  padding: 10px 15px;
  font-size: 1rem;
  text-align: center;
  border-radius: 25px;
  border: none;
  background: linear-gradient(135deg, #444, #888);
  color: white;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}
.search-box::placeholder {
  color: rgba(255,255,255,0.7);
  text-align: center;
}
.search-box:focus {
  outline: none;
  background: linear-gradient(135deg, #666, #ccc);
  color: #222;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  transform: translateY(-1px);
}

/* ------------------------ MOBILE / TABLET RESPONSIVE ------------------------ */
@media (max-width: 768px) {
  /* Hamburger button visible */
  .sidebar-toggle-btn { display: block; }

  /* Sidebar slides from right */
  .sidebar {
    top: 70px;
    right: 0;
    left: auto;
    transform: translateX(100%);
    width: 260px;
    height: calc(100vh - 70px);
    padding: 20px 15px;
  }
  .sidebar.show {
    transform: translateX(0);
    transition: transform 0.3s ease;
  }

  /* Sidebar links larger and centered */
  .sidebar a, .sidebar button.customer-care-btn {
    font-size: 1.1rem;
    padding: 14px 20px;
    text-align: center;
  }

  /* Main frame full width */
  #mainFrame { 
    left: 0; 
    width: 100%; 
  }

  /* Show search box in mobile */
  .search-box { display: block; }

  /* Customer Care button inside mobile menu */
  .sidebar button.customer-care-btn {
    margin-top: auto;
  }
}
/* ------------------------ SEARCH BOX (MOBILE ONLY) ------------------------ */
.mobile-search-wrapper {
  display: none; /* hidden by default, shown in mobile */
  position: relative;
  width: 90%;
  max-width: 400px;
  margin: 15px auto;
}

.mobile-search-wrapper input[type="search"] {
  width: 100%;
  padding: 10px 40px 10px 15px; /* space for mic icon */
  font-size: 1rem;
  border-radius: 25px;
  border: 1px solid #ccc;
  outline: none;
  transition: all 0.3s ease;
  background: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  color: #222;
}

.mobile-search-wrapper input[type="search"]::placeholder {
  color: #888;
}

.mobile-search-wrapper input[type="search"]:focus {
  border-color: #7c3aed;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.mobile-search-wrapper .mic-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #7c3aed;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.mobile-search-wrapper .mic-btn:hover {
  color: #4f46e5;
  transform: scale(1.1);
}

/* ------------------------ SHOW SEARCH ONLY ON MOBILE ------------------------ */
@media (max-width: 768px) {
  .mobile-search-wrapper {
    display: block;
  }
}
