/*
  Pharmagateway UI Refresh (non-breaking)
  -------------------------------------
  Load AFTER existing theme/vendor CSS.
  Goal: modernize look-and-feel without rewriting all views.
*/

:root {
  --pg-text: #111827;
  --pg-muted: #6b7280;
  --pg-surface: #ffffff;
  --pg-surface-2: #f9fafb;
  --pg-border: #e5e7eb;
  --pg-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  --pg-radius: 14px;
  --pg-primary: #2563eb;
  --pg-primary-2: #1d4ed8;
  --pg-success: #16a34a;
  --pg-danger: #dc2626;
}

html, body {
  color: var(--pg-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle page background */
body {
  background: var(--pg-surface-2);
}

/* Make the main wrapper feel less cramped */
.site-wrap {
  min-height: 100vh;
}

/* Header polish */
header.site-navbar {
  backdrop-filter: saturate(140%) blur(6px);
  background: rgba(255, 255, 255, 0.92) !important;
  border-bottom: 1px solid var(--pg-border);
}

.site-navbar .site-logo img {
  max-width: 240px;
  height: auto;
}

.site-navbar .site-menu .nav-link {
  font-weight: 600;
  color: var(--pg-text) !important;
}

.site-navbar .site-menu .nav-link:hover {
  color: var(--pg-primary) !important;
}

/* Banner title spacing (where used) */
.intro-section,
.site-section {
  padding-top: 80px;
}

/* Dashboard tiles / cards */
.docs-inner {
  background: var(--pg-surface);
  border: 1px solid var(--pg-border);
  border-radius: var(--pg-radius);
  box-shadow: var(--pg-shadow);
  padding: 16px;
}

.docs-inner .title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.docs-inner ul {
  padding-left: 18px;
  margin-bottom: 0;
}

/* Buttons (keep compatible with existing .btn usage) */
.btn,
button,
input[type="submit"],
input[type="button"] {
  border-radius: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
}

.btn.btn-cta-secondary,
.btn-primary {
  background: var(--pg-primary) !important;
  border-color: var(--pg-primary) !important;
}

.btn.btn-cta-secondary:hover,
.btn-primary:hover {
  background: var(--pg-primary-2) !important;
  border-color: var(--pg-primary-2) !important;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
select,
textarea {
  border-radius: 10px !important;
  border: 1px solid var(--pg-border) !important;
  padding: 10px 12px !important;
  background: #fff !important;
}

/* Tables: soften legacy global table rules from my.css */
table {
  background: var(--pg-surface);
  border: 1px solid var(--pg-border);
  border-radius: var(--pg-radius);
  overflow: hidden;
}

table th {
  background: #f3f4f6;
  border-bottom: 1px solid var(--pg-border);
  font-weight: 800;
}

table tr td {
  border-bottom: 1px solid var(--pg-border);
}

/* Flash messages: make them feel like modern alerts */
.message,
.success,
.cake-error,
.notice,
p.error,
.error-message {
  border-radius: 12px !important;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

/* WhatsApp button: ensure icon renders and spacing is consistent */
.whatsapp-floating-button {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.whatsapp-floating-button a {
  font-weight: 800;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
