/**
 * Infinity Classes - Online Result Checking Portal Stylesheet
 * Brand Colors: Primary Orange (#FF4B0B), Dark Navy (#111827), Light Background (#F8FAFC)
 */

:root {
  --res-orange: #FF4B0B;
  --res-orange-hover: #E03E04;
  --res-orange-light: #FFF5F2;
  --res-navy: #111827;
  --res-navy-light: #1F2937;
  --res-white: #FFFFFF;
  --res-bg: #F8FAFC;
  --res-grey: #64748B;
  --res-grey-light: #E2E8F0;
  --res-green: #10B981;
  --res-green-light: #ECFDF5;
  --res-red: #EF4444;
  --res-red-light: #FEF2F2;
  --res-font: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --res-hindi-font: 'Noto Sans Devanagari', 'Poppins', sans-serif;
  --res-shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --res-shadow-md: 0 10px 25px -5px rgba(17, 24, 39, 0.08), 0 8px 10px -6px rgba(17, 24, 39, 0.04);
  --res-shadow-lg: 0 20px 35px -10px rgba(255, 75, 11, 0.15), 0 10px 20px -5px rgba(0, 0, 0, 0.04);
}

.result-page-wrapper {
  background-color: var(--res-bg);
  min-height: calc(100vh - 280px);
  padding: 40px 20px 80px;
  font-family: var(--res-font);
  color: var(--res-navy);
}

/* -------------------------------------------------------------
   Hero Section
   ------------------------------------------------------------- */
.result-hero {
  max-width: 850px;
  margin: 0 auto 35px;
  text-align: center;
  position: relative;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background-color: var(--res-orange-light);
  color: var(--res-orange);
  border: 1px solid rgba(255, 75, 11, 0.2);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.result-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--res-orange);
  box-shadow: 0 0 0 3px rgba(255, 75, 11, 0.2);
}

.result-hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--res-navy);
  line-height: 1.2;
  margin: 0 0 14px;
}

.result-hero-title span {
  color: var(--res-orange);
}

.result-hero-subtext {
  font-size: 1.05rem;
  color: var(--res-grey);
  margin: 0 auto 10px;
  max-width: 650px;
  line-height: 1.6;
}

.result-hero-hindi {
  font-family: var(--res-hindi-font);
  font-size: 1.05rem;
  color: var(--res-navy-light);
  font-weight: 500;
  margin: 0;
}

/* -------------------------------------------------------------
   Result Card Container
   ------------------------------------------------------------- */
.result-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 30px;
  max-width: 1050px;
  margin: 0 auto;
}

.result-card {
  width: 100%;
  max-width: 480px;
  background-color: var(--res-white);
  border-radius: 18px;
  border: 1px solid var(--res-grey-light);
  box-shadow: var(--res-shadow-md);
  padding: 35px;
  box-sizing: border-box;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.result-card:hover {
  box-shadow: var(--res-shadow-lg);
}

.result-card-header {
  text-align: center;
  margin-bottom: 25px;
  border-bottom: 1px solid var(--res-grey-light);
  padding-bottom: 20px;
}

.result-icon-bubble {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--res-orange), #ff7a45);
  color: var(--res-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 12px;
  box-shadow: 0 8px 16px rgba(255, 75, 11, 0.25);
}

.result-card-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--res-navy);
  margin: 0 0 6px;
}

.result-card-subtitle {
  font-size: 0.88rem;
  color: var(--res-grey);
  margin: 0;
}

/* Form Groups */
.res-form-group {
  margin-bottom: 18px;
  text-align: left;
}

.res-form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--res-navy);
  margin-bottom: 7px;
}

.res-form-label .req {
  color: var(--res-orange);
  margin-left: 2px;
}

.res-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.res-input-icon {
  position: absolute;
  left: 14px;
  color: var(--res-grey);
  font-size: 1rem;
  pointer-events: none;
}

.res-form-control {
  width: 100%;
  height: 48px;
  padding: 10px 14px 10px 42px;
  border: 1.5px solid var(--res-grey-light);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--res-navy);
  background-color: #FAFAFA;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.res-form-control:focus {
  outline: none;
  border-color: var(--res-orange);
  background-color: var(--res-white);
  box-shadow: 0 0 0 3px rgba(255, 75, 11, 0.12);
}

/* Custom Select */
.res-select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  cursor: pointer;
}

/* Mathematical CAPTCHA Box */
.captcha-container {
  background-color: var(--res-orange-light);
  border: 1.5px dashed rgba(255, 75, 11, 0.35);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 22px;
  box-sizing: border-box;
}

.captcha-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.captcha-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--res-orange);
}

.captcha-refresh-btn {
  background: none;
  border: none;
  color: var(--res-orange);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background-color 0.15s ease;
}

.captcha-refresh-btn:hover {
  background-color: rgba(255, 75, 11, 0.12);
}

.captcha-refresh-btn svg {
  transition: transform 0.3s ease;
}

.captcha-refresh-btn:hover svg {
  transform: rotate(90deg);
}

.captcha-body {
  display: flex;
  align-items: center;
  gap: 15px;
}

.captcha-question-box {
  background-color: var(--res-white);
  border: 1px solid rgba(255, 75, 11, 0.2);
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--res-navy);
  letter-spacing: 2px;
  user-select: none;
  flex: 1;
  text-align: center;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
}

.captcha-input-box {
  width: 140px;
}

.captcha-input-box .res-form-control {
  padding-left: 14px;
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
}

/* Submit Button */
.res-submit-btn {
  width: 100%;
  height: 52px;
  background-color: var(--res-orange);
  color: var(--res-white);
  border: none;
  border-radius: 11px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 14px rgba(255, 75, 11, 0.3);
  transition: all 0.2s ease;
}

.res-submit-btn:hover {
  background-color: var(--res-orange-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(255, 75, 11, 0.4);
}

.res-submit-btn:active {
  transform: translateY(1px);
}

.res-submit-btn:disabled {
  background-color: #CBD5E1;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Alert Boxes */
.res-alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  margin-bottom: 18px;
  display: none;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}

.res-alert.active {
  display: flex;
}

.res-alert-danger {
  background-color: var(--res-red-light);
  color: var(--res-red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.res-alert-success {
  background-color: var(--res-green-light);
  color: #065F46;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

/* Instructions Sidebar / Note Card */
.result-notes-card {
  width: 100%;
  max-width: 380px;
  background-color: var(--res-white);
  border-radius: 18px;
  border: 1px solid var(--res-grey-light);
  box-shadow: var(--res-shadow-sm);
  padding: 28px;
  box-sizing: border-box;
}

.notes-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--res-navy);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.notes-card-title svg {
  color: var(--res-orange);
}

.notes-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}

.notes-list li {
  font-size: 0.86rem;
  color: var(--res-grey);
  line-height: 1.55;
  margin-bottom: 12px;
  padding-left: 20px;
  position: relative;
}

.notes-list li::before {
  content: "•";
  color: var(--res-orange);
  font-size: 1.4rem;
  position: absolute;
  left: 4px;
  top: -4px;
}

.notes-support-box {
  background-color: #F1F5F9;
  border-radius: 12px;
  padding: 14px;
  font-size: 0.82rem;
  color: var(--res-navy);
}

.notes-support-box a {
  color: var(--res-orange);
  text-decoration: none;
  font-weight: 600;
}

.notes-support-box a:hover {
  text-decoration: underline;
}

/* -------------------------------------------------------------
   Verification Result Details Modal / Inline View
   ------------------------------------------------------------- */
.result-preview-card {
  display: none;
  background-color: var(--res-white);
  border-radius: 18px;
  border: 1.5px solid #E2E8F0;
  box-shadow: var(--res-shadow-lg);
  padding: 30px;
  margin-top: 25px;
  text-align: left;
  animation: resFadeUp 0.3s ease-out;
}

.result-preview-card.active {
  display: block;
}

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

.preview-top-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #F1F5F9;
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.preview-title-box h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--res-navy);
  margin: 0 0 4px;
}

.preview-title-box p {
  font-size: 0.85rem;
  color: var(--res-grey);
  margin: 0;
}

.preview-badge-status {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-passed {
  background-color: #DEF7EC;
  color: #03543F;
}

.status-failed {
  background-color: #FDE8E8;
  color: #9B1C1C;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 20px;
  margin-bottom: 24px;
}

.preview-grid-item .label {
  font-size: 0.78rem;
  color: var(--res-grey);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.preview-grid-item .val {
  font-size: 1rem;
  font-weight: 700;
  color: var(--res-navy);
}

.preview-score-box {
  background: linear-gradient(135deg, #111827, #1F2937);
  color: var(--res-white);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.preview-score-item {
  text-align: center;
}

.preview-score-item .sub {
  font-size: 0.75rem;
  color: #9CA3AF;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.preview-score-item .num {
  font-size: 1.6rem;
  font-weight: 800;
  color: #F9FAFB;
}

.preview-score-item.highlight .num {
  color: var(--res-orange);
}

.preview-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-view-pdf {
  flex: 1;
  min-width: 170px;
  height: 48px;
  background-color: var(--res-orange);
  color: var(--res-white);
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-view-pdf:hover {
  background-color: var(--res-orange-hover);
  color: var(--res-white);
}

.btn-download-pdf {
  flex: 1;
  min-width: 170px;
  height: 48px;
  background-color: var(--res-navy);
  color: var(--res-white);
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-download-pdf:hover {
  background-color: #030712;
  color: var(--res-white);
}

.btn-reset-check {
  width: 100%;
  height: 40px;
  background: none;
  border: 1px solid var(--res-grey-light);
  color: var(--res-grey);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.15s ease;
}

.btn-reset-check:hover {
  background-color: #F8FAFC;
  color: var(--res-navy);
}

/* Spinner */
.res-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--res-white);
  animation: resSpin 0.7s linear infinite;
}

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

/* Responsive adjustments */
@media (max-width: 900px) {
  .result-container {
    flex-direction: column;
    align-items: center;
  }
  .result-card, .result-notes-card {
    max-width: 520px;
  }
  .result-hero-title {
    font-size: 2rem;
  }
}

@media (max-width: 520px) {
  .result-page-wrapper {
    padding: 25px 14px 60px;
  }
  .result-card {
    padding: 24px 18px;
    border-radius: 14px;
  }
  .result-hero-title {
    font-size: 1.65rem;
  }
  .captcha-body {
    flex-direction: column;
    gap: 10px;
  }
  .captcha-input-box {
    width: 100%;
  }
  .preview-grid {
    grid-template-columns: 1fr;
  }
  .preview-score-box {
    flex-direction: column;
    gap: 12px;
  }
  .preview-actions {
    flex-direction: column;
  }
  .btn-view-pdf, .btn-download-pdf {
    width: 100%;
  }
}
