/* ========================================================
   CERTIFICATE VERIFICATION PAGE STYLES
   ======================================================== */

body.modal-open,
html.modal-open {
  overflow: hidden !important;
  height: 100% !important;
}

.verify-page-wrapper {
  min-height: 80vh;
  padding-top: 140px;
  padding-bottom: 90px;
  padding-left: 20px;
  padding-right: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

/* Background subtle ambient glow */
.verify-page-wrapper::before {
  content: "";
  position: absolute;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(circle, rgba(39, 217, 83, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* --- HERO SECTION --- */
.verify-hero {
  text-align: center;
  max-width: 850px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.verify-main-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -1px;
  color: #ffffff;
  margin-bottom: 16px;
  line-height: 1.2;
}

.verify-main-title .text-highlight {
  color: var(--primary, #27d953);
}

.verify-subtitle-1 {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: #9aa89d;
  font-weight: 400;
  margin-bottom: 10px;
  line-height: 1.5;
}

.verify-subtitle-2 {
  font-size: clamp(0.9rem, 2.2vw, 1.05rem);
  color: #9aa89d;
  font-weight: 400;
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.6;
}

/* --- VERIFICATION CARD / BOX SECTION --- */
.verify-box-section {
  width: 100%;
  max-width: 750px;
  margin: 60px auto 0;
  position: relative;
  z-index: 1;
  text-align: center;
}

.verify-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.verify-box-title {
  font-size: clamp(1.6rem, 4.5vw, 2.3rem);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.verify-star {
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  vertical-align: middle;
  line-height: 1;
  color: #ffffff;
  display: inline-block;
}

.verify-box-subtitle {
  font-size: clamp(0.9rem, 2.5vw, 1.05rem);
  color: #88988d;
  margin-bottom: 22px;
  font-weight: 400;
}

.verify-form {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.verify-input-group {
  width: 100%;
  position: relative;
}

.verify-input-field {
  width: 100%;
  height: 52px;
  background-color: #d1d5db;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 18px;
  font-size: 1.05rem;
  font-weight: 500;
  color: #111827;
  text-align: center;
  outline: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
  font-family: inherit;
}

.verify-input-field:focus {
  background-color: #e5e7eb;
  border-color: var(--primary, #27d953);
  box-shadow: 0 0 15px rgba(39, 217, 83, 0.35);
}

.verify-input-field::placeholder {
  color: #6b7280;
  font-size: 0.95rem;
  font-weight: 400;
}

/* Submit Button */
.verify-btn-wrapper {
  width: 100%;
  margin-top: 18px;
  display: flex;
  justify-content: center;
}

.btn-verify-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--primary, #27d953);
  color: #050a06;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  padding: 13px 32px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(39, 217, 83, 0.25);
  letter-spacing: 0.2px;
}

.btn-verify-submit:hover {
  background: #2fe65c;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(39, 217, 83, 0.45);
}

.btn-verify-submit:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(39, 217, 83, 0.3);
}

.btn-verify-submit i {
  font-size: 1rem;
}

/* ========================================================
   VERIFICATION POPUP / MODAL (No blur, horizontal landscape)
   ======================================================== */

.verify-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65); /* Dimming only, no blur */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 25px 15px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: modalFadeIn 0.2s ease;
  transition: opacity 0.2s ease;
  box-sizing: border-box;
}

.verify-modal-content {
  background: #0d1510;
  border: 1.5px solid rgba(39, 217, 83, 0.3);
  border-radius: 16px;
  max-width: 700px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.85),
    0 0 30px rgba(39, 217, 83, 0.12);
  position: relative;
  padding: 30px 28px 25px;
  text-align: center;
  box-sizing: border-box;
  margin: auto;
  animation: modalZoomIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Wide Landscape Mode */
.verify-modal-content.modal-landscape {
  max-width: 950px;
}

.verify-modal-content::-webkit-scrollbar {
  width: 7px;
}
.verify-modal-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}
.verify-modal-content::-webkit-scrollbar-thumb {
  background: rgba(39, 217, 83, 0.3);
  border-radius: 10px;
}
.verify-modal-content::-webkit-scrollbar-thumb:hover {
  background: var(--primary, #27d953);
}

.verify-modal-content.modal-not-found {
  border-color: rgba(239, 68, 68, 0.35);
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.85),
    0 0 30px rgba(239, 68, 68, 0.12);
  max-width: 520px;
}

.verify-modal-close {
  position: absolute;
  top: 15px;
  right: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #9aa89d;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.verify-modal-close i {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 0.9rem;
}

.verify-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.06);
}

/* Modal Header */
.modal-header-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  text-align: center;
}

.verify-status-badge {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(39, 217, 83, 0.12);
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.8rem;
  box-shadow: 0 0 20px rgba(39, 217, 83, 0.25);
  flex-shrink: 0;
}

.verify-status-badge.verify-logo-badge {
  background: transparent;
  border: none;
  box-shadow: none;
  width: 98px;
  height: 98px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.verify-popup-badge {
  position: absolute;
  bottom: 16px;
  right: 22px;
  width: 125px;
  height: 125px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}

.verify-popup-badge .verify-badge-img,
.verify-badge-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(39, 217, 83, 0.45));
}

.verify-status-badge.badge-error {
  background: rgba(239, 68, 68, 0.12);
  border-color: #ef4444;
  color: #ef4444;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.25);
  margin: 0 auto 15px;
}

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

.modal-title {
  font-size: 1.55rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 3px 0;
  letter-spacing: -0.5px;
}

.modal-title.title-error {
  color: #f87171;
  text-align: center;
}

.modal-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

/* ========================================================
   HORIZONTAL LANDSCAPE CONTAINER & PANELS
   ======================================================== */

.cert-landscape-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 18px 0;
  text-align: left;
  align-items: stretch;
}

/* If only primary panel exists */
.cert-landscape-container:has(> .cert-panel:only-child) {
  grid-template-columns: 1fr;
}

.cert-panel {
  background: rgba(18, 28, 20, 0.7);
  border: 1px solid rgba(39, 217, 83, 0.18);
  border-radius: 12px;
  padding: 16px 18px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.cert-panel-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary, #27d953);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(39, 217, 83, 0.15);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cert-fields-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cert-field-row {
  display: flex;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 8px 12px;
  gap: 12px;
  transition: 0.2s ease;
}

.cert-field-row:hover {
  background: rgba(39, 217, 83, 0.04);
  border-color: rgba(39, 217, 83, 0.2);
}

.cert-field-row.field-highlight {
  background: rgba(39, 217, 83, 0.08);
  border-color: rgba(39, 217, 83, 0.3);
}

.cert-label {
  flex: 0 0 125px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.4px;
}

.field-highlight .cert-label {
  color: var(--primary);
}

.cert-val {
  flex: 1;
  font-size: 0.94rem;
  font-weight: 600;
  color: #ffffff;
  word-break: break-word;
}

.field-highlight .cert-val {
  color: #2fe65c;
  font-family: monospace;
  font-size: 1rem;
}

/* Topics list inside right panel */
.topics-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 6px;
}

.topics-list::-webkit-scrollbar {
  width: 5px;
}
.topics-list::-webkit-scrollbar-thumb {
  background: rgba(39, 217, 83, 0.25);
  border-radius: 4px;
}

.topic-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.86rem;
  color: #e2e8f0;
  line-height: 1.4;
  padding: 4px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
}

.topic-item i {
  color: var(--primary);
  font-size: 0.8rem;
  margin-top: 3px;
  flex-shrink: 0;
}

/* Modal Action Buttons */
.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 18px;
}

.btn-modal-download,
.btn-modal-print {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary);
  color: #050a06;
  padding: 10px 24px;
  border-radius: 50px;
  font-size: 0.92rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: 0.25s;
  font-family: inherit;
  box-shadow: 0 4px 15px rgba(39, 217, 83, 0.3);
}

.btn-modal-download:hover,
.btn-modal-print:hover {
  background: #2fe65c;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(39, 217, 83, 0.45);
}

.btn-modal-download:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  padding: 10px 22px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.25s;
  font-family: inherit;
}

.btn-modal-close:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: white;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalZoomIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Print Optimization */
@media print {
  body * {
    visibility: hidden;
  }
  .verify-modal-content, .verify-modal-content * {
    visibility: visible;
  }
  .verify-modal-content {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    max-width: 100%;
    border: none;
    box-shadow: none;
    background: #ffffff !important;
    color: #000000 !important;
  }
  .verify-modal-close, .modal-actions {
    display: none !important;
  }
  .modal-title {
    color: #000000 !important;
  }
  .cert-panel {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
  }
  .cert-field-row {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
  }
  .cert-label {
    color: #15803d !important;
  }
  .cert-val {
    color: #0f172a !important;
  }
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 820px) {
  .cert-landscape-container {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .modal-header-section {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

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

@media (max-width: 768px) {
  .verify-page-wrapper {
    padding-top: 130px;
    padding-bottom: 60px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .verify-modal-overlay {
    padding: 15px 10px;
  }

  .verify-modal-content {
    padding: 24px 14px 20px;
    max-height: 88vh;
  }

  .verify-popup-badge {
    position: static;
    margin: 15px auto 0;
    width: 110px;
    height: 110px;
  }

  .cert-field-row {
    flex-direction: column;
    gap: 3px;
    padding: 8px 10px;
  }

  .cert-label {
    flex: unset;
    font-size: 0.76rem;
  }

  .cert-val {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .verify-page-wrapper {
    padding-top: 130px;
    padding-bottom: 45px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .verify-main-title {
    font-size: 1.8rem;
    margin-bottom: 12px;
    line-height: 1.25;
  }

  .verify-subtitle-1 {
    font-size: 0.95rem;
    margin-bottom: 8px;
    line-height: 1.45;
  }

  .verify-subtitle-2 {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .verify-box-section {
    margin-top: 36px;
  }

  .verify-box-title {
    font-size: 1.4rem;
    margin-bottom: 8px;
  }

  .verify-box-subtitle {
    font-size: 0.88rem;
    margin-bottom: 18px;
  }

  .verify-input-field {
    height: 48px;
    font-size: 0.92rem;
    padding: 0 12px;
  }

  .btn-verify-submit {
    width: 100%;
    max-width: 100%;
    padding: 12px 20px;
    font-size: 0.92rem;
  }
}
