/* ================== */
/* Button Styles      */
/* ================== */

/* --- Primary Button (with Glow & Sparkles) --- */
.primary-button {
  position: relative; 
  padding: 1.1rem 2.4rem; /* Slightly adjusted padding */
  border-radius: 30px; /* More rounded for a modern feel */
  background-color: var(--primary-button-bg);
  color: white;
  font-weight: 600;
  font-size: 1.1rem; /* Adjusted font size */
  text-align: center;
  border: none;
  transition: background-color 0.25s ease-out, box-shadow 0.25s ease-out, color 0.25s ease-out, transform 0.15s ease-out;
  overflow: visible; 
  z-index: 1; 
  min-width: 190px; /* Slightly increased min-width */
  display: inline-block; 
  text-decoration: none;
  cursor: pointer;
  letter-spacing: 0.02em; /* Subtle letter spacing */

  box-shadow:
    0 0 8px 2px var(--primary-button-glow-near),
    0 0 18px 5px var(--primary-button-glow-mid),
    0 0 35px 10px var(--primary-button-glow-far);
}

.primary-button:hover,
.primary-button:focus { /* Added focus state for consistency */
  background-color: var(--primary-button-bg-hover);
  transform: translateY(-3px) scale(1.03); /* Lift and slightly scale */
  box-shadow:
    0 0 12px 3px var(--primary-button-glow-hover-near),
    0 0 25px 7px var(--primary-button-glow-hover-mid),
    0 0 50px 12px var(--primary-button-glow-hover-far);
  color: white; /* Ensure text remains white */
}
.primary-button:active {
  transform: translateY(-1px) scale(0.98); /* More noticeable press */
  box-shadow: /* Slightly reduced shadow on active to simulate press */
    0 0 6px 1px var(--primary-button-glow-near),
    0 0 12px 3px var(--primary-button-glow-mid),
    0 0 20px 6px var(--primary-button-glow-far);
}


/* Sparkle effect container - styles in animations.css apply 'glimmerSparkle' */
/* .sparkle-container and .sparkle definitions are kept here for co-location */
.sparkle-container {
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  pointer-events: none;
  z-index: 2;
  overflow: visible;
}

.sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: white;
  border-radius: 50%;
  opacity: 0; 
  transform-origin: center;
  box-shadow: 0 0 4px 1px rgba(255, 255, 255, 0.7); /* Brighter sparkle shadow */
  /* Animation is typically applied via JS: animation: glimmerSparkle ... */
}

/* --- Secondary Button --- */
.secondary-button {
  background-color: transparent; 
  color: white; /* Default for header, can be overridden */
  border: 2px solid white; /* Default for header */
  padding: 0.9rem 2.2rem; /* Adjusted padding */
  border-radius: 30px; /* Match primary button */
  font-weight: 600;
  font-size: 1rem; /* Adjusted font size */
  text-decoration: none;
  display: inline-block;
  min-width: 190px; /* Match primary button */
  text-align: center;
  transition: all 0.25s ease-out;
  cursor: pointer;
  letter-spacing: 0.02em;
}
/* Contextual secondary button colors */
.section-container .secondary-button { /* Secondary button outside header */
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.secondary-button:hover,
.secondary-button:focus {
  transform: translateY(-3px) scale(1.03);
  background-color: rgba(255, 255, 255, 0.15); /* Slightly more opaque for header version */
  border-color: white; /* Keep border white on hover for header */
  color: white;
}
.section-container .secondary-button:hover,
.section-container .secondary-button:focus {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}
.secondary-button:active {
  transform: translateY(-1px) scale(0.98);
}


/* --- Google Login Button --- */
.google-login-button {
  background: var(--card-background); /* Use card background */
  color: var(--text-color); /* Use theme text color */
  border: 1px solid var(--border-color); /* Use theme border color */
  border-radius: 8px; /* Softer radius */
  padding: 0.7rem 1.2rem; /* Adjusted padding */
  font-size: 0.95rem; 
  display: inline-flex;
  align-items: center;
  justify-content: center; /* Center content */
  gap: 0.75rem; /* Increased gap */
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 1rem; 
  text-decoration: none;
  width: 100%; /* Make it full width in its container (e.g., auth modal) */
  max-width: 300px; /* Max width if needed */
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.google-login-button:hover,
.google-login-button:focus {
  background: var(--background-color); /* Use page background on hover */
  border-color: var(--text-light); /* Slightly darker border */
  box-shadow: 0 3px 6px rgba(0,0,0,0.07);
}

.google-login-button i.fab.fa-google, /* Assuming Font Awesome */
svg.google-icon { /* For SVG icon */
  color: #DB4437; /* Google Red, can be multi-color if SVG */
  font-size: 1.2em; 
}


/* --- Form Toggle Button (Looks like a link) --- */
.form-toggle {
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
  margin: 0.5rem 0; /* Adjust margin */
  padding: 0.35rem 0.25rem; /* Add slight padding for click area */
  font-weight: 500; /* Medium weight */
  border-radius: 4px; 
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
  font-size: 0.9rem;
}

.form-toggle:hover,
.form-toggle:focus {
  color: var(--secondary-color); 
  text-decoration: underline;
  text-decoration-color: var(--secondary-color); /* Ensure underline matches */
  text-decoration-thickness: 1.5px; /* Slightly thicker underline */
}


/* --- Login/Signup Button (Specific Styling for Auth Forms/Nav) --- */
.login-signup-button { /* This class is also used in nav, see header.css for nav specifics */
  background-color: var(--primary-color);
  color: white;
  padding: 0.75rem 1.8rem; /* Adjusted padding */
  border-radius: 25px; /* Consistent radius */
  font-weight: 600;
  font-size: 0.95rem; 
  text-align: center;
  display: inline-block;
  /* margin-top: 10px; /* Removed, handle spacing contextually */
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 10px rgba(var(--primary-color-rgb), 0.15); /* Softer, themed shadow */
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.login-signup-button:hover,
.login-signup-button:focus {
  background-color: var(--secondary-color); /* Darken primary */
  color: white;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 15px rgba(var(--primary-color-rgb), 0.25);
}
/* If an inverted hover style is desired (like original): */
/*
.login-signup-button.invert-hover:hover,
.login-signup-button.invert-hover:focus {
  background-color: white;
  color: var(--primary-color);
  border: 1px solid var(--primary-color); // Add border if background becomes white
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}
*/

.login-signup-button:active {
  transform: translateY(0px) scale(0.98);
  box-shadow: 0 3px 8px rgba(var(--primary-color-rgb), 0.1);
}


/* --- App Store Buttons --- */
.store-button {
  background-color: var(--card-background); 
  color: var(--text-color);
  text-decoration: none;
  padding: 0.8rem 1.3rem; /* Adjusted padding */
  border-radius: 10px; /* Slightly less rounded */
  display: inline-flex;
  align-items: center;
  gap: 0.8rem; /* Adjusted gap */
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
  min-width: 180px; /* Adjusted min-width */
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-color);
}

.store-button:hover,
.store-button:focus {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.store-button i { 
  font-size: 1.8rem; /* Adjusted icon size */
  flex-shrink: 0;
  color: var(--text-light); /* Can be specific, e.g. Apple grey, Google multi-color */
}
.store-button i.fa-apple { color: #555; } /* Example Apple icon color */
.store-button i.fa-google-play { color: #689f38; } /* Example Play Store color */


.store-button-content { 
  text-align: left;
  flex-grow: 1;
}

.store-button-small { 
  display: block;
  font-size: 0.75rem; 
  opacity: 0.9;
  line-height: 1.2;
  color: var(--text-light);
}

.store-button-large { 
  display: block;
  font-size: 1.1rem; /* Adjusted size */
  font-weight: 500; /* Medium weight */
  line-height: 1.3;
  color: var(--text-color);
}


/* --- Text Button --- */
.text-button {
  background: none;
  border: none;
  color: var(--primary-color);
  font-weight: 500; /* Medium weight */
  cursor: pointer;
  padding: 0.5rem 0.25rem; /* Adjust padding */
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
  border-radius: 4px; 
  font-size: 0.95rem;
}

.text-button:hover,
.text-button:focus {
  color: var(--secondary-color);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-decoration-color: var(--secondary-color);
}


/* --- Outline Button --- */
.outline-button {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  font-weight: 600; 
  padding: 0.8rem 1.8rem; /* Adjusted padding */
  border-radius: 25px; 
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease-out, box-shadow 0.2s ease;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  font-size: 0.95rem;
}

.outline-button:hover,
.outline-button:focus {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px) scale(1.02); 
  box-shadow: 0 4px 10px rgba(var(--primary-color-rgb), 0.15); /* Add shadow on hover */
}
.outline-button:active {
  transform: translateY(0px) scale(0.98); 
  box-shadow: none; /* Remove shadow on active */
}


/* --- Rounded Button (Icon Button) --- */
.rounded-button {
  width: 44px; /* Increased size */
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background-color: var(--primary-color);
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease-out, background-color 0.2s ease-out, box-shadow 0.2s ease-out;
  padding: 0;
  font-size: 1.3rem; /* Adjust icon size */
  box-shadow: 0 3px 7px rgba(var(--primary-color-rgb), 0.2); 
}

.rounded-button:hover,
.rounded-button:focus {
  transform: scale(1.1) translateY(-2px); /* Scale and lift */
  background-color: var(--secondary-color);
  box-shadow: 0 5px 12px rgba(var(--primary-color-rgb), 0.3); 
}
.rounded-button:active {
  transform: scale(1.0); 
  box-shadow: 0 2px 5px rgba(var(--primary-color-rgb), 0.15);
}


/* --- Button Grouping Utilities --- */
.button-group { 
  display: flex;
  gap: 1rem; /* Default gap */
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start; /* Default alignment */
}
.button-group.centered {
    justify-content: center;
}

.cta-buttons { /* Specific grouping for CTA sections */
  display: flex;
  gap: 1.25rem; /* Increased gap for main CTAs */
  justify-content: center;
  margin-top: 2.5rem; /* Increased top margin */
  flex-wrap: wrap;
}


/* --- Responsive Button Styles --- */
@media (max-width: 768px) {

  .primary-button {
      padding: 1rem 2rem;
      font-size: 1rem;
      min-width: auto; /* Allow button to shrink if needed */
      width: 100%; /* Make primary buttons full width in some contexts */
      max-width: 320px; /* But not too wide */
  }
  .cta-buttons .primary-button { /* Keep CTA primary button potentially larger */
      width: auto; /* Don't force full width if in a row */
      max-width: none;
  }


  .secondary-button {
      padding: 0.8rem 1.8rem;
      font-size: 0.95rem;
      min-width: auto;
      width: 100%;
      max-width: 320px;
  }
   .cta-buttons .secondary-button {
      width: auto;
      max-width: none;
  }


  /* Stack buttons in CTA sections vertically */
  .cta-buttons {
    flex-direction: column;
    align-items: center;
    gap: 1rem; /* Adjust vertical gap */
  }
  .cta-buttons .primary-button,
  .cta-buttons .secondary-button {
    width: 100%; /* Make buttons in CTA full width on mobile */
    max-width: 300px; /* But not excessively wide */
  }

  .store-button {
    width: 100%; 
    max-width: 280px; 
    justify-content: center; 
    padding: 0.7rem 1rem; 
  }
  .store-button i {
      font-size: 1.6rem; 
  }
   .store-button-large {
       font-size: 1rem; 
   }

  .outline-button {
      padding: 0.7rem 1.5rem;
      font-size: 0.9rem;
  }
  .google-login-button {
      font-size: 0.9rem;
      padding: 0.65rem 1rem;
      max-width: none; /* Allow it to be as wide as content or container */
  }
  .rounded-button {
      width: 40px;
      height: 40px;
      font-size: 1.1rem;
  }

} /* End of @media (max-width: 768px) */