@tailwind base;
@tailwind components;
@tailwind utilities;

/* ---------------------------
   Theme Variables
--------------------------- */
:root {
  --primary: #079ff1;               /* Light accent: blue */
  --hover-bg: rgba(15, 54, 253, 0.2);
  --secondary: #ccc;
  --bg-navbar-light: #f0f0f0;       /* Navbar light background */
  --bg-navbar-dark: #181818;        /* Navbar dark background */
  --bg-footer-light: #f0f0f0;       /* Footer light background */
  --bg-footer-dark: #181818;        /* Footer dark background */
  --text-footer-light: #079ff1;        /* Footer text in light mode */
  --text-footer-dark: #ffffff;      /* Footer text in dark mode */
  --bg-body: #079ff1;               /* default to primary for body bg */
  --black: #000000;
}

/* Dark mode overrides */
.dark {
  --primary: #ff4d4d;               /* Accent becomes red */
  --secondary: #ffffff;
  --hover-bg: rgba(255, 77, 77, 0.2);
  --bg-navbar: var(--bg-navbar-dark);
  --bg-footer: var(--bg-footer-dark);
  --text-footer: #ffffff;
  --bg-body: #121212;               /* set explicitly for body */
}

/* Light mode overrides */
.light {
  --primary: #079ff1;       
  --secondary: #000000;
  --bg-navbar: var(--bg-navbar-light);
  --bg-footer: var(--bg-footer-light);
  --text-footer: #000000;
  /* --bg-body: #808080;               white background */
  --bg-body: #d5d5d5;  
}

/* ---------------------------
   Global Resets & Base
--------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  zoom: 1; /* IE hack */
}

html {
  height: 100%;
  min-width: 320px; /* Maintain minimum page width across browsers */
}

body {
    min-height: 100vh;
    min-width: 320px; /* Ensure minimum usable width on mobile */
    font-family: 'Roboto', sans-serif;
    overflow-x: auto; /* Prevent content from collapsing by enabling horizontal scroll */
    overflow-y: auto;
    background-color: var(--bg-body) !important;
    background-size: 100% 100%;
    display: flex;
    flex-direction: column;
    color: var(--secondary);
    padding-bottom: 1rem;
}

a {
  color: var(--secondary);
  text-decoration: none;
}

a:hover {
  color: var(--primary);
}

/* ---------------------------
   Home Page
--------------------------- */

/* .home-page{
  background-color: var(--primary) !important;
} */

/* ---------------------------
   Main Container (if needed)
--------------------------- */
.main-container {
  @apply flex flex-col items-center justify-center min-h-screen w-full p-4;
}


/* ---------------------------
   Navbar Styles
--------------------------- */
.navbar-custom {
  @apply px-8 py-4 w-full;
  background-color: var(--bg-navbar) !important;
  border-bottom: 3px solid var(--primary) !important;
  height: 70px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-brand-custom {
  @apply flex items-center justify-center font-bold text-2xl py-2 px-4;
  color: var(--primary) !important;
  transition: color 0.3s ease, transform 0.3s ease;
  padding-left: 10px;
}

.navbar-icon {
  @apply mr-2;
  width: auto;
  height: 70px;
  padding-right: 8px;
}


.navbar-toggler {
  background-color: var(--primary) !important;
}

/* simple button used for theme toggle */
.theme-toggle-button {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--secondary);
  display: flex;
  align-items: center;
}

.theme-toggle-button svg {
  width: 1.5rem;
  height: 1.5rem;
}

.theme-toggle-button.spin {
  animation: spin 0.5s linear;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}


/* ---------------------------
   Landing Page Styles
--------------------------- */
.landing-page {
  @apply flex flex-col items-center justify-center w-full min-h-screen;
  padding: 5vh 0 60px 0; /* Space for footer */
  text-align: center; /* Fallback for text alignment */
}

.landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background-color: var(--bg-footer);
  border-bottom: 3px solid var(--primary);
  padding: 0.5rem 1rem;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.landing-header-title {
  height: 60px;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 60px;
  margin-left: auto;
}

#theme-toggle {
  display: flex;
  align-items: center;
}



.profile-photo {
  @apply rounded-full;
  display: block;
  margin-left: auto;
  margin-right: auto; /* Fallback centering */
  height: 300px;
}

.logo-title-footer {
  display: block;
}

.landing-main {
  @apply flex items-center justify-center w-full max-w-4xl;
  margin-bottom: 40px;
}

/* Feature box layout */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 20px 0;
  text-align: center;
}
.section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 20px 0;
  text-align: center;
}

.features {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 20px;
  padding: 0 10px; /* prevent feature cards from touching screen edges */
}

.feature {
  flex: 1 1 250px;
  border: 2px solid var(--primary);
  border-radius: 8px;
  padding: 20px;
  background-color: var(--bg-navbar);
  text-align: center;
}


#contact {
  padding-bottom: 80px;
}

.donate-button {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 20px;
  background-color: var(--primary);
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
}

.donate-button:hover {
  opacity: 0.9;
}

/* ---------------------------
   Footer (Fixed at Bottom & Vertically Centered Text)
--------------------------- */
.landing-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--bg-footer);
  color: var(--text-footer);
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: hidden;
  gap: 0.125rem;
  padding: 0.5rem 1rem;
  z-index: 1000;
  border-top: 3px solid var(--primary) !important;
}
.landing-footer p {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  @apply text-sm;
  margin: 0;
  padding: 0;
  line-height: 1;
  font-weight: 400;
  white-space: nowrap;
}

.landing-footer img {
  flex: 0 0 auto;
  flex-shrink: 0;
  margin: 0;
  max-width: 100%;
  height: 40px;
  display: inline-block;
}

.good-times-text {
  font-family: good-times;
font-style: normal;
font-weight: 100;
color: red;
}

/* Dark mode overrides for landing page */
/* Removed old landing-header heading styles */

/* ---------------------------
   Authenticated Layout Styles
--------------------------- */
.container.mt-4 {
  @apply h-[calc(100vh-70px)] flex flex-col overflow-hidden w-full;
}

.adjustable-row {
  @apply flex-1 flex flex-nowrap m-0 overflow-hidden;
}

.three-col-container {
  @apply flex flex-row overflow-hidden relative w-full;
}

.divider-handle-left,
.divider-handle-right {
  @apply w-[5px] cursor-col-resize bg-gray-400 flex-shrink-0;
}

.card.shadow-sm {
  @apply mb-4;
}

/* ---------------------------
   Responsive Adjustments
--------------------------- */
@media (max-width: 768px) {
  .profile-photo {
    width: 100%;
    max-width: 200px;
    height: auto;
  }

  /* Ensure header content wraps and tighten logo spacing */
  .landing-header {
    flex-wrap: wrap;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
  }

  .landing-header-title {
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
    width: 100%;
    height: auto;
  }
}
