/* ==========================================================================
   DocsDown — legal.css v2
   Modern SSR pages: platform downloaders, legal pages, contact.
   Consistent with base.css design tokens.
   ========================================================================== */

/* --- Shared Layout --- */
.legal-container { max-width: 960px; margin: 0 auto; padding: 0 1.25rem; }
.legal-container--narrow { max-width: 780px; }

/* --- Breadcrumb --- */
.uc-breadcrumb {
  padding: 0.6rem 0;
  background: #fff;
  border-bottom: 1px solid var(--border, #e8eaed);
  margin-bottom: 0.75rem;
}
.uc-breadcrumb .legal-container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  font-size: 0.875rem;
  color: var(--muted, #5f6368);
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem;
  line-height: 1.4;
}
.uc-breadcrumb a {
  color: var(--primary, #1a73e8);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
  white-space: nowrap;
}
.uc-breadcrumb a:hover { text-decoration: underline; }
.uc-breadcrumb .sep {
  color: #94a3b8;
  font-size: 0.7rem;
  user-select: none;
  flex-shrink: 0;
  margin: 0 0.4rem;
}
.uc-breadcrumb .current {
  color: var(--text, #202124);
  font-weight: 600;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .uc-breadcrumb .current { max-width: 180px; }
}

/* --- Platform Hero --- */
.platform-hero {
  background: linear-gradient(135deg, #1a73e8 0%, #0d5bbd 50%, #1a4fbf 100%);
  color: #fff;
  padding: 3rem 1rem 4.5rem;
  text-align: center;
}
.platform-hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.platform-hero p {
  font-size: 1.05rem;
  opacity: 0.92;
  max-width: 600px;
  margin: 0 auto;
}

/* --- Download Form Card (centered, wide) --- */
.dd-form-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  padding: 2rem 2.25rem;
  max-width: 740px;
  margin: -1.5rem auto 2.5rem;
  position: relative;
  z-index: 2;
}
.dd-form-card h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text, #202124);
}
.dd-form {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.dd-form input[type="url"] {
  flex: 1;
  min-width: 260px;
  padding: 0.85rem 1rem;
  border: 2px solid var(--input-border, #dadce0);
  border-radius: 10px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.dd-form input[type="url"]:focus {
  border-color: var(--primary, #1a73e8);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
}
.dd-form input.shake { animation: shake 0.4s; border-color: var(--danger, #d93025) !important; }
.dd-form button {
  background: var(--primary, #1a73e8);
  color: #fff;
  border: none;
  padding: 0.85rem 1.75rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}
.dd-form button:hover { background: var(--primary-dark, #0d5bbd); transform: translateY(-1px); }
.dd-form button:active { transform: translateY(0); }

/* --- Mobile: form jadi 2 baris (input & tombol full-width, nyaman disentuh) --- */
@media (max-width: 640px) {
  .dd-form-card {
    padding: 1.4rem 1.15rem;
    margin: -1rem auto 2rem;
    border-radius: 14px;
  }
  .dd-form {
    flex-direction: column;
    gap: 0.6rem;
  }
  .dd-form input[type="url"] {
    min-width: 0;
    width: 100%;
    font-size: 1rem; /* cegah zoom otomatis iOS */
    padding: 1.05rem 1.15rem;
  }
  .dd-form button {
    width: 100%;
    justify-content: center;
    padding: 1.05rem 1.25rem;
    font-size: 1.05rem;
    min-height: 52px;
  }
}
@media (max-width: 380px) {
  .dd-form input[type="url"],
  .dd-form button { font-size: 0.95rem; padding: 0.95rem 1rem; }
}
.dd-form-err { color: var(--danger, #d93025); font-size: 0.9rem; margin-top: 0.5rem; display: none; }
.form-note { color: var(--muted, #5f6368); font-size: 0.875rem; text-align: center; margin-top: 1rem; }

/* --- Contact form (/contact/) --- */
.dd-contact { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--border, #e8eaed); }
.dd-contact h2 { font-size: 1.25rem; margin-bottom: 0.25rem; }
.dd-form-col { flex-direction: column; align-items: stretch; }
.dd-form-col label { font-weight: 600; font-size: 0.9rem; margin: 0.35rem 0 -0.25rem; }
.dd-form input[type="text"],
.dd-form input[type="email"],
.dd-form textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid var(--input-border, #dadce0);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.dd-form textarea { resize: vertical; min-height: 120px; }
.dd-form input[type="text"]:focus,
.dd-form input[type="email"]:focus,
.dd-form textarea:focus {
  border-color: var(--primary, #1a73e8);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
}
.dd-form .cf-turnstile { margin: 0.25rem 0; }
.dd-form button:disabled { opacity: 0.65; cursor: wait; transform: none; }

/* --- Content Prose (legal / about) --- */
.legal-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-card, 0 4px 20px rgba(0, 0, 0, 0.06));
  padding: 2.5rem;
  margin-bottom: 2rem;
}
.legal-card h1 {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
}
.legal-sub { color: var(--muted, #5f6368); margin-bottom: 1.5rem; font-size: 0.95rem; }
.legal-prose h2 { margin: 1.75rem 0 0.6rem; font-size: 1.15rem; color: var(--primary, #1a73e8); font-weight: 700; }
.legal-prose h3 { margin: 1.25rem 0 0.4rem; font-size: 1.05rem; }
.legal-prose p { margin-bottom: 0.9rem; line-height: 1.7; }
.legal-prose ul, .legal-prose ol { margin: 0 0 1rem 1.4rem; }
.legal-prose li { margin-bottom: 0.35rem; line-height: 1.6; }
.legal-prose a { color: var(--primary, #1a73e8); text-decoration: none; }
.legal-prose a:hover { text-decoration: underline; }

/* --- Steps Grid (platform pages) --- */
.dd-steps {
  content-visibility: auto;
  contain-intrinsic-size: auto 400px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}
.dd-step {
  background: #f8f9fa;
  border: 1px solid var(--border, #e8eaed);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
}
.dd-step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary, #1a73e8);
  color: #fff;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}
.dd-step h3 { font-size: 0.95rem; margin-bottom: 0.3rem; }
.dd-step p { font-size: 0.85rem; color: var(--muted, #5f6368); }

/* --- FAQ (platform pages) --- */
.dd-faq { margin: 2rem 0; content-visibility: auto; contain-intrinsic-size: auto 400px; }
.dd-faq h2 { font-size: 1.3rem; margin-bottom: 1rem; }
.dd-faq-item {
  background: #fff;
  border: 1px solid var(--border, #e8eaed);
  border-radius: 10px;
  margin-bottom: 0.6rem;
  overflow: hidden;
}
.dd-faq-q {
  padding: 0.9rem 1.1rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.15s;
}
.dd-faq-q:hover { background: #f8f9fa; }
.dd-faq-q::after { content: "+"; font-size: 1.2rem; color: var(--primary, #1a73e8); font-weight: 700; transition: transform 0.2s; }
.dd-faq-item.open .dd-faq-q::after { content: "\2212"; }
.dd-faq-a { display: none; padding: 0 1.1rem 0.9rem; color: var(--muted, #5f6368); font-size: 0.92rem; line-height: 1.6; }
.dd-faq-item.open .dd-faq-a { display: block; }

/* --- Content Body (SEO text below form) --- */
.dd-body { margin: 0 0 2rem; }
.dd-body h2 { font-size: 1.3rem; font-weight: 700; margin: 2rem 0 0.75rem; }
.dd-body h3 { font-size: 1.1rem; font-weight: 600; margin: 1.5rem 0 0.5rem; }
.dd-body p { margin-bottom: 0.9rem; line-height: 1.7; }
.dd-body ul, .dd-body ol { margin: 0 0 1rem 1.4rem; }
.dd-body li { margin-bottom: 0.3rem; line-height: 1.6; }
.dd-body a { color: var(--primary, #1a73e8); }

/* --- Footer --- styles .site-footer live in base.css (modern dark design) --- */

/* --- Spinner --- */
.dd-spinner {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .platform-hero { padding: 2rem 1rem 3.5rem; }
  .dd-form-card { margin: -2rem 0.75rem 2rem; padding: 1.5rem; border-radius: 14px; }
  .dd-form input[type="url"] { min-width: 0; }
  .legal-card { padding: 1.5rem; }
  .uc-breadcrumb { margin: 1rem 0.75rem 0; font-size: 0.8rem; }
}

@media (pointer: coarse) {
  .dd-faq-q { min-height: 44px; }
  .uc-breadcrumb a { min-height: 44px; display: inline-flex; align-items: center; }
  .legal-nav a { min-height: 44px; display: inline-flex; align-items: center; }
}
.dd-rel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem; }
.dd-rel-card { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; padding: 1rem 0.75rem; background: #fff; border: 1px solid #e8eaed; border-radius: 12px; text-decoration: none; color: var(--text, #1f2937); font-weight: 600; font-size: 0.88rem; text-align: center; transition: all 0.15s; }
.dd-rel-card:hover { border-color: var(--primary, #1a73e8); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(26,115,232,0.14); }
.dd-rel-ico { font-size: 1.7rem; line-height: 1; }
.dd-rel-sub { font-size: 0.74rem; color: var(--muted, #5f6368); font-weight: 400; line-height: 1.4; }
.dd-rel-card-hl { border-color: #bcd7fb; background: #eaf3ff; }
