/**
 * EduJoy360 - Certificate Verification Page Stylesheet
 * Integrates seamlessly with EduJoy360 Brand Palette
 */

:root {
  --ej-green-primary: #38c871;
  --ej-green-hover: #2da05b;
  --ej-green-dark: #15552f;
  --ej-text-dark: #1F1D0D;
  --ej-bg-soft: #f8fafc;
  --ej-card-border: #e2e8f0;
}

/* Page Hero */
.verify-hero {
  background: linear-gradient(135deg, #15552f 0%, #2da05b 100%);
  padding: 100px 0 70px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.verify-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.15) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  opacity: 0.6;
}

.verify-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.verify-hero-title {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.verify-hero-subtitle {
  font-size: 19px;
  opacity: 0.95;
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Verification Search Section */
.verify-section {
  position: relative;
  margin-top: -50px;
  padding-bottom: 90px;
  z-index: 10;
}

.verify-card {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.08);
  padding: 35px 40px;
  border: 1px solid var(--ej-card-border);
}

.search-box-wrapper {
  position: relative;
  margin-bottom: 20px;
}

.search-box-group {
  display: flex;
  gap: 12px;
}

.search-input-field {
  flex: 1;
  height: 60px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: 12px;
  border: 2px solid #cbd5e1;
  padding: 0 22px 0 54px;
  transition: all 0.25s ease;
  background-color: #ffffff;
  color: #1e293b;
}

.search-input-field:focus {
  border-color: var(--ej-green-primary);
  box-shadow: 0 0 0 5px rgba(56, 200, 113, 0.2);
  outline: none;
}

.search-icon-inside {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: #94a3b8;
  pointer-events: none;
}

.btn-verify {
  height: 60px;
  padding: 0 35px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 12px;
  background: linear-gradient(135deg, #38c871 0%, #2da05b 100%);
  color: #ffffff;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
}

.btn-verify:hover {
  background: linear-gradient(135deg, #2da05b 0%, #15552f 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(45, 160, 91, 0.35);
  color: #ffffff;
}

.search-hint {
  font-size: 13px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

/* Loading State Animation */
.verify-loading-card {
  display: none;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid var(--ej-card-border);
  padding: 50px 30px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  margin-top: 30px;
}

.verify-spinner {
  width: 56px;
  height: 56px;
  border: 4px solid #e2e8f0;
  border-top-color: var(--ej-green-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

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

/* Result Presentation Card */
.result-card {
  display: none;
  margin-top: 35px;
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid var(--ej-card-border);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-card-header {
  padding: 24px 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  border-bottom: 1px solid #f1f5f9;
}

.result-card-header.valid-header {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-left: 6px solid #16a34a;
}

.result-card-header.revoked-header {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-left: 6px solid #dc2626;
}

.verification-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.5px;
  padding: 8px 18px;
  border-radius: 30px;
  text-transform: uppercase;
}

.status-pill-valid {
  background: #16a34a;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
}

.status-pill-revoked {
  background: #dc2626;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

.result-card-body {
  padding: 35px;
}

/* Certificate Detail Grid */
.cert-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 30px;
}

.cert-detail-item {
  background: #f8fafc;
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.cert-detail-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.cert-detail-value {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  word-break: break-word;
}

.cert-detail-value.highlight-code {
  font-family: monospace;
  font-size: 18px;
  color: #15552f;
}

/* Revocation Notice Box */
.revocation-alert-box {
  background: #fff1f2;
  border: 1.5px solid #fecdd3;
  color: #9f1239;
  padding: 18px 22px;
  border-radius: 12px;
  margin-bottom: 25px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

/* Official Authenticity Badge */
.authenticity-badge {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: #f0fdf4;
  border: 1.5px dashed #86efac;
  border-radius: 14px;
  margin-bottom: 30px;
}

.auth-seal-icon {
  width: 50px;
  height: 50px;
  background: #16a34a;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.auth-text h5 {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 700;
  color: #14532d;
}

.auth-text p {
  margin: 0;
  font-size: 13px;
  color: #166534;
}

/* Action Buttons */
.cert-actions-wrapper {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-view-doc {
  background: #15552f;
  color: #ffffff;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 10px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-view-doc:hover {
  background: #2da05b;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-print-summary {
  background: #ffffff;
  color: #334155;
  border: 1.5px solid #cbd5e1;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 10px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-print-summary:hover {
  background: #f8fafc;
  color: #0f172a;
}

/* Not Found Card */
.notfound-card {
  display: none;
  margin-top: 35px;
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #fee2e2;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
  padding: 45px 30px;
  text-align: center;
  animation: fadeInUp 0.3s ease;
}

.notfound-icon {
  width: 70px;
  height: 70px;
  background: #fee2e2;
  color: #ef4444;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .verify-hero-title {
    font-size: 30px;
  }

  .verify-hero-subtitle {
    font-size: 16px;
  }

  .verify-card {
    padding: 25px 20px;
  }

  .search-box-group {
    flex-direction: column;
  }

  .btn-verify {
    height: 52px;
    width: 100%;
  }

  .search-input-field {
    height: 52px;
    font-size: 16px;
  }

  .result-card-header {
    padding: 20px;
  }

  .result-card-body {
    padding: 20px;
  }

  .cert-detail-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}