/* User Profile & Auth Modal Styles */
/* Extracted from templatemo-edu-meeting.css */

@font-face {
  font-family: 'Fonarto';
  src: url('../fonts/Fonarto.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Isidora';
  src: url('../fonts/Isidora.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Gibed';
  src: url('../fonts/gibed.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Quizlo';
  src: url('../fonts/Quizlo.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

:root {
  --emerald-deep: #085D36;
  --emerald-royal: #004B3B;
  --emerald-main: #097969;
  --emerald-light: #50C878;
  --emerald-accent: #187C19;
  --olive-drab: #6B8E23;
  --royal-crimson: #940128;
  --rich-gold: #D4AF37;

  --primary-color: var(--emerald-main);
  --secondary-color: var(--emerald-light);
  --accent-color: var(--royal-crimson);
  --bg-dark: #021a11;
  --bg-darker: #01100a;
  --text-white: #f0fff4;

  --font-nature: 'Isidora', sans-serif;
  --font-gibed: 'Gibed', sans-serif;
  --font-quizlo: 'Quizlo', sans-serif;
  --font-fonarto: 'Fonarto', sans-serif;
}

.user-profile {
  position: relative;
}

/* =============================================
   FIXED HEADER LAYOUT - DESKTOP & MOBILE
   Applies to all pages using this stylesheet
   ============================================= */

/* Desktop: Back (left) - Title (center) - User Icon (right) in single row */
.header-main {
  display: grid !important;
  grid-template-columns: minmax(40px, auto) 1fr minmax(40px, auto) !important;
  align-items: center !important;
  gap: 2rem !important;
  padding-top: 1rem !important;
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.back-button-container {
  justify-self: start !important;
  flex: none !important;
  min-width: auto !important;
  display: flex;
  align-items: center;
}

.header-content {
  text-align: center !important;
  justify-self: center !important;
  flex: none !important;
}

.header-content h1 {
  font-family: var(--font-gibed);
  font-size: 2.5rem !important;
  margin-bottom: 0.2rem !important;
  font-weight: 800;
}

.header-content .subtitle {
  font-size: 1rem !important;
  color: #cccccc;
  margin: 0;
}

.user-profile-container {
  justify-self: end !important;
  flex: none !important;
  min-width: auto !important;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* Tablet & Mobile: Buttons side-by-side at top, Title centered below */
@media (max-width: 992px) {
  .header-main {
    display: flex !important;
    flex-wrap: wrap !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0.75rem !important;
    padding-top: 0 !important;
    padding-bottom: 2rem;
  }

  /* Both buttons appear side by side with order: 0 */
  .back-button-container,
  .user-profile-container {
    order: 0 !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: auto !important;
    justify-content: initial !important;
  }

  /* Title takes full width and appears below buttons */
  .header-content {
    order: 1 !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    text-align: center !important;
    margin-top: 0.5rem;
  }

  .header-content h1 {
    font-size: 2rem !important;
    margin-bottom: 0.3rem !important;
    line-height: 1.2;
  }

  .header-content .subtitle {
    margin-bottom: 0 !important;
  }
}

/* Additional override for 768px breakpoint */
@media (max-width: 768px) {
  .header-main {
    display: flex !important;
    flex-wrap: wrap !important;
    flex-direction: row !important;
    gap: 15px;
  }

  .back-button-container,
  .user-profile-container {
    order: 0 !important;
    width: auto !important;
    justify-content: center;
  }

  .header-content {
    order: 1 !important;
    flex: 0 0 100% !important;
  }
}


#user-menu-toggle {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--emerald-main), var(--royal-crimson));
  border-radius: 50%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  border: none;
  outline: none;
}

#user-menu-toggle:hover {
  background: linear-gradient(135deg, var(--royal-crimson), var(--emerald-main));
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

#user-menu-toggle.logged-in {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

#user-menu-toggle.logged-in:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.5);
}

#user-menu-toggle i,
.user-initial {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.user-initial {
  display: block;
  line-height: 1;
}

.user-dropdown {
  position: absolute;
  top: 120%;
  right: 0;
  background-color: var(--bg-darker);
  width: 170px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  margin-top: 5px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-dropdown.active {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0);
}

.user-dropdown a {
  display: block;
  padding: 12px 20px;
  color: var(--text-white) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s;
}

.user-dropdown a:last-child {
  border-bottom: none;
}

.user-dropdown a:hover {
  background-color: var(--emerald-royal);
  color: var(--text-white) !important;
  padding-left: 25px !important;
}

/* Auth Modal Styling - Claymorphism Design */
.auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(8, 93, 54, 0.15), rgba(9, 121, 105, 0.15));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  padding: 20px 10px;
}

@media (max-width: 767px) {
  .auth-modal {
    align-items: flex-start;
  }
}

.auth-modal.active {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Claymorphism Modal Content */
.auth-modal-content {
  background: linear-gradient(145deg, #f5f5f5, #e8e8e8);
  width: 100%;
  max-width: 440px;
  border-radius: 40px;
  padding: 50px 45px;
  position: relative;
  transform: scale(0.85) translateY(30px);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;

  /* Claymorphism shadows - soft and layered */
  box-shadow:
    20px 20px 60px rgba(0, 0, 0, 0.15),
    -20px -20px 60px rgba(255, 255, 255, 0.7),
    inset 2px 2px 5px rgba(255, 255, 255, 0.5),
    inset -2px -2px 5px rgba(0, 0, 0, 0.05);

  border: 1px solid rgba(255, 255, 255, 0.8);
}

.auth-modal.active .auth-modal-content {
  transform: scale(1) translateY(0);
}

.close-modal {
  position: absolute;
  top: 25px;
  right: 25px;
  width: 40px;
  height: 40px;
  font-size: 20px;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #f0f0f0, #d9d9d9);
  box-shadow:
    5px 5px 15px rgba(0, 0, 0, 0.1),
    -5px -5px 15px rgba(255, 255, 255, 0.7);
}

.close-modal:hover {
  color: var(--royal-crimson);
  transform: rotate(90deg) scale(1.1);
  box-shadow:
    3px 3px 10px rgba(0, 0, 0, 0.15),
    -3px -3px 10px rgba(255, 255, 255, 0.8);
}

.auth-modal-content h2 {
  font-size: 32px;
  font-weight: 800;
  color: #2d2d2d;
  margin-bottom: 35px;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: linear-gradient(135deg, var(--emerald-main), var(--royal-crimson));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.05);
  font-family: var(--font-gibed);
}

/* Claymorphism Input Fields */
.auth-form input {
  width: 100%;
  height: 55px;
  background: linear-gradient(145deg, #ffffff, #f5f5f5);
  border: none;
  border-radius: 20px;
  padding: 0 25px;
  margin-bottom: 20px;
  font-size: 15px;
  outline: none;
  color: #333;
  transition: all 0.3s ease;
  font-weight: 500;

  /* Inset shadow for depth */
  box-shadow:
    inset 4px 4px 10px rgba(0, 0, 0, 0.08),
    inset -4px -4px 10px rgba(255, 255, 255, 0.8);
}

.auth-form input::placeholder {
  color: #999;
  font-weight: 400;
}

.auth-form input:focus {
  background: linear-gradient(145deg, #ffffff, #fafafa);
  box-shadow:
    inset 6px 6px 12px rgba(0, 0, 0, 0.1),
    inset -6px -6px 12px rgba(255, 255, 255, 0.9),
    0 0 0 3px rgba(9, 121, 105, 0.15);
}

/* Claymorphism Button */
.auth-form button {
  width: 100%;
  height: 55px;
  background: linear-gradient(135deg, var(--emerald-main), var(--emerald-royal));
  color: #ffffff;
  border: none;
  font-family: var(--font-quizlo);
  border-radius: 20px;
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 15px;
  cursor: pointer;
  transition: all 0.3s ease;

  /* Raised button effect */
  box-shadow:
    8px 8px 20px rgba(0, 0, 0, 0.15),
    -8px -8px 20px rgba(255, 255, 255, 0.3);

  position: relative;
  overflow: hidden;
}

.auth-form button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.auth-form button:hover::before {
  left: 100%;
}

.auth-form button:hover {
  background: linear-gradient(135deg, var(--emerald-royal), var(--emerald-main));
  transform: translateY(-3px);
  box-shadow:
    10px 10px 25px rgba(0, 0, 0, 0.2),
    -10px -10px 25px rgba(255, 255, 255, 0.4);
}

.auth-form button:active {
  transform: translateY(-1px);
  box-shadow:
    5px 5px 15px rgba(0, 0, 0, 0.15),
    -5px -5px 15px rgba(255, 255, 255, 0.3);
}

.auth-links {
  margin-top: 30px;
  text-align: center;
}

.auth-links p {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
  font-weight: 500;
}

.auth-links a {
  color: var(--emerald-main) !important;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s;
  position: relative;
}

.auth-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--emerald-main);
  transition: width 0.3s ease;
}

.auth-links a:hover::after {
  width: 100%;
}

.auth-links a:hover {
  color: var(--royal-crimson) !important;
}

.auth-links a.forgot-pw-link {
  font-size: 13px;
  display: block;
  margin-top: 12px;
}

.auth-modal-p {
  color: #777;
  margin-bottom: 25px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
}


/* Responsive */
@media (max-width: 767px) {
  .auth-modal-content {
    width: 90%;
    padding: 40px 30px;
    border-radius: 35px;
  }

  .auth-modal-content h2 {
    font-size: 26px;
    margin-bottom: 25px;
  }

  .auth-form input,
  .auth-form button {
    height: 50px;
    border-radius: 18px;
  }
}

/* Donate Tooltip Styles for Footer */
.footer-btn.donate {
  position: relative;
}

.donate-tooltip {
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  background: rgba(15, 5, 26, 0.98);
  /* deep-space */
  border: 1px solid var(--emerald-royal);
  border-radius: 15px;
  padding: 20px;
  color: var(--text-white);
  font-size: 13px;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  z-index: 2000;
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  pointer-events: none;
  line-height: 1.5;
}

.footer-btn.donate:hover .donate-tooltip {
  opacity: 1;
  visibility: visible;
  bottom: 140%;
}

.donate-tooltip strong {
  display: block;
  color: var(--emerald-main);
  font-size: 15px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(0, 100, 102, 0.3);
  padding-bottom: 8px;
  font-family: var(--font-quizlo);
  font-weight: 700;
}

.donate-tooltip p {
  color: #e0e0e0;
  margin-bottom: 12px;
  font-weight: 400;
}

.donate-tooltip em {
  font-style: italic;
  color: var(--royal-crimson);
  display: block;
  font-weight: 500;
  margin-top: 10px;
}

/* Add a small arrow to the tooltip */
.donate-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -8px;
  border-width: 8px;
  border-style: solid;
  border-color: var(--royal-crimson) transparent transparent transparent;
}

/* Global Header Override to prevent clipping on mobile */

/* =============================================
   PREMIUM MOBILE HEADER DESIGN (ANDROID/IOS)
   ============================================= */
/* Conflict removed - Header styles controlled by zyndora.css and React MainHeader component */

/* Mobile/Tablet styles for user-dropdown - Centered on mobile */
.header-area .main-nav .user-dropdown {
  position: absolute !important;
  top: 70px !important;
  right: 0 !important;
  width: 180px !important;
  background: rgba(1, 26, 17, 0.98) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  backdrop-filter: blur(20px) !important;
  border-radius: 12px !important;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6) !important;
  padding: 10px 0 !important;
  display: none;
  z-index: 10005 !important;
  text-align: left !important;
  border: 1px solid rgba(80, 200, 120, 0.2) !important;
}

@media (max-width: 767px) {
  .header-area .main-nav .user-dropdown {
    position: absolute !important;
    top: 60px !important;
    left: auto !important;
    right: -10px !important;
    /* Align near the icon */
    width: 160px !important;
    max-width: none !important;
    transform: none !important;
    border-radius: 12px !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7) !important;
  }
}

.header-area .main-nav .user-dropdown::before {
  display: none !important;
}

.header-area .main-nav .user-dropdown li,
.header-area .main-nav .user-dropdown a {
  width: 100% !important;
  border-bottom: 1px solid rgba(80, 200, 120, 0.1) !important;
  padding: 0 !important;
  margin: 0 !important;
  display: block !important;
}

.header-area .main-nav .user-dropdown a {
  color: var(--emerald-light) !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  height: auto !important;
  line-height: normal !important;
  padding: 15px 20px !important;
  /* Ensure height comes from padding */
  background: transparent !important;
  text-decoration: none !important;
  transition: all 0.3s ease !important;
}

.header-area .main-nav .user-dropdown a:hover {
  color: #fff !important;
  background: var(--emerald-royal) !important;
  padding-left: 25px !important;
}

.header-area .main-nav .user-dropdown a:last-child {
  border-bottom: none !important;
}

/* Unified Footer Responsive Arrangement Overrides */
@media (max-width: 991px) {

  .footer-container,
  .react-footer-container {
    flex-direction: row !important;
    justify-content: center !important;
    gap: 1.5rem !important;
    flex-wrap: wrap !important;
  }

  .footer-right,
  .react-footer-container .footer-right {
    order: 1 !important;
    flex: 0 0 auto !important;
    margin-bottom: 0 !important;
  }

  .footer-left,
  .react-footer-container .footer-left {
    order: 2 !important;
    flex: 0 0 auto !important;
    justify-content: center !important;
    flex-direction: row-reverse !important;
    gap: 1rem !important;
    width: auto !important;
  }

  .footer-center,
  .react-footer-container .footer-center {
    order: 3 !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    margin-top: 10px !important;
  }
}

@media (max-width: 480px) {
  .react-footer-container {
    flex-direction: column !important;
    gap: 1rem !important;
    padding: 1rem 10px !important;
  }

  .footer-right,
  .react-footer-container .footer-right {
    order: 1 !important;
    width: 100% !important;
    flex: 0 0 100% !important;
    justify-content: center !important;
    margin-bottom: 5px !important;
  }

  .footer-left,
  .react-footer-container .footer-left {
    order: 2 !important;
    width: 100% !important;
    flex: 0 0 100% !important;
    justify-content: center !important;
    flex-direction: row-reverse !important;
    gap: 0.5rem !important;
  }

  .footer-center,
  .react-footer-container .footer-center {
    order: 3 !important;
    width: 100% !important;
    flex: 0 0 100% !important;
    font-size: 0.8rem !important;
    margin-top: 5px !important;
  }

  .footer-btn,
  .react-footer-container .footer-btn {
    padding: 0.5rem 0.8rem !important;
    font-size: 0.8rem !important;
    gap: 4px !important;
  }

  .dev-avatar,
  .dev-img,
  .react-footer-container .dev-avatar {
    width: 30px !important;
    height: 30px !important;
  }

  .developer-info,
  .react-footer-container .developer-info {
    padding: 0.4rem 0.8rem !important;
    gap: 8px !important;
  }

  .developer-info span,
  .react-footer-container .developer-info span {
    font-size: 0.8rem !important;
  }
}