/* ==========================================================================
   quote.css - Premium Glassmorphism Theme
   ========================================================================== */

:root {
  /* Default business accent (overridden by JS) */
  --brand-accent: #00f2fe; 
  
  /* Glass Colors (Dark Theme) */
  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --glass-bg: rgba(15, 23, 42, 0.6); 
  --glass-border: rgba(255, 255, 255, 0.15);
  --glass-highlight: rgba(255, 255, 255, 0.05);
  --input-bg: rgba(0, 0, 0, 0.3);
  
  /* Typography & Layout */
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --radius-md: 0.75rem;
  --radius-lg: 1.25rem;
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-family);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  background-color: #0f172a; 
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

/* =========================================
   Dynamic Background Container
   ========================================= */
.page-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-image: radial-gradient(circle at top right, #1e293b, #020617);
    transition: background-image 0.5s ease-in-out;
}

/* =========================================
   Glassmorphism Utilities
   ========================================= */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-glass);
}

.glass-panel-heavy {
    background: rgba(15, 23, 42, 0.85); 
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid var(--glass-border);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.5);
}

.glass-input {
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* =========================================
   Forms & Inputs
   ========================================= */
input, select, textarea, button {
  font-family: inherit;
  font-size: 1rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  transition: all 0.2s;
  min-height: 48px;
}

input.form-control, 
select.form-control, 
textarea.form-control {
    background-color: var(--input-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

input.form-control::placeholder, 
textarea.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

select.form-control option {
    background-color: #1e293b;
    color: #ffffff;
}

.form-control:focus {
  outline: none;
  border-color: var(--brand-accent);
  background-color: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3), inset 0 0 0 1px var(--brand-accent);
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

/* =========================================
   Buttons
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 48px;
  width: 100%;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: var(--brand-accent);
  color: #000000; 
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 15px var(--brand-accent);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--brand-accent);
  color: var(--brand-accent);
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.btn-outline:hover {
    background: rgba(255,255,255,0.05);
}

/* =========================================
   Overlays & Fullscreen States
   ========================================= */
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1.5rem;
}

.message-card {
    padding: 2.5rem 1.5rem;
    border-radius: var(--radius-lg);
    max-width: 400px;
    width: 100%;
}

.success-overlay {
    background: rgba(0,0,0,0.7) !important;
}

.success-icon {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    color: var(--brand-accent);
}

/* =========================================
   Header Section
   ========================================= */
.business-header {
    padding: 2rem 1.5rem;
    text-align: center;
    margin: 1.5rem 1rem;
    border-radius: var(--radius-lg);
}

.business-header img {
    max-height: 90px;
    margin: 0 auto 1rem auto;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

#biz-name {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.headline {
    font-size: 1.1rem;
    color: var(--brand-accent);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.instructions {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* =========================================
   Form Layout
   ========================================= */
#app-container {
    max-width: 600px;
    margin: 0 auto;
    padding-bottom: 100px;
}

.form-section {
    padding: 1.5rem;
    margin: 0 1rem 1.5rem 1rem;
    border-radius: var(--radius-lg);
}

.form-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-primary);
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* =========================================
   Photo Upload Zone
   ========================================= */
.photo-help-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.photo-upload-container {
    border: 2px dashed var(--glass-border);
    border-radius: var(--radius-md);
    padding: 2rem 1rem;
    text-align: center;
    transition: all 0.2s;
}

.photo-upload-container.dragover {
    border-color: var(--brand-accent);
    background: rgba(0, 0, 0, 0.5);
}

.file-limits {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Photo Preview Grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.photo-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.photo-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-remove-photo {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    backdrop-filter: blur(4px);
}

/* =========================================
   Sticky Bottom Action
   ========================================= */
.form-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    display: flex;
    justify-content: center;
    z-index: 100;
}

.form-actions .btn {
    max-width: 600px;
}

/* =========================================
   Loading Spinners
   ========================================= */
.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.1);
    border-top-color: var(--brand-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
}

.spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0,0,0,0.3);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-left: 0.5rem;
}

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