/**
 * Interactive Resume Builder Styles - Executive Format
 * Professional layout optimized for print and screen
 */

:root {
  --builder-bg-primary: #0A0E27;
  --builder-bg-secondary: #1a1f3a;
  --builder-bg-card: #252b4a;
  --builder-accent-coral: #E84A34;
  --builder-accent-teal: #2B6B6B;
  --builder-accent-cream: #EAE3D2;
  --builder-border: #2a3050;
  --builder-text-primary: #E8E8FF;
  --builder-text-secondary: #A0A0C0;
  --builder-glow-coral: 0 0 20px rgba(232, 74, 52, 0.3);
  --builder-glow-teal: 0 0 20px rgba(43, 107, 107, 0.3);
}

.resume-builder-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.builder-intro {
  text-align: center;
  margin-bottom: 3rem;
}

.builder-intro h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--builder-accent-coral), var(--builder-accent-cream));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.builder-intro .subtitle {
  font-size: 1.1rem;
  color: var(--builder-text-secondary);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Profile Selector */
.profile-selector {
  margin-bottom: 3rem;
}

.profile-selector h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--builder-text-primary);
}

.profile-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.profile-card {
  cursor: pointer;
  display: block;
  transition: transform 0.3s ease;
  text-decoration: none;
  color: inherit;
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}

.profile-card:focus,
.profile-card:active,
.profile-card:hover {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}

.profile-card:focus-visible .card-content {
  outline: 2px solid var(--builder-accent-coral);
  outline-offset: 2px;
}

.profile-card .card-content {
  background: var(--builder-bg-secondary);
  border: 2px solid var(--builder-border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.profile-card:hover {
  transform: translateY(-4px);
}

.profile-card:hover .card-content {
  border-color: var(--builder-accent-coral);
  box-shadow: var(--builder-glow-coral);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.card-content h3 {
  color: var(--builder-accent-cream);
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.card-content p {
  color: var(--builder-text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  flex-grow: 1;
  margin-bottom: 1rem;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background: rgba(232, 74, 52, 0.1);
  color: var(--builder-accent-cream);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* Generate Button */
.generate-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--builder-accent-cream), var(--builder-accent-teal));
  color: #0A0E27;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0 auto;
  box-shadow: 0 4px 16px rgba(0, 240, 255, 0.3);
}

.generate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 240, 255, 0.5);
}

.generate-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Resume Preview Container */
.resume-preview {
  margin-top: 3rem;
  background: #f5f5f5;
  color: #000000;
  padding: 2rem;
  border-radius: 0;
  box-shadow: none;
}

.preview-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #ddd;
}

.preview-header h2 {
  color: #333;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.preview-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  color: #666;
  font-size: 0.9rem;
}

.stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.export-buttons {
  margin-bottom: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.export-btn {
  padding: 0.6rem 1.2rem;
  background: #1a365d;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

.export-btn:hover {
  background: #0f2342;
}

/* EXECUTIVE RESUME STYLES - Clean white page */
.resume-content {
  font-family: Arial, sans-serif;
  font-size: 10pt;
  line-height: 1.3;
  color: #000;
  max-width: 8.5in;
  margin: 0 auto;
  padding: 1in 0.75in;
  background: #ffffff;
  text-align: left;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border: none;
  border-radius: 0;
}

/* Header */
.resume-header {
  text-align: left;
  margin: 0 0 0.75rem 0;
  padding: 0 0 0.5rem 0;
  border-bottom: 1px solid #999;
}

.resume-name {
  font-family: 'Futura', 'Trebuchet MS', 'Arial Narrow', sans-serif;
  font-size: 24pt;
  font-weight: 500;
  color: #1a365d;
  margin: 0 0 0.15rem 0;
  padding: 0;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.resume-headline {
  font-family: Arial, sans-serif;
  font-size: 10pt;
  color: #000;
  margin: 0 0 0.15rem 0;
  padding: 0;
  font-weight: normal;
  line-height: 1.3;
}

.resume-contact {
  font-family: Arial, sans-serif;
  font-size: 10pt;
  color: #000;
  margin: 0;
  padding: 0;
  line-height: 1.3;
}

.resume-contact a {
  color: #000;
  text-decoration: none;
}

/* Section Styling */
.resume-section {
  margin: 0 0 0.75rem 0;
  padding: 0;
  page-break-inside: avoid;
  text-align: left;
}

.section-title {
  font-family: 'Futura', 'Trebuchet MS', 'Arial Narrow', sans-serif;
  font-size: 14pt;
  font-weight: 500;
  color: #1a365d;
  margin: 0 0 0.3rem 0;
  padding: 0;
  border-bottom: none;
  letter-spacing: -0.3px;
  line-height: 1.2;
  text-align: left;
}

.section-content {
  margin: 0;
  padding: 0;
  text-align: left;
}

/* Executive Snapshot */
.executive-snapshot .snapshot-tagline {
  margin: 0 0 0.4rem 0;
  padding: 0;
  line-height: 1.3;
}

.executive-snapshot .snapshot-description {
  margin: 0 0 0.4rem 0;
  padding: 0;
  line-height: 1.3;
}

.executive-snapshot p {
  margin: 0 0 0.4rem 0;
  padding: 0;
  line-height: 1.3;
}

/* Targeted Highlights */
.targeted-highlights .highlight-item {
  margin: 0 0 0.3rem 0;
  padding: 0;
}

.targeted-highlights p {
  margin: 0;
  padding: 0;
  line-height: 1.3;
}

/* Experience */
.experience-item {
  margin: 0 0 0.6rem 0;
  padding: 0;
  page-break-inside: avoid;
  text-align: left;
}

.experience-header {
  margin: 0 0 0.2rem 0;
  padding: 0;
}

.experience-title-line {
  margin: 0 0 0.05rem 0;
  padding: 0;
}

.experience-title {
  font-family: Arial, sans-serif;
  font-size: 10pt;
  font-weight: bold;
  color: #000;
  margin: 0;
  padding: 0;
  line-height: 1.3;
}

.experience-meta {
  font-family: Arial, sans-serif;
  font-size: 10pt;
  color: #000;
  font-weight: normal;
  font-style: normal;
  margin: 0;
  padding: 0;
  line-height: 1.3;
}

.experience-bullets {
  margin: 0.2rem 0 0 0;
  padding: 0 0 0 1.1rem;
  list-style-type: disc;
  list-style-position: outside;
}

.experience-bullets li {
  margin: 0 0 0.2rem 0;
  padding: 0;
  line-height: 1.3;
  font-family: Arial, sans-serif;
  font-size: 10pt;
  text-align: left;
}

/* Skills Section */
.skills-section .skill-paragraph {
  margin: 0 0 0.5rem 0;
  padding: 0;
  line-height: 1.3;
  font-family: Arial, sans-serif;
  font-size: 10pt;
  text-align: left;
}

.skills-section .skill-paragraph strong {
  font-family: Arial, sans-serif;
  font-weight: bold;
  color: #000;
}

/* Education */
.education-item {
  margin: 0 0 0.25rem 0;
  padding: 0;
  font-family: Arial, sans-serif;
  font-size: 10pt;
  line-height: 1.3;
  text-align: left;
}

/* Action Buttons */
.resume-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--builder-border);
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.action-btn.primary {
  background: var(--builder-accent-cream);
  color: #0A0E27;
}

.action-btn.secondary {
  background: var(--builder-bg-secondary);
  color: var(--builder-text-primary);
  border: 1px solid var(--builder-border);
}

.action-btn.tertiary {
  background: transparent;
  color: var(--builder-accent-teal);
  border: 1px solid var(--builder-accent-teal);
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
  .profile-options {
    grid-template-columns: 1fr;
  }

  .resume-preview {
    padding: 1.5rem;
  }

  .preview-stats {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* PRINT STYLES - Executive Format */
@media print {
  body {
    background: white;
    margin: 0;
    padding: 0;
  }

  /* Hide non-resume elements */
  .sticky-nav,
  .hero-section,
  #behind-the-tool,
  #about,
  #contact,
  .export-buttons,
  .profile-selector,
  .preview-header,
  .resume-actions,
  .builder-intro,
  .tool-intro,
  .generate-btn,
  .profile-options,
  footer,
  .site-header,
  .site-footer {
    display: none;
  }

  /* Resume container */
  .resume-preview {
    background: white;
    padding: 0;
    margin: 0;
    box-shadow: none;
  }

  /* Resume content */
  .resume-content {
    font-family: Arial, sans-serif;
    font-size: 10pt;
    max-width: 100%;
    width: 8.5in;
    margin: 0 auto;
    padding: 0.5in 0.75in;
    line-height: 1.3;
    background: white;
    color: #000;
    box-shadow: none;
  }

  /* Header styling */
  .resume-header {
    border-bottom: 1px solid #999;
    margin: 0 0 0.6rem 0;
    padding: 0 0 0.4rem 0;
    text-align: left;
  }

  .resume-name {
    font-family: 'Futura', 'Trebuchet MS', 'Arial Narrow', sans-serif;
    font-size: 22pt;
    font-weight: 500;
    color: #1a365d;
    margin: 0 0 0.12rem 0;
    padding: 0;
    letter-spacing: -0.5px;
    line-height: 1.1;
  }

  .resume-headline {
    font-family: Arial, sans-serif;
    font-size: 10pt;
    color: #000;
    font-weight: normal;
    margin: 0 0 0.12rem 0;
    padding: 0;
    line-height: 1.3;
  }

  .resume-contact {
    font-family: Arial, sans-serif;
    font-size: 10pt;
    color: #000;
    margin: 0;
    padding: 0;
    line-height: 1.3;
  }

  /* Section styling */
  .resume-section {
    margin: 0 0 0.65rem 0;
    padding: 0;
    page-break-inside: avoid;
    text-align: left;
  }

  .section-title {
    font-family: 'Futura', 'Trebuchet MS', 'Arial Narrow', sans-serif;
    font-size: 13pt;
    font-weight: 500;
    color: #1a365d;
    border-bottom: none;
    padding: 0;
    margin: 0 0 0.25rem 0;
    page-break-after: avoid;
    letter-spacing: -0.3px;
    line-height: 1.2;
  }

  .section-content {
    margin: 0;
    padding: 0;
  }

  /* Executive Snapshot */
  .executive-snapshot .snapshot-tagline {
    margin: 0 0 0.35rem 0;
    padding: 0;
    line-height: 1.3;
  }

  .executive-snapshot .snapshot-description {
    margin: 0 0 0.35rem 0;
    padding: 0;
    line-height: 1.3;
  }

  .executive-snapshot p {
    margin: 0 0 0.35rem 0;
    padding: 0;
    line-height: 1.3;
  }

  /* Targeted Highlights */
  .targeted-highlights .highlight-item {
    margin: 0 0 0.25rem 0;
    padding: 0;
  }

  .targeted-highlights p {
    margin: 0;
    padding: 0;
    line-height: 1.3;
  }

  /* Experience items */
  .experience-item {
    margin: 0 0 0.55rem 0;
    padding: 0;
    page-break-inside: avoid;
    text-align: left;
  }

  .experience-header {
    margin: 0 0 0.15rem 0;
    padding: 0;
  }

  .experience-title-line {
    margin: 0 0 0.05rem 0;
    padding: 0;
  }

  .experience-title {
    font-family: Arial, sans-serif;
    font-size: 10pt;
    color: #000;
    font-weight: bold;
    margin: 0;
    padding: 0;
    line-height: 1.3;
  }

  .experience-meta {
    font-family: Arial, sans-serif;
    font-size: 10pt;
    color: #000;
    font-weight: normal;
    font-style: normal;
    margin: 0;
    padding: 0;
    line-height: 1.3;
  }

  .experience-bullets {
    margin: 0.18rem 0 0 0;
    padding: 0 0 0 1.1rem;
    list-style-type: disc;
    list-style-position: outside;
  }

  .experience-bullets li {
    margin: 0 0 0.18rem 0;
    padding: 0;
    line-height: 1.3;
    font-family: Arial, sans-serif;
    font-size: 10pt;
  }

  /* Skills section */
  .skill-paragraph {
    margin: 0 0 0.45rem 0;
    padding: 0;
    line-height: 1.3;
    page-break-inside: avoid;
    font-family: Arial, sans-serif;
    font-size: 10pt;
    text-align: left;
  }

  .skill-paragraph strong {
    font-family: Arial, sans-serif;
    font-weight: bold;
    color: #000;
  }

  /* Education */
  .education-item {
    margin: 0 0 0.2rem 0;
    padding: 0;
    line-height: 1.3;
    font-family: Arial, sans-serif;
    font-size: 10pt;
    text-align: left;
  }

  /* Ensure colors print correctly for headings only */
  .section-title,
  .resume-name {
    color: #1a365d !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Links should be black and not underlined */
  a {
    color: #000 !important;
    text-decoration: none !important;
  }

  /* Prevent orphaned headings */
  h2, h3, .section-title, .experience-title {
    page-break-after: avoid;
  }

  /* Allow strategic page breaks for long resumes */
  .experience-section .experience-item:nth-child(3),
  .experience-section .experience-item:nth-child(6) {
    page-break-before: auto;
  }

  /* Optimize spacing for 3-page format */
  @page {
    size: letter;
    margin: 0;
  }
}

/* ====================================
   Two-Step Wizard UI
   ==================================== */

/* Step Description Text */
.step-description {
  text-align: left;
  color: var(--builder-text-secondary);
  font-size: 1rem;
  margin-bottom: 2rem;
}

/* Selection Method (Step 1) */
.selection-method {
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 2px solid var(--builder-border);
}

.selection-method h2 {
  text-align: center;
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--builder-text-primary);
}

.method-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 700px;
  margin: 0 auto;
}

.method-card {
  cursor: pointer;
  display: block;
  position: relative;
}

.method-card input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.method-content {
  background: var(--builder-bg-secondary);
  border: 2px solid var(--builder-border);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  height: 100%;
}

.method-card:hover .method-content {
  border-color: var(--builder-accent-cream);
  transform: translateY(-2px);
}

.method-card.active .method-content,
.method-card input[type="radio"]:checked + .method-content {
  border-color: var(--builder-accent-cream);
  background: linear-gradient(135deg, rgba(232, 74, 52, 0.1), rgba(43, 107, 107, 0.05));
  box-shadow: var(--builder-glow-coral);
}

.method-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

.method-content h3 {
  color: var(--builder-accent-cream);
  font-size: 1.5rem;
  margin: 0.5rem 0;
}

.method-content p {
  color: var(--builder-text-secondary);
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.5;
}

/* Checkbox Selector (Step 2b) */
.checkbox-selector {
  margin-bottom: 3rem;
}

.checkbox-selector h2 {
  text-align: center;
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--builder-text-primary);
}

#selectionCount {
  color: var(--builder-accent-cream);
  font-weight: 600;
}

.checkbox-categories {
  max-width: 1000px;
  margin: 0 auto 2rem;
}

.checkbox-category {
  margin-bottom: 2.5rem;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--builder-border);
}

.category-icon {
  font-size: 1.5rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.5rem;
  width: 1.5rem;
  margin-top: 1.5rem;
}

.category-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--builder-text-primary);
  margin: 0;
  line-height: 1.5;
  display: flex;
  align-items: center;
}

/* Remove the triangle bullet from category titles (we have emojis instead) */
.category-title::before {
  content: none !important;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.checkbox-item {
  background: var(--builder-bg-secondary);
  border: 2px solid var(--builder-border);
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.checkbox-item:hover {
  border-color: var(--builder-accent-cream);
  background: linear-gradient(135deg, rgba(234, 227, 210, 0.05), rgba(43, 107, 107, 0.02));
}

.checkbox-item.checked {
  border-color: var(--builder-accent-cream);
  background: linear-gradient(135deg, rgba(234, 227, 210, 0.15), rgba(43, 107, 107, 0.08));
  box-shadow: 0 0 15px rgba(232, 74, 52, 0.2);
}

.checkbox-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: var(--builder-accent-cream);
}

.checkbox-label-wrapper {
  flex: 1;
}

.checkbox-label {
  display: block;
  font-weight: 600;
  color: var(--builder-text-primary);
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
  line-height: 1.3;
}

.checkbox-description {
  color: var(--builder-text-secondary);
  font-size: 0.85rem;
  line-height: 1.4;
  margin: 0;
}

/* Disabled state for generate button */
.generate-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.generate-btn:disabled:hover {
  box-shadow: none;
  transform: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .method-selector {
    grid-template-columns: 1fr;
  }

  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .method-content {
    padding: 1.5rem 1rem;
  }

  .method-icon {
    font-size: 2.5rem;
  }

  .selection-method h2,
  .checkbox-selector h2 {
    font-size: 1.5rem;
  }
}

/* Loading Overlay with Sparkle Effect */
.resume-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 14, 39, 0.95);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

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

.loading-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  animation: sparkle 1s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% { 
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  50% { 
    transform: scale(1.2) rotate(10deg);
    opacity: 0.8;
  }
}

.loading-text {
  font-size: 1.5rem;
  color: var(--builder-text-primary);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.loading-subtext {
  font-size: 1rem;
  color: var(--builder-accent-cream);
  opacity: 0.8;
}

/* Checkmark animation */
.loading-icon.done {
  animation: checkmarkPop 0.4s ease-out forwards;
}

@keyframes checkmarkPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1.1); }
}
