/* ==========================================================================
   Nisha Rajput Coaching - Live Class Feedback Form
   Signature Palette: #F4EFE3 (Cream), #C59D5F (Gold), and Luxury Black
   ========================================================================== */

:root {
  /* Brand Color Palette */
  --color-cream: #F4EFE3;          /* Warm Ivory / Cream Background */
  --color-gold: #C59D5F;           /* Signature Royal Gold */
  --color-gold-hover: #AF8849;
  --color-gold-light: #FBF8F2;
  --color-gold-border: #DEC8A2;
  --color-gold-glow: rgba(197, 157, 95, 0.25);
  
  --color-black: #111111;          /* Deep Luxury Black */
  --color-black-soft: #1E1E1E;
  --color-black-muted: #333333;
  
  --bg-page: #F4EFE3;
  --bg-card: #FFFFFF;
  --bg-input: #FAF8F5;
  
  --text-main: #111111;
  --text-muted: #555555;
  --text-light: #888888;
  
  --border-light: #E8DEC8;
  --border-active: #C59D5F;
  --error-color: #D32F2F;
  --error-bg: #FFF5F5;
  --success-color: #2E7D32;
  
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  
  --shadow-sm: 0 2px 8px rgba(17, 17, 17, 0.04);
  --shadow-card: 0 10px 30px -4px rgba(30, 20, 10, 0.07), 0 2px 8px rgba(197, 157, 95, 0.08);
  --shadow-btn: 0 8px 22px rgba(17, 17, 17, 0.35);
  
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  padding: 16px 12px 40px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* Container */
.feedback-app {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
}

/* Header Card */
.header-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 26px 20px 22px;
  text-align: center;
  box-shadow: var(--shadow-card);
  border: 1.5px solid var(--border-light);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.header-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #111111 0%, #C59D5F 50%, #111111 100%);
}

/* Clean Luxury Brand Showcase in Header */
.brand-showcase-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0 8px;
  margin-bottom: 8px;
}

.brand-showcase-logo {
  max-height: 54px;
  max-width: 260px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  transition: transform 0.2s ease;
}

.brand-showcase-logo:hover {
  transform: scale(1.02);
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #111111;
  color: #C59D5F;
  padding: 7px 16px;
  border-radius: 30px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  border: 1px solid #C59D5F;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.brand-badge svg {
  width: 16px;
  height: 16px;
  fill: #C59D5F;
}

.brand-badge .header-logo-img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #C59D5F;
  background: #111111;
  flex-shrink: 0;
  display: block;
}

.header-title {
  font-size: 21px;
  font-weight: 800;
  color: #111111;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
  text-align: center;
  line-height: 1.28;
  text-wrap: balance;
}

.header-subtitle {
  font-size: 14px;
  font-weight: 700;
  color: #C59D5F;
  margin-bottom: 10px;
  line-height: 1.4;
  text-wrap: balance;
}

.header-timer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12.5px;
  color: #444444;
  background: #F4EFE3;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 600;
  border: 1px solid var(--border-light);
  white-space: nowrap;
  max-width: 100%;
}

/* Form Sections */
.form-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  box-shadow: var(--shadow-card);
  border: 1.5px solid var(--border-light);
  margin-bottom: 18px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-card.has-error {
  border-color: var(--error-color);
  background-color: #FFFDFD;
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.12);
  animation: shake 0.35s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.card-heading-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.card-heading {
  font-size: 16px;
  font-weight: 700;
  color: #111111;
  line-height: 1.35;
  flex: 1 1 auto;
}

.required-pill {
  font-size: 11px;
  font-weight: 700;
  color: #111111;
  background: #F4EFE3;
  border: 1px solid #C59D5F;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.optional-pill {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: #F4EFE3;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid var(--border-light);
}

/* Student Info Input */
.input-field-group {
  margin-bottom: 14px;
}

.input-label-small {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #111111;
  margin-bottom: 6px;
}

.text-input {
  width: 100%;
  padding: 13px 16px;
  font-size: 15px;
  font-family: inherit;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  color: var(--text-main);
  transition: all 0.2s ease;
  outline: none;
}

.phone-input-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  transition: all 0.2s ease;
  overflow: hidden;
}

.phone-input-wrap:focus-within {
  background: #FFFFFF;
  border-color: #C59D5F;
  box-shadow: 0 0 0 3px var(--color-gold-glow);
}

.phone-prefix {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 12px;
  background: #EFE8DA;
  border-right: 1.5px solid var(--border-light);
  font-size: 13.5px;
  font-weight: 700;
  color: #111111;
  height: 48px;
  user-select: none;
}

.phone-input {
  border: none;
  background: transparent;
  flex: 1;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  letter-spacing: 0.5px;
  color: #111111;
}

.text-input:focus {
  background: #FFFFFF;
  border-color: #C59D5F;
  box-shadow: 0 0 0 3px var(--color-gold-glow);
}

.text-input::placeholder,
.phone-input::placeholder {
  color: #999999;
}

.privacy-reassurance {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #FAF7F0;
  border: 1px solid #E8DEC8;
  border-left: 3.5px solid #C59D5F;
  border-radius: 12px;
  padding: 11px 13px;
  margin-top: 12px;
  font-size: 12.5px;
  color: #3b3b3b;
  line-height: 1.45;
  box-shadow: 0 1px 4px rgba(197, 157, 95, 0.06);
}

.privacy-reassurance strong {
  color: #111111;
}

.input-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Clickable Options Grid (Respects Admin choice on Mobile & PC) */
.options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

/* 2-Column Grid: Directly shows as 2 columns on Mobile (90% traffic) and PC */
.options-grid.grid-2col {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px;
}

.options-grid.grid-2col .option-card {
  padding: 10px 8px;
  min-height: 50px;
  gap: 6px;
}

.options-grid.grid-2col .option-card .option-emoji {
  font-size: 18px;
  flex-shrink: 0;
}

.options-grid.grid-2col .option-card .option-label {
  font-size: 12.5px;
  line-height: 1.25;
  word-break: break-word;
}

.options-grid.grid-2col .option-card .check-badge {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.options-grid.grid-2col .option-card .check-badge svg {
  width: 9px;
  height: 9px;
}

/* Single Column List (Full width options) */
.options-grid:not(.grid-2col) .option-card {
  padding: 13px 14px;
  min-height: 52px;
  gap: 10px;
}

.options-grid:not(.grid-2col) .option-card .option-emoji {
  font-size: 20px;
  flex-shrink: 0;
}

.options-grid:not(.grid-2col) .option-card .option-label {
  font-size: 13.5px;
  line-height: 1.3;
}

/* Option Card */
.option-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
  min-height: 54px;
  background: #FFFFFF;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  user-select: none;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
}

.option-card:hover {
  border-color: #C59D5F;
  background-color: #FDFBF7;
}

.option-card:active {
  transform: scale(0.975);
}

.option-card.selected {
  border-color: #C59D5F;
  background-color: #FAF5EB;
  box-shadow: 0 4px 14px rgba(197, 157, 95, 0.18);
}

.option-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-emoji {
  font-size: 21px;
  line-height: 1;
  margin-right: 0;
  flex-shrink: 0;
}

.option-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.28;
  flex: 1 1 auto;
}

.option-card.selected .option-label {
  color: #111111;
  font-weight: 750;
}

/* Check badge */
.check-badge {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  border: 1.5px solid #C4B598;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 0;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.option-card.selected .check-badge {
  background: #111111;
  border-color: #C59D5F;
}

.check-badge svg {
  width: 11px;
  height: 11px;
  fill: #C59D5F;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.option-card.selected .check-badge svg {
  opacity: 1;
  transform: scale(1);
}

/* Conditional Issue Detail Field */
.conditional-box {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-light);
  animation: fadeInDown 0.25s ease forwards;
}

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

.conditional-label {
  font-size: 13px;
  font-weight: 700;
  color: #111111;
  margin-bottom: 6px;
  display: block;
}

/* Textarea Feedback */
.feedback-textarea {
  width: 100%;
  min-height: 100px;
  padding: 13px 14px;
  font-size: 14.5px;
  font-family: inherit;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  color: var(--text-main);
  resize: vertical;
  outline: none;
  transition: all 0.2s ease;
  line-height: 1.45;
}

.feedback-textarea:focus {
  background: #FFFFFF;
  border-color: #C59D5F;
  box-shadow: 0 0 0 3px var(--color-gold-glow);
}

.char-counter-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 7px;
  font-size: 12px;
  color: var(--text-muted);
}

.char-counter-wrap > span:first-child {
  flex: 1 1 auto;
  line-height: 1.35;
}

.char-count {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}

.char-count.limit-near {
  color: var(--error-color);
  font-weight: 700;
}

/* Validation Alert Message */
.validation-message {
  display: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--error-color);
  margin-top: 8px;
  padding: 6px 12px;
  background: var(--error-bg);
  border: 1px solid #FFCDD2;
  border-radius: var(--radius-sm);
}

.form-card.has-error .validation-message {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Submit Action Area */
.submit-section {
  margin-top: 14px;
  margin-bottom: 24px;
}

.btn-submit {
  width: 100%;
  min-height: 54px;
  background: linear-gradient(135deg, #1C1C1C 0%, #111111 100%);
  color: #FFFFFF;
  border: 1.5px solid #C59D5F;
  border-radius: var(--radius-lg);
  font-size: 16.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 22px rgba(17, 17, 17, 0.28), 0 2px 8px rgba(197, 157, 95, 0.15);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.3px;
}

.btn-submit:hover {
  background: linear-gradient(135deg, #C59D5F 0%, #B28B4D 100%);
  color: #111111;
  border-color: #111111;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(197, 157, 95, 0.35);
}

.btn-submit:active {
  transform: scale(0.985);
}

.submit-guarantee {
  text-align: center;
  font-size: 12px;
  color: #777777;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-weight: 500;
}

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

/* Spinner inside button */
.spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(197, 157, 95, 0.3);
  border-radius: 50%;
  border-top-color: #C59D5F;
  animation: spin 0.8s linear infinite;
}

.btn-submit.loading .spinner {
  display: inline-block;
}

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

/* Footer note */
.form-footer {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 16px;
}

.form-footer a {
  color: #111111;
  text-decoration: underline;
  font-weight: 700;
}

/* Success Card Screen */
.success-screen {
  display: none;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 40px 24px 34px;
  text-align: center;
  box-shadow: var(--shadow-card);
  border: 1.5px solid var(--border-light);
  animation: scaleIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.success-icon-wrap {
  width: 80px;
  height: 80px;
  background: #F4EFE3;
  border: 2px solid #C59D5F;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 38px;
  animation: bounceIn 0.5s ease;
}

@keyframes bounceIn {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.15); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); opacity: 1; }
}

.success-title {
  font-size: 26px;
  font-weight: 800;
  color: #111111;
  margin-bottom: 12px;
}

.success-lead {
  font-size: 16px;
  font-weight: 700;
  color: #C59D5F;
  margin-bottom: 12px;
}

.success-msg {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 28px;
  padding: 0 8px;
}

.btn-done {
  width: 100%;
  max-width: 220px;
  min-height: 50px;
  background: #111111;
  color: #C59D5F;
  border: 1.5px solid #C59D5F;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: all 0.2s ease;
}

.btn-done:hover {
  background: #C59D5F;
  color: #111111;
  transform: translateY(-2px);
}

.admin-link-pill {
  display: inline-block;
  margin-top: 20px;
  font-size: 13px;
  color: #111111;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 20px;
  background: #F4EFE3;
  border: 1px solid var(--border-light);
  font-weight: 600;
  transition: all 0.2s ease;
}

.admin-link-pill:hover {
  background: #111111;
  color: #C59D5F;
  border-color: #111111;
}

/* ==========================================================================
   Mobile Responsive Optimizations (< 480px & < 360px)
   ========================================================================== */
@media (max-width: 480px) {
  body {
    padding: 10px 10px 36px;
  }

  .header-card {
    padding: 18px 14px 16px;
    margin-bottom: 12px;
    border-radius: 18px;
  }

  .brand-badge {
    padding: 5px 12px;
    font-size: 12px;
    margin-bottom: 9px;
    gap: 6px;
  }

  .brand-badge svg {
    width: 13px;
    height: 13px;
  }

  .header-title {
    font-size: 18px;
    line-height: 1.3;
    margin-bottom: 6px;
  }

  .header-subtitle {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 9px;
  }

  .header-timer {
    font-size: 11.5px;
    padding: 5px 12px;
    white-space: nowrap;
  }

  .form-card {
    padding: 15px 13px;
    margin-bottom: 12px;
    border-radius: 16px;
    scroll-margin-top: 16px;
  }

  .card-heading-wrap {
    margin-bottom: 12px;
    gap: 8px;
  }

  .card-heading {
    font-size: 14.5px;
  }

  .required-pill,
  .optional-pill {
    font-size: 10.5px;
    padding: 2px 8px;
  }

  .input-label-small {
    font-size: 13px;
    margin-bottom: 5px;
  }

  .text-input,
  .phone-input {
    font-size: 16px !important; /* Prevents auto-zoom on iOS Safari */
    padding: 11px 12px;
    border-radius: 12px;
  }

  .phone-input-wrap {
    border-radius: 12px;
  }

  .phone-prefix {
    height: 44px;
    padding: 0 10px;
    font-size: 13px;
  }

  .privacy-reassurance {
    font-size: 11.5px;
    padding: 9px 11px;
    gap: 8px;
    border-radius: 10px;
    line-height: 1.4;
  }

  .options-grid {
    gap: 8px;
  }

  /* 2-Column Grid on Mobile (Maintains 2 columns side-by-side) */
  .options-grid.grid-2col {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
  }

  .options-grid.grid-2col .option-card {
    padding: 10px 8px;
    min-height: 48px;
    gap: 6px;
    border-radius: 12px;
  }

  .options-grid.grid-2col .option-emoji {
    font-size: 18px;
    flex-shrink: 0;
  }

  .options-grid.grid-2col .option-label {
    font-size: 12px;
    line-height: 1.25;
    word-break: break-word;
  }

  .options-grid.grid-2col .check-badge {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }

  /* Single Column List on Mobile (Full width per option) */
  .options-grid:not(.grid-2col) {
    grid-template-columns: 1fr !important;
    gap: 8px;
  }

  .options-grid:not(.grid-2col) .option-card {
    padding: 12px 13px;
    min-height: 50px;
    gap: 10px;
    border-radius: 12px;
  }

  .options-grid:not(.grid-2col) .option-emoji {
    font-size: 20px;
    flex-shrink: 0;
  }

  .options-grid:not(.grid-2col) .option-label {
    font-size: 13.5px;
  }

  .options-grid:not(.grid-2col) .check-badge {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }

  .feedback-textarea {
    font-size: 16px !important; /* Prevents auto-zoom on iOS Safari */
    padding: 11px 12px;
    min-height: 90px;
    border-radius: 12px;
  }

  .char-counter-wrap {
    font-size: 11px;
    gap: 8px;
    margin-top: 6px;
  }

  .char-count {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 8px;
    background: #F4EFE3;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .submit-section {
    margin-top: 14px;
    margin-bottom: 20px;
  }

  .btn-submit {
    min-height: 50px;
    font-size: 16px;
    border-radius: 14px;
  }

  .submit-guarantee {
    font-size: 11px;
    margin-top: 8px;
  }

  .success-screen {
    padding: 32px 18px 26px;
    border-radius: 18px;
  }

  .success-icon-wrap {
    width: 68px;
    height: 68px;
    font-size: 32px;
    margin-bottom: 16px;
  }

  .success-title {
    font-size: 22px;
  }

  .success-lead {
    font-size: 14.5px;
  }

  .success-msg {
    font-size: 13.5px;
    padding: 0;
  }
}

@media (max-width: 360px) {
  body {
    padding: 8px 6px 28px;
  }

  .header-card {
    padding: 16px 10px 14px;
  }

  .header-title {
    font-size: 16.5px;
  }

  .header-timer {
    font-size: 10.5px;
    padding: 4px 9px;
  }

  .options-grid.grid-2col {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px;
  }

  .options-grid.grid-2col .option-card {
    padding: 8px 6px;
    gap: 5px;
  }

  .options-grid.grid-2col .option-card .option-emoji {
    font-size: 16px;
  }

  .options-grid.grid-2col .option-card .option-label {
    font-size: 11.5px;
  }
}


