/**
 * BoBA Template Specific Styles
 * Matching the React app's design system
 */

/* CSS Variables for BoBA Templates */
:root {
  /* Color system matching React app */
  --color-background: hsl(0 0% 100%);
  --color-foreground: hsl(180 5% 15%);
  --color-primary: hsl(166 57% 40%);
  --color-primary-foreground: hsl(0 0% 100%);
  --color-secondary: hsl(324 56% 56%);
  --color-secondary-foreground: hsl(0 0% 100%);
  --color-muted: hsl(174 20% 96%);
  --color-muted-foreground: hsl(174 5% 45%);
  --color-card: hsl(0 0% 100%);
  --color-card-foreground: hsl(180 5% 15%);
  --color-popover: hsl(0 0% 100%);
  --color-popover-foreground: hsl(180 5% 15%);
  --color-border: hsl(174 20% 90%);
  --color-input: hsl(174 20% 90%);
  --color-ring: hsl(174 72% 56%);
  --color-destructive: hsl(0 72% 51%);
  --color-destructive-foreground: hsl(0 0% 98%);
  --color-code-input: hsl(166 57% 40%);
  
  /* Typography */
  --font-code: 'Courier New', monospace;
  
  /* Sizing */
  --radius: 0.5rem;
}

/* Background pattern matching React app */
.boba-bg-pattern {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  width: 100%;
  overflow-x: hidden;
}

.boba-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.6) 40%,
    rgba(255, 255, 255, 1) 100%
  );
}

.boba-page-content {
  flex: 1;
  width: 100%;
}

/* Reset and base styles for BoBA templates */
.boba-template * {
    box-sizing: border-box;
}

.boba-template {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Typography matching React app */
.boba-template h1,
.boba-template h2,
.boba-template h3,
.boba-template h4,
.boba-template h5,
.boba-template h6 {
    margin: 0;
    font-weight: 700;
    line-height: 1.2;
}

.boba-template h1 { font-size: 3.75rem; }
.boba-template h2 { font-size: 3rem; }
.boba-template h3 { font-size: 2.25rem; }
.boba-template h4 { font-size: 1.875rem; }
.boba-template h5 { font-size: 1.5rem; }
.boba-template h6 { font-size: 1.25rem; }

@media (max-width: 768px) {
    .boba-template h1 { font-size: 2.5rem; }
    .boba-template h2 { font-size: 2rem; }
    .boba-template h3 { font-size: 1.75rem; }
    .boba-template h4 { font-size: 1.5rem; }
}

/* Button styles matching React app UI components */
.boba-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    outline: none;
    border: none;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    line-height: 1;
}

.boba-btn-primary {
    background-color: var(--color-primary);
    color: var(--color-primary-foreground);
}

.boba-btn-primary:hover {
    background-color: hsl(166 57% 35%);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
}

.boba-btn-secondary {
    background-color: var(--color-secondary);
    color: var(--color-secondary-foreground);
}

.boba-btn-secondary:hover {
    background-color: hsl(324 56% 50%);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
}

.boba-btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.boba-btn-full {
    width: 100%;
}

/* Card component matching React app */
.boba-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    border: 2px solid;
    border-color: rgba(43, 154, 125, 0.3);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.boba-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.boba-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
    margin: 0;
}

.boba-card-description {
    font-size: 0.875rem;
    color: var(--color-muted-foreground);
    margin-top: 0.5rem;
}

.boba-card-content {
    padding: 1.5rem;
}

/* Form styles matching React app */
.boba-form-group {
    margin-bottom: 1rem;
}

.boba-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--color-foreground);
}

.boba-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--color-foreground);
    background-color: white;
    background-clip: padding-box;
    border: 1px solid var(--color-input);
    border-radius: calc(var(--radius) - 2px);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.boba-input:focus {
    outline: none;
    border-color: var(--color-ring);
    box-shadow: 0 0 0 3px rgba(43, 154, 125, 0.1);
}

.boba-input::placeholder {
    color: var(--color-muted-foreground);
    opacity: 0.4;
}

/* Code input specific styles */
.boba-input-code {
    text-align: center;
    font-size: 1.875rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-code-input);
    font-family: var(--font-code);
    padding: 1rem;
}

@media (min-width: 768px) {
    .boba-input-code {
        font-size: 2.25rem;
        padding: 1.25rem;
    }
}

/* Error message styles */
.boba-error {
    color: var(--color-destructive);
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.5rem;
    text-align: center;
}

/* Success checkmark icon */
.boba-success-icon {
    width: 5rem;
    height: 5rem;
    margin: 0 auto 1.5rem;
    background-color: rgba(43, 154, 125, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.boba-success-icon svg {
    width: 3rem;
    height: 3rem;
    stroke: var(--color-primary);
    stroke-width: 2;
    fill: none;
}

/* Grid utilities */
.boba-grid {
    display: grid;
    gap: 1rem;
}

.boba-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 768px) {
    .boba-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Spacing utilities */
.boba-mb-1 { margin-bottom: 0.25rem; }
.boba-mb-2 { margin-bottom: 0.5rem; }
.boba-mb-3 { margin-bottom: 0.75rem; }
.boba-mb-4 { margin-bottom: 1rem; }
.boba-mb-5 { margin-bottom: 1.25rem; }
.boba-mb-6 { margin-bottom: 1.5rem; }
.boba-mb-8 { margin-bottom: 2rem; }

.boba-mt-1 { margin-top: 0.25rem; }
.boba-mt-2 { margin-top: 0.5rem; }
.boba-mt-3 { margin-top: 0.75rem; }
.boba-mt-4 { margin-top: 1rem; }
.boba-mt-6 { margin-top: 1.5rem; }
.boba-mt-8 { margin-top: 2rem; }

/* Text utilities */
.boba-text-center { text-align: center; }
.boba-text-left { text-align: left; }
.boba-text-right { text-align: right; }

.boba-text-sm { font-size: 0.875rem; }
.boba-text-base { font-size: 1rem; }
.boba-text-lg { font-size: 1.125rem; }
.boba-text-xl { font-size: 1.25rem; }
.boba-text-2xl { font-size: 1.5rem; }
.boba-text-3xl { font-size: 1.875rem; }
.boba-text-4xl { font-size: 2.25rem; }
.boba-text-5xl { font-size: 3rem; }
.boba-text-6xl { font-size: 3.75rem; }
.boba-text-7xl { font-size: 4.5rem; }

.boba-font-normal { font-weight: 400; }
.boba-font-medium { font-weight: 500; }
.boba-font-semibold { font-weight: 600; }
.boba-font-bold { font-weight: 700; }

.boba-italic { font-style: italic; }

.boba-tracking-wide { letter-spacing: 0.025em; }
.boba-tracking-wider { letter-spacing: 0.05em; }
.boba-tracking-widest { letter-spacing: 0.1em; }

.boba-uppercase { text-transform: uppercase; }

/* Visibility utilities */
.boba-hidden { display: none; }
.boba-block { display: block; }
.boba-inline-block { display: inline-block; }
.boba-flex { display: flex; }
.boba-inline-flex { display: inline-flex; }

@media (min-width: 768px) {
    .boba-md-hidden { display: none; }
    .boba-md-block { display: block; }
    .boba-md-inline-block { display: inline-block; }
    .boba-md-flex { display: flex; }
    .boba-md-inline { display: inline; }
}

/* Animation classes for step transitions */
.boba-animate-in {
    animation: bobaFadeIn 0.4s ease-out forwards;
}

.boba-animate-out {
    animation: bobaFadeOut 0.4s ease-out forwards;
}

@keyframes bobaFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bobaFadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Loading spinner */
.boba-spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--color-primary);
    animation: spin 1s ease-in-out infinite;
}

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

/* Responsive container */
.boba-container {
    width: 100%;
    max-width: 56rem;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .boba-container {
        padding: 0 2rem;
    }
}

/* Shadow utilities */
.boba-shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.boba-shadow { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); }
.boba-shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); }
.boba-shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.boba-shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); }
.boba-shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }/* Footer styles matching React app */
.boba-footer {
  background: #fff;
  border-top: 0;
  padding: 2rem 1rem;
  width: 100%;
  color: #111827;
}

.boba-footer-content {
  max-width: 56rem;
  margin: 0 auto;
}

.boba-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.boba-footer-links a {
  color: #6b7280;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

.boba-footer-links a:hover {
  color: #f472b6; /* Pink hover color matching React app */
}

.boba-footer-copyright {
  font-size: 0.75rem;
  color: #9ca3af; /* Gray text color */
  text-align: center;
  line-height: 1.75;
}

/* Responsive footer */
@media (max-width: 768px) {
  .boba-footer-links {
    gap: 1rem;
    font-size: 0.75rem;
  }
  
  .boba-footer-copyright {
    font-size: 0.625rem;
    line-height: 1.6;
  }
}
