/* ============================================================
   VIVEKA - Common Styles
   Shared CSS for index.html and api-docs.html
   ============================================================ */

/* Loading Spinner */
.spinner {
  display: inline-block;
  width: 48px;
  height: 48px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-top-color: #1a1a1a;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

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

/* Base typography */
* {
  font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Fraunces', Georgia, serif;
}

/* Background - Orange gradient with webp image */
body {
  position: relative;
  background-image: url('/static/img/bg.webp');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* Glassmorphism card styles - Light theme */
.glass-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow:
    0 8px 32px 0 rgba(0, 0, 0, 0.2),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.6);
  border-radius: 0;
}

.glass-input {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
  color: #1a1a1a;
  border-radius: 0;
}

.glass-input:focus {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.3);
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 165, 0, 0.3);
}

.glass-input::placeholder {
  color: rgba(26, 26, 26, 0.5);
}

/* Single button class - unified for all button usage */
.glass-button {
  background: #000000;
  color: #ffffff;
  border: 2px solid #000000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  border-radius: 0;
  font-family: 'Space Mono', monospace;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.glass-button:hover {
  background: #1a1a1a;
  border-color: #1a1a1a;
  box-shadow: 0 6px 16px rgba(255, 140, 0, 0.3);
}

/* Secondary button - inverted colors for contrast */
.glass-button-secondary {
  background: #ffffff;
  color: #000000;
  border: 1px solid #000000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  border-radius: 0;
  font-family: 'Space Mono', monospace;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.glass-button-secondary:hover {
  background: #f5f5f5;
  border-color: #000000;
  box-shadow: 0 6px 16px rgba(255, 140, 0, 0.3);
}

/* Number input styling */
input[type="number"] {
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Required field label styling */
.required-label {
  color: rgba(220, 100, 0, 0.95);
}

/* ============================================================
   MARKDOWN CONTENT STYLES (for analysis results)
   ============================================================ */

.markdown-content {
  color: rgba(26, 26, 26, 0.9);
  line-height: 1.7;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4 {
  color: #1a1a1a;
  font-weight: 600;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  letter-spacing: -0.02em;
}

.markdown-content h1 {
  font-size: 1.875rem;
}

.markdown-content h2 {
  font-size: 1.5rem;
}

.markdown-content h3 {
  font-size: 1.25rem;
}

.markdown-content h4 {
  font-size: 1.125rem;
}

.markdown-content p {
  margin-bottom: 1em;
}

.markdown-content ul,
.markdown-content ol {
  margin-left: 1.5em;
  margin-bottom: 1em;
}

.markdown-content li {
  margin-bottom: 0.5em;
}

.markdown-content strong {
  color: #1a1a1a;
  font-weight: 600;
}

.markdown-content code {
  background: rgba(0, 0, 0, 0.05);
  padding: 0.2em 0.4em;
  border-radius: 0.25em;
  font-size: 0.9em;
  font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
}

.markdown-content pre {
  background: rgba(0, 0, 0, 0.03);
  padding: 1em;
  border-radius: 0.5em;
  overflow-x: auto;
  margin-bottom: 1em;
}

.markdown-content pre code {
  background: transparent;
  padding: 0;
}

.markdown-content blockquote {
  border-left: 3px solid rgba(0, 0, 0, 0.2);
  padding-left: 1em;
  margin-left: 0;
  margin-bottom: 1em;
  color: rgba(26, 26, 26, 0.6);
}

.markdown-content a {
  color: rgba(255, 140, 0, 0.95);
  text-decoration: underline;
}

.markdown-content hr {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  margin: 2em 0;
}

/* ============================================================
   API DOCUMENTATION STYLES
   ============================================================ */

.code-block {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #1a1a1a;
}

.code-block pre {
  margin: 0;
}

/* Section styling */
.doc-section {
  margin-bottom: 2rem;
}

.doc-section h2 {
  color: #1a1a1a;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.doc-section h3 {
  color: rgba(220, 100, 0, 0.9);
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.doc-section h4 {
  color: #4b5563;
  font-weight: 500;
  font-size: 0.875rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.doc-section p {
  color: #4b5563;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.doc-section ul,
.doc-list {
  color: #4b5563;
  line-height: 1.6;
  list-style-type: disc;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
  word-spacing: 0.05em;
}

.doc-list li {
  margin-bottom: 0.25rem;
}

.doc-section ul code {
  background: rgba(0, 0, 0, 0.05);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 0.85rem;
  color: #1a1a1a;
}

.code-inline {
  background: rgba(0, 0, 0, 0.05);
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 0.875rem;
  color: #1a1a1a;
}

.doc-divider {
  height: 1px;
  background-color: rgba(0, 0, 0, 0.1);
  margin: 2rem 0;
  border: none;
}

.endpoint-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: 0.5rem;
}

.endpoint-badge.post {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.endpoint-badge.get {
  background: rgba(59, 130, 246, 0.15);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.endpoint-path {
  color: #1a1a1a;
  font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 0.95rem;
}

.param-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.param-table th,
.param-table td {
  text-align: left;
  padding: 0.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.param-table th {
  color: #6b7280;
  font-size: 0.875rem;
  font-weight: 600;
}

.param-table td {
  color: #1a1a1a;
  font-size: 0.875rem;
}

.param-table code {
  background: rgba(0, 0, 0, 0.05);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 0.8rem;
  color: #1a1a1a;
}

/* ============================================================
   INDEX PAGE UTILITY CLASSES
   ============================================================ */

.hero-title {
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.tagline {
  font-family: 'Fraunces', Georgia, serif;
  line-height: 1.2;
}

.error-box {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1rem;
}

.email-banner {
  z-index: 100;
}

/* ============================================================
   ABOUT SECTION (shared across pages)
   ============================================================ */

.about-section-wrapper {
  padding-bottom: 3rem;
}

.about-section-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .about-section-card {
    flex-direction: row;
    gap: 1.5rem;
    align-items: flex-start;
  }
}

.about-heading {
  font-size: 1.125rem;
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
  font-family: 'Fraunces', Georgia, serif;
}

.avatar-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  object-fit: cover;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.social-text-link {
  display: inline;
  color: rgba(220, 100, 0, 1);
  text-decoration: underline;
  transition: color 0.2s ease;
  font-weight: 500;
}

.social-text-link:hover {
  color: rgba(255, 140, 0, 1);
}

/* ============================================================
   EMAIL SUBSCRIPTION (shared across pages)
   ============================================================ */

.form-text {
  color: #111827;
  font-weight: 400;
  font-size: 0.875rem;
  line-height: 1.25;
}

.form-section-mobile {
  margin-bottom: 3rem;
  gap: 1rem;
}

.inline-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.inline-form-wrapper {
  flex-shrink: 0;
}

.success-msg,
.error-msg {
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.75rem;
}

.success-msg {
  color: rgb(21, 128, 61);
}

.error-msg {
  color: rgb(185, 28, 28);
}
