/* ══════════════════════════════════════════════════════════════════════════
   SSL CHECKER — Premium Styles
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Layout ────────────────────────────────────────────────────────────── */
.ssl-premium-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 32px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Shared Section Card ───────────────────────────────────────────────── */
.ssl-details-section,
.ssl-tls-section,
.ssl-chain-section,
.ssl-insights-section,
.ssl-alerts-section,
.ssl-advanced-section {
  background: linear-gradient(135deg, rgba(255,255,255,0.025) 0%, rgba(0,0,0,0.2) 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  padding: 28px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.ssl-details-section:hover,
.ssl-tls-section:hover,
.ssl-chain-section:hover,
.ssl-insights-section:hover {
  border-color: rgba(0,229,255,0.15);
  box-shadow: 0 8px 40px -12px rgba(0,229,255,0.08);
}

.ssl-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.4);
}
.ssl-section-header svg {
  color: var(--cyber);
  opacity: 0.7;
}

/* ══════════════════════════════════════════════════════════════════════════
   1. STATUS BANNER
   ══════════════════════════════════════════════════════════════════════════ */
.ssl-status-banner {
  position: relative;
  border-radius: 20px;
  padding: 28px 32px;
  overflow: hidden;
  border: 1px solid transparent;
}

.ssl-status-secure {
  background: linear-gradient(135deg, rgba(0,229,255,0.04) 0%, rgba(16,185,129,0.06) 100%);
  border-color: rgba(0,229,255,0.15);
}
.ssl-status-insecure {
  background: linear-gradient(135deg, rgba(239,68,68,0.04) 0%, rgba(255,100,100,0.06) 100%);
  border-color: rgba(239,68,68,0.2);
}
.ssl-status-error {
  background: linear-gradient(135deg, rgba(239,68,68,0.04) 0%, rgba(100,0,0,0.06) 100%);
  border-color: rgba(239,68,68,0.2);
}

.ssl-status-glow {
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.3;
}
.ssl-status-secure .ssl-status-glow { background: rgba(0,229,255,0.2); }
.ssl-status-insecure .ssl-status-glow,
.ssl-status-error .ssl-status-glow { background: rgba(239,68,68,0.2); }

.ssl-status-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.ssl-status-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: ssl-pulse 2s ease-in-out infinite;
}
.ssl-icon-secure {
  background: rgba(0,229,255,0.1);
  color: #00e5ff;
  box-shadow: 0 0 30px rgba(0,229,255,0.15);
}
.ssl-icon-insecure, .ssl-icon-error {
  background: rgba(239,68,68,0.1);
  color: #f87171;
  box-shadow: 0 0 30px rgba(239,68,68,0.15);
}

@keyframes ssl-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.85; }
}

.ssl-status-text { flex: 1; min-width: 200px; }
.ssl-status-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.ssl-status-secure .ssl-status-title { color: #00e5ff; }
.ssl-status-insecure .ssl-status-title,
.ssl-status-error .ssl-status-title { color: #f87171; }

.ssl-status-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
}

.ssl-status-badge {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.2em;
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid;
  animation: ssl-badge-glow 2s ease-in-out infinite alternate;
}
.ssl-badge-secure {
  background: rgba(0,229,255,0.08);
  color: #00e5ff;
  border-color: rgba(0,229,255,0.3);
}
.ssl-badge-insecure {
  background: rgba(239,68,68,0.08);
  color: #f87171;
  border-color: rgba(239,68,68,0.3);
}
@keyframes ssl-badge-glow {
  from { box-shadow: 0 0 10px rgba(0,229,255,0.1); }
  to   { box-shadow: 0 0 25px rgba(0,229,255,0.2); }
}
.ssl-badge-insecure { animation-name: ssl-badge-glow-red; }
@keyframes ssl-badge-glow-red {
  from { box-shadow: 0 0 10px rgba(239,68,68,0.1); }
  to   { box-shadow: 0 0 25px rgba(239,68,68,0.2); }
}

/* ══════════════════════════════════════════════════════════════════════════
   2. SECURITY SCORE SECTION
   ══════════════════════════════════════════════════════════════════════════ */
.ssl-score-section {
  display: grid;
  grid-template-columns: 180px 1fr 1fr;
  gap: 28px;
  align-items: start;
  background: linear-gradient(135deg, rgba(255,255,255,0.025) 0%, rgba(0,0,0,0.2) 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  padding: 32px;
  backdrop-filter: blur(16px);
}

@media (max-width: 768px) {
  .ssl-score-section { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}

.ssl-score-ring-wrap {
  position: relative;
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ssl-score-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ssl-score-circle {
  transition: stroke-dashoffset 1.5s cubic-bezier(0.65, 0, 0.35, 1);
}

.ssl-score-center {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ssl-score-number {
  font-size: 42px;
  font-weight: 950;
  letter-spacing: -0.02em;
  line-height: 1;
}

.ssl-score-label {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.25);
  margin-top: 4px;
}

@keyframes ssl-orbit {
  0%   { transform: rotate(0deg) translateX(66px) rotate(0deg); opacity: 0.8; }
  50%  { opacity: 0.3; }
  100% { transform: rotate(360deg) translateX(66px) rotate(-360deg); opacity: 0.8; }
}
.ssl-score-orbit {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orbit-color, #00e5ff);
  filter: blur(2px) drop-shadow(0 0 6px var(--orbit-color, #00e5ff));
  animation: ssl-orbit 4s linear infinite;
  z-index: 10;
}

.ssl-grade {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 950;
  margin-bottom: 12px;
  background: rgba(0,0,0,0.3);
}

.ssl-score-heading {
  font-size: 16px;
  font-weight: 800;
  color: rgba(255,255,255,0.9);
  margin-bottom: 14px;
}

.ssl-score-breakdown {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ssl-breakdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}
.ssl-breakdown-icon {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  flex-shrink: 0;
}
.ssl-bd-pass { background: rgba(16,185,129,0.15); color: #34d399; }
.ssl-bd-fail { background: rgba(239,68,68,0.15); color: #f87171; }
.ssl-bd-warn { background: rgba(245,158,11,0.15); color: #fbbf24; }

.ssl-breakdown-label { flex: 1; }
.ssl-breakdown-pts { font-weight: 800; font-family: var(--mono); }

/* Quick Stats */
.ssl-quick-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ssl-stat-card {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 16px 20px;
  text-align: center;
  transition: all 0.2s ease;
}
.ssl-stat-card:hover {
  border-color: rgba(0,229,255,0.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.4);
}
.ssl-stat-num {
  font-size: 26px;
  font-weight: 950;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 6px;
}
.ssl-stat-label {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.25);
}

/* ══════════════════════════════════════════════════════════════════════════
   3. WARNINGS / ALERTS
   ══════════════════════════════════════════════════════════════════════════ */
.ssl-alert {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  margin-top: 10px;
}
.ssl-alert-critical {
  background: rgba(239,68,68,0.06);
  border: 1px solid rgba(239,68,68,0.15);
  color: #f87171;
}
.ssl-alert-warning {
  background: rgba(245,158,11,0.06);
  border: 1px solid rgba(245,158,11,0.15);
  color: #fbbf24;
}
.ssl-alert-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  animation: ssl-dot-pulse 1.5s ease-in-out infinite;
}
.ssl-dot-critical { background: #ef4444; box-shadow: 0 0 12px rgba(239,68,68,0.5); }
.ssl-dot-warning  { background: #f59e0b; box-shadow: 0 0 12px rgba(245,158,11,0.5); }

@keyframes ssl-dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* ══════════════════════════════════════════════════════════════════════════
   4. CERTIFICATE DETAILS
   ══════════════════════════════════════════════════════════════════════════ */
.ssl-cert-grid {
  display: flex;
  flex-direction: column;
}
.ssl-cert-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  gap: 20px;
  transition: background 0.2s;
}
.ssl-cert-row:last-child { border-bottom: none; }
.ssl-cert-row:hover { background: rgba(0,229,255,0.02); margin: 0 -16px; padding-left: 16px; padding-right: 16px; border-radius: 8px; }

.ssl-cert-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.75);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 0;
  min-width: 180px;
}
.ssl-cert-icon { font-size: 16px; }

.ssl-cert-value-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  justify-content: flex-end;
}
.ssl-cert-value {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  text-align: right;
  word-break: break-word;
}

.ssl-copy-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  color: rgba(255,255,255,0.4);
  flex-shrink: 0;
}
.ssl-copy-btn:hover {
  background: rgba(0,229,255,0.1);
  border-color: rgba(0,229,255,0.3);
  transform: scale(1.1);
}

/* ══════════════════════════════════════════════════════════════════════════
   5. TLS CONFIG
   ══════════════════════════════════════════════════════════════════════════ */
.ssl-tls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 640px) { .ssl-tls-grid { grid-template-columns: 1fr; } }

.ssl-tls-card {
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 14px;
  padding: 20px;
  transition: all 0.2s;
}
.ssl-tls-card:hover {
  border-color: rgba(0,229,255,0.12);
  transform: translateY(-2px);
}
.ssl-tls-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.75);
  margin-bottom: 10px;
}
.ssl-tls-value {
  display: flex;
  align-items: center;
}

/* ══════════════════════════════════════════════════════════════════════════
   6. CERTIFICATE CHAIN VISUALIZATION
   ══════════════════════════════════════════════════════════════════════════ */
.ssl-chain-visual {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: 20px;
}
.ssl-chain-node {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  position: relative;
  padding-bottom: 20px;
}
.ssl-chain-node:last-child { padding-bottom: 0; }

.ssl-chain-connector {
  position: absolute;
  left: -14px;
  top: 16px;
  width: 2px;
  height: calc(100% + 4px);
}
.ssl-chain-line {
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0,229,255,0.3), rgba(0,229,255,0.05));
}
.ssl-chain-node:last-child .ssl-chain-connector { display: none; }

.ssl-chain-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid;
  flex-shrink: 0;
  margin-top: 3px;
  position: relative;
  left: -21px;
  margin-right: -21px;
  z-index: 1;
  background: var(--bg);
}
.ssl-chain-leaf .ssl-chain-dot   { border-color: #00e5ff; box-shadow: 0 0 10px rgba(0,229,255,0.4); }
.ssl-chain-intermediate .ssl-chain-dot { border-color: #818cf8; box-shadow: 0 0 8px rgba(129,140,248,0.3); }
.ssl-chain-root .ssl-chain-dot   { border-color: #34d399; box-shadow: 0 0 8px rgba(52,211,153,0.3); }

.ssl-chain-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ssl-chain-type {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.ssl-chain-leaf .ssl-chain-type   { color: #00e5ff; }
.ssl-chain-intermediate .ssl-chain-type { color: #818cf8; }
.ssl-chain-root .ssl-chain-type   { color: #34d399; }

.ssl-chain-text {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════════════════════
   7. QUANTNEST INSIGHTS
   ══════════════════════════════════════════════════════════════════════════ */
.ssl-insights-section {
  background: linear-gradient(135deg, rgba(0,229,255,0.02) 0%, rgba(0,0,0,0.3) 100%);
  border: 1px dashed rgba(0,229,255,0.15);
}

.ssl-insights-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.ssl-insights-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(0,229,255,0.08);
  color: #00e5ff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(0,229,255,0.1);
}
.ssl-insights-title {
  font-size: 16px;
  font-weight: 800;
  color: white;
}
.ssl-insights-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  font-weight: 600;
}

.ssl-insights-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ssl-insight {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  transition: background 0.2s;
}
.ssl-insight:hover { background: rgba(255,255,255,0.02); }

.ssl-insight-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}
.ssl-insight-ok      { color: #34d399; }
.ssl-insight-warn    { color: #fbbf24; }
.ssl-insight-critical { color: #f87171; }

/* ══════════════════════════════════════════════════════════════════════════
   8. ADVANCED EXPANDABLE
   ══════════════════════════════════════════════════════════════════════════ */
.ssl-advanced-toggle {
  background: none;
  border: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.05em;
  transition: color 0.2s;
}
.ssl-advanced-toggle:hover { color: #00e5ff; }

.ssl-toggle-arrow {
  font-size: 16px;
  transition: transform 0.3s ease;
}
.ssl-arrow-open { transform: rotate(90deg); }

.ssl-advanced-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s;
  padding: 0 20px;
}
.ssl-advanced-open .ssl-advanced-content {
  max-height: 500px;
  padding: 8px 20px 20px;
}

.ssl-adv-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  gap: 16px;
}
.ssl-adv-row:last-child { border-bottom: none; }
.ssl-adv-label {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.75);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}
.ssl-adv-value {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  text-align: right;
  word-break: break-all;
}

.ssl-san-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  margin-top: 6px;
}
.ssl-san-tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 10px;
  background: rgba(0,229,255,0.06);
  border: 1px solid rgba(0,229,255,0.12);
  border-radius: 6px;
  color: rgba(0,229,255,0.7);
}

/* ══════════════════════════════════════════════════════════════════════════
   9. BRAND FOOTER
   ══════════════════════════════════════════════════════════════════════════ */
.ssl-brand-footer {
  text-align: center;
  padding: 20px;
  font-size: 11px;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.05em;
}
.ssl-brand-footer strong {
  color: rgba(0,229,255,0.5);
  font-weight: 800;
}

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .ssl-status-inner { flex-direction: column; text-align: center; }
  .ssl-status-badge { align-self: center; }
  .ssl-cert-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .ssl-cert-value-wrap { justify-content: flex-start; }
  .ssl-cert-label { min-width: unset; }
  .ssl-adv-row { flex-direction: column; }
  .ssl-adv-value { text-align: left; }
  .ssl-chain-visual { padding-left: 10px; }
}
