@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&family=Sora:wght@400;500;600;700;800&display=swap');

/**
 * FileStorage Studio - Stylesheet
 * Strict White Theme with 4px-5px Rounded Boxes
 * Default Font: Manrope (Body & UI) | Headings: Sora (H1, H2, H3)
 * All boxes, buttons, inputs, cards, and modals adhere to 4px-5px border-radius.
 */

:root {
  --radius: 5px;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --border-focus: #94a3b8;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --primary: #6141fb;
  --primary-hover: #502ee6;
  --primary-active: #4723d6;
  --primary-light: #f5f3ff;
  --primary-border: #ddd6fe;
  --success: #16a34a;
  --success-light: #dcfce7;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

/* Links */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease-in-out;
}

a:hover {
  color: var(--primary-hover);
}

.link {
  color: var(--primary);
  cursor: pointer;
  transition: color 0.15s ease-in-out;
}

.link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scrollbar-gutter: stable;
  overflow-y: scroll;
}

body, button, input, select, textarea {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
}

/* Headings H1, H2, H3: Sora */
h1, h2, h3, .font-heading, .font-sora {
  font-family: 'Sora', sans-serif !important;
  letter-spacing: -0.02em;
}

/* Hide scrollbar for Chrome, Safari, Opera and Firefox for horizontal tab tracks */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* 4px-5px Rounded Elements Everywhere */
.rounded-box,
.card,
.modal-content,
.alert,
.badge,
.btn,
.form-input,
.form-select,
.form-textarea,
.dropzone,
.preview-container,
.code-viewer,
.table-container {
  border-radius: 5px !important;
}

.rounded-box-sm,
.badge,
.btn-sm {
  border-radius: 4px !important;
}

/* General Layout Containers */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  text-decoration: none;
  line-height: 1.25rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(180deg, #7c4dff 0%, #6141fb 100%) !important;
  color: #ffffff !important;
  border-color: #6141fb !important;
  box-shadow: 0 2px 6px -1px rgba(97, 65, 251, 0.35) !important;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #6f3ff5 0%, #502ee6 100%) !important;
  border-color: #502ee6 !important;
  box-shadow: 0 4px 12px -2px rgba(97, 65, 251, 0.45) !important;
}

.btn-primary:active:not(:disabled) {
  background: #4723d6 !important;
  border-color: #4723d6 !important;
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
  background-color: #f5f3ff;
  border-color: #c4b5fd;
  color: var(--primary);
}

.btn-danger {
  background-color: var(--danger);
  color: #ffffff;
  border-color: var(--danger);
}

.btn-danger:hover:not(:disabled) {
  background-color: #b91c1c;
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover:not(:disabled) {
  background-color: #f5f3ff;
  color: var(--primary);
}

.btn-sm {
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* Form Inputs */
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--text-main);
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  outline: none;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(97, 65, 251, 0.18);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-content {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  background-color: #fafbfc;
}

/* Dropzone for Uploads */
.dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 5px;
  background: linear-gradient(135deg, #ffffff 0%, #faf8ff 45%, #f2f7ff 100%);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease-in-out;
  box-shadow: 0 1px 3px 0 rgba(97, 65, 251, 0.04);
}

.dropzone:hover,
.dropzone.active {
  border-color: var(--primary);
  background: linear-gradient(135deg, #f8f6ff 0%, #f1edff 50%, #ebf3fe 100%);
  box-shadow: 0 6px 20px -2px rgba(97, 65, 251, 0.14), 0 2px 6px -1px rgba(37, 99, 235, 0.08);
}

/* Subtle Gradient Card & Box Styles (Purples & Blues) */
.gradient-card-subtle {
  background: linear-gradient(135deg, #ffffff 0%, #faf8ff 50%, #f2f7ff 100%) !important;
  border-color: #e0e7ff !important;
}

.gradient-card-subtle:hover {
  background: linear-gradient(135deg, #ffffff 0%, #f6f3ff 50%, #ecf3fe 100%) !important;
  border-color: #c7d2fe !important;
}

.gradient-box-accent {
  background: linear-gradient(135deg, #faf8ff 0%, #f2f7fe 100%) !important;
  border: 1px solid #e0e7ff !important;
}

.gradient-box-dark {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f244a 100%) !important;
  border: 1px solid #3730a3 !important;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  transition: 0.2s;
  border-radius: 5px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 4px;
}

input:checked + .toggle-slider {
  background-color: var(--primary);
}

input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 4px;
}

.badge-primary {
  background-color: var(--primary-light);
  color: var(--primary);
}

.badge-success {
  background-color: var(--success-light);
  color: var(--success);
}

.badge-danger {
  background-color: var(--danger-light);
  color: var(--danger);
}

.badge-neutral {
  background-color: #f1f5f9;
  color: var(--text-muted);
}

/* Custom Table */
.table-container {
  border: 1px solid var(--border-color);
  border-radius: 5px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background-color: #ffffff;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.custom-table th {
  background-color: #f8fafc;
  padding: 0.6rem 0.5rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.custom-table td {
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

.custom-table tr:last-child td {
  border-bottom: none;
}

.custom-table tr:hover td {
  background-color: #f8fafc;
}

/* Code & Text Viewer */
.code-viewer {
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.8125rem;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre;
  color: #1e293b;
  max-height: 500px;
}

/* Lucide Icon alignment helper */
.lucide-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Brand Logo Icon styling matching electric purple/violet squircle with radiant glow */
.brand-logo-icon {
  background: linear-gradient(180deg, #7c4dff 0%, #6141fb 100%) !important;
  border-radius: 5px !important;
  box-shadow: 0 6px 16px -2px rgba(97, 65, 251, 0.42), 0 2px 6px -1px rgba(97, 65, 251, 0.28) !important;
  color: #ffffff !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.brand-logo-icon:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -2px rgba(97, 65, 251, 0.52), 0 3px 8px -1px rgba(97, 65, 251, 0.35) !important;
}

.brand-logo-icon.brand-logo-lg {
  border-radius: 5px !important;
  box-shadow: 0 8px 24px -2px rgba(97, 65, 251, 0.45), 0 3px 8px -1px rgba(97, 65, 251, 0.3) !important;
}

/* Brand Theme Color Overrides: Buttons, Links, Badges, Tabs and Mappings */
.text-sky-600 { color: #6141fb !important; }
.text-sky-700 { color: #502ee6 !important; }
.text-sky-500 { color: #7c4dff !important; }
.text-sky-400 { color: #9d7dfd !important; }
.bg-sky-600 { background-color: #6141fb !important; }
.bg-sky-700 { background-color: #502ee6 !important; }
.bg-sky-500 { background-color: #7c4dff !important; }
.bg-sky-50 { background-color: #f5f3ff !important; }
.bg-sky-100 { background-color: #ede9fe !important; }
.border-sky-600 { border-color: #6141fb !important; }
.border-sky-500 { border-color: #7c4dff !important; }
.border-sky-200 { border-color: #ddd6fe !important; }
.border-sky-100 { border-color: #ede9fe !important; }
.border-sky-400 { border-color: #c4b5fd !important; }
.hover\:text-sky-600:hover { color: #6141fb !important; }
.hover\:text-sky-700:hover { color: #502ee6 !important; }
.hover\:bg-sky-100:hover { background-color: #ede9fe !important; }
.hover\:border-sky-400:hover { border-color: #a78bfa !important; }
.hover\:border-sky-500:hover { border-color: #6141fb !important; }
.group:hover .group-hover\:text-sky-600 { color: #6141fb !important; }
.group:hover .group-hover\:text-sky-700 { color: #502ee6 !important; }
.group:hover .group-hover\:bg-sky-600 { background-color: #6141fb !important; }
.group:hover .group-hover\:bg-sky-100 { background-color: #ede9fe !important; }

/* Exact Purple Brand Utility Mappings */
.text-purple-600 { color: #6141fb !important; }
.text-purple-700 { color: #502ee6 !important; }
.text-purple-500 { color: #7c4dff !important; }
.text-purple-400 { color: #9d7dfd !important; }
.bg-purple-600 { background-color: #6141fb !important; }
.bg-purple-700 { background-color: #502ee6 !important; }
.bg-purple-500 { background-color: #7c4dff !important; }
.bg-purple-50 { background-color: #f5f3ff !important; }
.bg-purple-100 { background-color: #ede9fe !important; }
.border-purple-600 { border-color: #6141fb !important; }
.border-purple-500 { border-color: #7c4dff !important; }
.border-purple-400 { border-color: #c4b5fd !important; }
.border-purple-200 { border-color: #ddd6fe !important; }
.border-purple-100 { border-color: #ede9fe !important; }
.hover\:text-purple-600:hover { color: #6141fb !important; }
.hover\:text-purple-700:hover { color: #502ee6 !important; }
.hover\:border-purple-400:hover { border-color: #a78bfa !important; }
.hover\:border-purple-500:hover { border-color: #6141fb !important; }
.group:hover .group-hover\:text-purple-600 { color: #6141fb !important; }
.group:hover .group-hover\:text-purple-700 { color: #502ee6 !important; }
.group:hover .group-hover\:bg-purple-600 { background-color: #6141fb !important; }
.group:hover .group-hover\:bg-purple-100 { background-color: #ede9fe !important; }

/* Google reCAPTCHA v3 Badge Positioning & Styling */
.grecaptcha-badge {
  z-index: 40 !important;
  bottom: 14px !important;
  border-radius: 5px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
  transition: opacity 0.2s ease, transform 0.2s ease !important;
}

/* Realistic Heartbeat Pulse Animation */
@keyframes heartbeat {
  0% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.35);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.35);
  }
  70% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}

.animate-heartbeat {
  animation: heartbeat 1.25s infinite ease-in-out;
  transform-origin: center;
  display: inline-block;
  opacity: 1 !important;
}
