/*
Theme Name: Festinger Vault Account
Description: A dark mode WordPress theme for account.festingervault.com with EDD integration
Version: 1.0
Author: Festinger Vault
*/

/* Base Variables - Dark Mode Only */
:root {
  --font-sans: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
  --radius: 0.8rem;
  --card-radius: 1rem;

  /* Dark Mode Colors */
  --hu-background: 0, 0%, 7%;
  --hu-foreground: 0, 0%, 100%;
  --hu-card: 0, 0%, 9%;
  --hu-card-foreground: 0, 0%, 100%;
  --hu-primary: 346, 80%, 55%;
  --hu-primary-foreground: 0, 0%, 98%;
  --hu-secondary: 0, 0%, 15%;
  --hu-secondary-foreground: 0, 0%, 100%;
  --hu-muted: 0, 0%, 15%;
  --hu-muted-foreground: 0, 0%, 71%;
  --hu-accent: 0, 0%, 15%;
  --hu-accent-foreground: 0, 0%, 100%;
  --hu-destructive: 0, 84%, 50%;
  --hu-destructive-foreground: 0, 0%, 98%;
  --hu-border: 0, 0%, 100%, 10%;
  --hu-input: 0, 0%, 100%, 5%;
  --hu-ring: 0, 0%, 56%;

  --color-background: hsl(var(--hu-background));
  --color-foreground: hsl(var(--hu-foreground));
  --color-card: hsl(var(--hu-card));
  --color-card-foreground: hsl(var(--hu-card-foreground));
  --color-primary: hsl(var(--hu-primary));
  --color-primary-foreground: hsl(var(--hu-primary-foreground));
  --color-accent: hsl(var(--hu-accent));
  --color-accent-foreground: hsl(var(--hu-accent-foreground));
  --color-secondary: hsl(var(--hu-secondary));
  --color-secondary-foreground: hsl(var(--hu-secondary-foreground));
  --color-muted: hsl(var(--hu-muted));
  --color-muted-foreground: hsl(var(--hu-muted-foreground));
  --color-destructive: hsl(var(--hu-destructive));
  --color-destructive-foreground: hsl(var(--hu-destructive-foreground));
  --color-border: hsl(var(--hu-border));
  --color-input: hsl(var(--hu-input));
  --color-ring: hsl(var(--hu-ring));
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border-color: var(--color-border);
}

html {
  background: var(--color-background);
  min-height: 100vh;
  font-family: var(--font-sans);
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  background: var(--color-background);
  color: var(--color-foreground);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100vw;
  margin: 0;
  padding: 0;
}

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  transition: all 0.3s ease;
  background: rgba(7, 7, 7, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  width: 100%;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
  box-sizing: border-box;
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  width: 100%;
  max-width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--color-foreground);
  flex-shrink: 0;
}

.logo img {
  height: 2rem;
  width: auto;
  object-fit: contain;
}

.nav-menu {
  display: none;
  list-style: none;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--color-muted-foreground);
  transition: all 0.15s ease;
  font-size: 1rem;
  white-space: nowrap;
}

.nav-menu a:hover {
  color: var(--color-accent-foreground);
  background: var(--color-accent);
}

.header-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  cursor: pointer;
  background: none;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-primary-foreground);
}

.btn-primary:hover {
  background: hsl(346, 80%, 50%);
}

.btn-ghost {
  color: var(--color-foreground);
}

.btn-ghost:hover {
  background: var(--color-accent);
  color: var(--color-accent-foreground);
}

/* Main Content */
.site-main {
  margin-top: 5rem;
  min-height: calc(100vh - 5rem);
  padding: 2rem 0;
  width: 100%;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
  box-sizing: border-box;
}

/* Page wrapper for better structure */
.page-wrapper {
  max-width: 100vw;
  overflow-x: hidden;
}

/* Card Styles */
.card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--card-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.card-header {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.card-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-card-foreground);
  margin-bottom: 0.5rem;
  word-wrap: break-word;
}

.card-description {
  color: var(--color-muted-foreground);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* EDD Form Styles */
.edd_form {
  background: var(--color-card);
  padding: 1.5rem;
  border-radius: var(--card-radius);
  border: 1px solid var(--color-border);
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.edd_form input[type="text"],
.edd_form input[type="email"],
.edd_form input[type="password"],
.edd_form select,
.edd_form textarea {
  width: 100%;
  max-width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-input);
  color: var(--color-foreground);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  box-sizing: border-box;
}

.edd_form input[type="text"]:focus,
.edd_form input[type="email"]:focus,
.edd_form input[type="password"]:focus,
.edd_form select:focus,
.edd_form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(346, 80%, 55%, 0.3);
}

.edd_form label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--color-foreground);
  font-weight: 500;
  font-size: 0.875rem;
  word-wrap: break-word;
}

.edd_form .edd-submit {
  background: var(--color-primary);
  color: var(--color-primary-foreground);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
  max-width: 200px;
  box-sizing: border-box;
}

.edd_form .edd-submit:hover {
  background: hsl(346, 80%, 50%);
}

/* Tables */
table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  background: var(--color-card);
  border-radius: var(--radius);
  overflow: hidden;
  table-layout: auto;
  word-wrap: break-word;
}

th, td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 0;
}

th {
  background: var(--color-muted);
  color: var(--color-muted-foreground);
  font-weight: 600;
  font-size: 0.875rem;
}

td {
  color: var(--color-card-foreground);
}

tr:last-child td {
  border-bottom: none;
}

/* Responsive table wrapper */
.table-wrapper {
  overflow-x: auto;
  max-width: 100%;
  margin-bottom: 1rem;
}

.table-wrapper table {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  th, td {
    padding: 0.5rem;
    font-size: 0.8rem;
  }
  
  table {
    font-size: 0.8rem;
  }
}

/* Links */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: hsl(346, 80%, 50%);
}

/* Responsive */
@media (min-width: 1024px) {
  .nav-menu {
    display: flex;
  }
}

@media (max-width: 1023px) {
  .header-container {
    padding: 0 1rem;
  }
  
  .header-actions {
    gap: 0.5rem;
  }
  
  .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 0 0.75rem;
  }
  
  .header-nav {
    padding: 0.5rem 0;
  }
  
  .logo img {
    height: 1.75rem;
  }
  
  .header-actions {
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .btn {
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 0 0.5rem;
  }
  
  .header-actions {
    flex-direction: row;
    gap: 0.25rem;
  }
  
  .btn {
    padding: 0.3rem 0.5rem;
    font-size: 0.7rem;
    flex: 1;
    text-align: center;
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mt-4 {
  margin-top: 1rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
  width: 100%;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

/* Responsive Layout */
@media (max-width: 1024px) {
  .container {
    max-width: 100%;
    padding: 0 1rem;
  }
  
  .site-main {
    padding: 2rem 0 1rem;
  }
}

@media (max-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
  
  .container {
    padding: 0 0.75rem;
  }
  
  .card {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  .card-title {
    font-size: 1.25rem;
  }
  
  .site-main {
    margin-top: 4rem;
    padding: 1rem 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.5rem;
  }
  
  .card {
    padding: 0.75rem;
    border-radius: 0.5rem;
  }
  
  .card-title {
    font-size: 1.125rem;
  }
  
  .grid {
    gap: 1rem;
  }
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Error messages */
.error {
  color: var(--color-destructive);
  background: rgba(var(--hu-destructive), 0.1);
  padding: 0.75rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  border: 1px solid var(--color-destructive);
}

/* Success messages */
.success {
  color: hsl(160, 60%, 45%);
  background: rgba(160, 60%, 45%, 0.1);
  padding: 0.75rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  border: 1px solid hsl(160, 60%, 45%);
}
