/* ==========================================================================
   Haute Couture Theme - Bespoke Lingerie & Wedding Gowns
   Palette: Stormy Teal -> Charcoal Blue -> Deep Purple with Sparkly Gold & Silver
   ========================================================================== */

:root {
  /* Attached Palette Swatches */
  --palette-stormy-teal: #006466;
  --palette-dark-teal-1: #065a60;
  --palette-dark-teal-2: #0b515b;
  --palette-dark-teal-3: #144552;
  --palette-charcoal-blue: #1b3a4b;
  --palette-deep-space-blue: #212f45;
  --palette-space-indigo: #272640;
  --palette-midnight-violet-1: #312244;
  --palette-midnight-violet-2: #3e1f47;
  --palette-deep-purple: #4d194d;

  /* Theme Tokens */
  --primary-color: #0b515b;
  --primary-hover: #006466;
  --primary-dark: #144552;
  --secondary-color: #3e1f47;
  --accent-teal: #006466;
  --accent-purple: #4d194d;

  /* Sparkly Metallics */
  --gold-accent: #d4a340;
  --gold-light: #fceda4;
  --gold-dark: #b29310;
  --gold-gradient: linear-gradient(135deg, #fff8d6 0%, #eac875 35%, #d4a340 70%, #996e1b 100%);
  --silver-accent: #cbd5e1;
  --silver-light: #f8fafc;
  --silver-dark: #64748b;
  --silver-gradient: linear-gradient(135deg, #ffffff 0%, #e2e8f0 45%, #94a3b8 100%);

  /* Backgrounds & Text */
  --body-bg: #f5f8f9;
  --card-bg: #ffffff;
  --text-primary: #1b3a4b;
  --text-muted: #596a78;
  --navbar-gradient: linear-gradient(135deg, #144552 0%, #1b3a4b 40%, #272640 75%, #3e1f47 100%);
  --hero-gradient: linear-gradient(135deg, #0b515b 0%, #144552 30%, #212f45 65%, #3e1f47 100%);

  /* Bootstrap Variable Overrides */
  --bs-primary: #0b515b;
  --bs-primary-rgb: 11, 81, 91;
  --bs-secondary: #3e1f47;
  --bs-secondary-rgb: 62, 31, 71;
  --bs-body-bg: var(--body-bg);
  --bs-body-color: var(--text-primary);
}

html {
  font-size: 14px;
  height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
  background-color: var(--body-bg);
  color: var(--text-primary);
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Typography Enhancements */
.font-script {
  font-family: 'Lavishly Yours', cursive;
}

.font-serif,
h1, h2, h3, .h1, .h2, .h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  letter-spacing: 0.02em;
}

h4, h5, h6, .h4, .h5, .h6 {
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Navbar Couture Styling */
.couture-navbar {
  background: var(--navbar-gradient) !important;
  border-bottom: 1px solid rgba(212, 163, 64, 0.35) !important;
  box-shadow: 0 4px 20px rgba(17, 24, 39, 0.45) !important;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.couture-navbar .brand-logo {
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
  transition: transform 0.3s ease;
}

.couture-navbar .navbar-brand:hover .brand-logo {
  transform: scale(1.06) rotate(3deg);
}

.couture-navbar .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.couture-navbar .brand-title {
  font-family: 'Lavishly Yours', cursive;
  font-size: 2.1rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--gold-dark);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  line-height: 1.05;
}

.couture-navbar .brand-tagline {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--silver-accent);
  opacity: 0.9;
}

.couture-navbar .nav-link {
  color: rgba(255, 255, 255, 0.88) !important;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  padding: 0.5rem 0.9rem !important;
  border-radius: 0.4rem;
  transition: all 0.2s ease-in-out;
}

.couture-navbar .nav-link:hover,
.couture-navbar .nav-link:focus {
  color: #fff8d6 !important;
  background: rgba(212, 163, 64, 0.15);
  box-shadow: inset 0 -2px 0 var(--gold-accent);
}

.couture-navbar .navbar-toggler {
  border-color: rgba(212, 163, 64, 0.4);
}

.couture-navbar .navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(212, 163, 64, 0.25);
}

/* Hero Section */
.hero-couture {
  background: var(--hero-gradient);
  border-radius: 1.25rem;
  box-shadow: 0 10px 30px rgba(20, 69, 82, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(212, 163, 64, 0.3);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 80% 20%, rgba(212, 163, 64, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 20% 80%, rgba(77, 25, 77, 0.35) 0%, transparent 50%);
  pointer-events: none;
}

.hero-logo-frame {
  max-width: 320px;
  filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.4));
  transition: transform 0.4s ease;
}

.hero-logo-frame:hover {
  transform: translateY(-4px) scale(1.02);
}

.badge-couture {
  background: rgba(212, 163, 64, 0.15);
  color: var(--silver-gradient);
  border: 1px solid rgba(212, 163, 64, 0.45);
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 50rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.text-gradient-gold {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gold-dark {
  color: var(--gold-dark) !important;
}

.header-script-gold {
  font-family: 'Lavishly Yours', cursive !important;
  color: var(--gold-dark) !important;
}

.text-light-teal {
  color: #bce1e3;
}

.service-icon-box {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(11, 81, 91, 0.12) 0%, rgba(62, 31, 71, 0.12) 100%);
  border: 1px solid rgba(212, 163, 64, 0.3);
  flex-shrink: 0;
}

.tracking-wide {
  letter-spacing: 0.12em;
}

/* Feature & Layout Cards */
.feature-card {
  border: 1px solid rgba(11, 81, 91, 0.12);
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 4px 18px rgba(33, 47, 69, 0.05);
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--palette-stormy-teal), var(--gold-accent), var(--palette-deep-purple));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(33, 47, 69, 0.12);
}

.feature-card:hover::before {
  opacity: 1;
}

.card {
  border-radius: 1rem;
  border: 1px solid rgba(20, 69, 82, 0.1);
  box-shadow: 0 4px 16px rgba(27, 58, 75, 0.04);
}

.card-header.bg-primary {
  background: var(--navbar-gradient) !important;
  border-bottom: 1px solid rgba(212, 163, 64, 0.3);
}

.border-primary {
  border-color: rgba(11, 81, 91, 0.3) !important;
}

/* Buttons */
.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #0b515b 0%, #144552 60%, #1b3a4b 100%);
  border: 1px solid rgba(212, 163, 64, 0.35);
  box-shadow: 0 4px 12px rgba(11, 81, 91, 0.25);
  transition: all 0.2s ease;
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, #006466 0%, #0b515b 60%, #144552 100%);
  border-color: var(--gold-accent);
  color: #fff8d6;
  box-shadow: 0 6px 16px rgba(11, 81, 91, 0.35);
}

.btn-outline-primary {
  color: #0b515b;
  border-color: #0b515b;
}

.btn-outline-primary:hover {
  background-color: #0b515b;
  border-color: #0b515b;
  color: #ffffff;
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fff8d6;
  color: #fff8d6;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(11, 81, 91, 0.4);
}

.form-control:focus, .form-select:focus {
  border-color: #0b515b;
  box-shadow: 0 0 0 0.2rem rgba(11, 81, 91, 0.18);
}

/* Pattern Drafting Components */
.pattern-summary-card,
.pattern-layout-card,
.pattern-card {
  background: #ffffff;
  border: 1px solid rgba(20, 69, 82, 0.12);
  border-radius: 0.85rem;
  padding: 1.15rem;
  box-shadow: 0 3px 12px rgba(33, 47, 69, 0.04);
}

.pattern-summary-card {
  height: 100%;
}

.pattern-card {
  height: 100%;
}

.pattern-piece-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.pattern-preview {
  background-color: #ffffff;
  background-image: linear-gradient(#e9eef2 1px, transparent 1px), linear-gradient(90deg, #e9eef2 1px, transparent 1px);
  background-size: 20px 20px;
  border: 1px dashed rgba(20, 69, 82, 0.25);
  border-radius: 0.75rem;
  padding: 1.5rem;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.pattern-preview svg {
  width: 100%;
  height: auto;
  max-height: 600px;
  display: block;
}

.pattern-preview.layout-preview {
  min-height: 400px;
  padding: 2rem;
  background-size: 40px 40px;
}

.pattern-preview.layout-preview svg {
  max-width: none;
}

/* Nav Pills (Studio Tabs) */
.nav-pills .nav-link {
  color: var(--palette-charcoal-blue);
  font-weight: 600;
  border-radius: 0.5rem;
  padding: 0.55rem 1.25rem;
  transition: all 0.2s ease;
}

.nav-pills .nav-link:hover {
  background-color: rgba(11, 81, 91, 0.08);
  color: var(--primary-color);
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  background: linear-gradient(135deg, #0b515b 0%, #144552 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(11, 81, 91, 0.25);
}

/* Alerts */
.alert-info {
  background-color: rgba(11, 81, 91, 0.07);
  border-color: rgba(11, 81, 91, 0.22);
  color: var(--palette-dark-teal-3);
  border-radius: 0.75rem;
}

.alert-success {
  background-color: rgba(0, 100, 102, 0.1);
  border-color: rgba(0, 100, 102, 0.3);
  color: #004d4f;
  border-radius: 0.75rem;
}

/* Couture Footer */
.couture-footer {
  margin-top: auto;
  background: linear-gradient(180deg, #ffffff 0%, #f0f4f6 100%);
  border-top: 1px solid rgba(20, 69, 82, 0.15) !important;
  font-size: 0.88rem;
}

.couture-footer .footer-link {
  color: var(--palette-dark-teal-2);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.couture-footer .footer-link:hover {
  color: var(--gold-accent);
}

/* Links */
a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.draft-status {
  min-height: 1.5rem;
}

.invalid-feedback {
  display: block;
  min-height: 1.2rem;
}

/* Print Overrides */
@media print {
  body * {
    visibility: hidden !important;
  }

  .printable-area,
  .printable-area * {
    visibility: visible !important;
  }

  .printable-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 0;
    background: #fff;
  }

  .printable-area .pattern-card {
    break-inside: avoid;
  }

  .printable-area .pattern-preview svg {
    max-width: none;
  }
}

.couture-navbar .navbar-brand,
.couture-navbar .navbar-brand:hover,
.couture-navbar .navbar-brand:focus,
.couture-navbar .brand-text,
.couture-navbar .brand-title,
.couture-navbar .brand-tagline {
  text-decoration: none !important;
}
