/* ==========================================================================
   shared.css — Common styles, reset, utilities, components
   ========================================================================== */

/* --- CSS Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

a {
  text-decoration: none;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.375rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

/* --- Container --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Utility Classes --- */
.text-center {
  text-align: center;
}

.text-amber {
  color: #F59E0B;
}

.text-green {
  color: #16A34A;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
  line-height: 1;
}

.btn-amber {
  background: #F59E0B;
  color: #000;
}

.btn-amber:hover {
  background: #D97706;
}

.btn-green {
  background: #16A34A;
  color: #fff;
}

.btn-green:hover {
  background: #15803D;
}

.btn-outline-amber {
  border: 2px solid #F59E0B;
  color: #F59E0B;
  background: transparent;
}

.btn-outline-amber:hover {
  background: #F59E0B;
  color: #000;
}

.btn-outline-green {
  border: 2px solid #16A34A;
  color: #16A34A;
  background: transparent;
}

.btn-outline-green:hover {
  background: #16A34A;
  color: #fff;
}

/* --- Badge --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
}

/* --- Toast Notifications --- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  z-index: 10000;
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  max-width: 400px;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-success {
  background: #16A34A;
}

.toast-error {
  background: #EF4444;
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: #1A1A1E;
  border: 1px solid #333;
  border-radius: 20px;
  padding: 40px;
  max-width: 520px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(20px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
}

/* --- Fade-in-up Animation --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive Breakpoints Reference:
   - Mobile:  max-width 480px
   - Tablet:  max-width 768px
   - Desktop: max-width 1024px
   - Wide:    max-width 1200px
   ========================================================================== */

/* ==========================================================================
   Cookie Consent Banner
   ========================================================================== */
.cookie-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  z-index: 10000;
  background: rgba(18, 18, 22, 0.96);
  color: #E8E6E3;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}

.cookie-banner.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px 22px;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.cookie-banner-text {
  flex: 1 1 320px;
  min-width: 260px;
  font-size: 13.5px;
  line-height: 1.55;
}

.cookie-banner-text strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
  color: #fff;
}

.cookie-banner-text p {
  margin: 0;
  color: #C9C7C2;
}

.cookie-banner-text a {
  color: #F59E0B;
  text-decoration: underline;
}

.cookie-banner-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.cookie-btn-decline {
  background: transparent;
  color: #E8E6E3;
  border-color: rgba(232, 230, 227, 0.35);
}

.cookie-btn-decline:hover {
  border-color: rgba(232, 230, 227, 0.7);
  background: rgba(255, 255, 255, 0.06);
}

.cookie-btn-accept {
  background: #F59E0B;
  color: #0A0A0B;
  border-color: #F59E0B;
}

.cookie-btn-accept:hover {
  background: #FBB13C;
  border-color: #FBB13C;
}

[data-theme="light"] .cookie-banner {
  background: rgba(255, 255, 255, 0.98);
  color: #1A1A2E;
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .cookie-banner-text strong {
  color: #0A0A0B;
}

[data-theme="light"] .cookie-banner-text p {
  color: #555;
}

[data-theme="light"] .cookie-btn-decline {
  color: #1A1A2E;
  border-color: rgba(26, 26, 46, 0.25);
}

[data-theme="light"] .cookie-btn-decline:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(26, 26, 46, 0.5);
}

@media (max-width: 600px) {
  .cookie-banner-inner {
    padding: 16px;
    gap: 14px;
  }
  .cookie-banner-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .cookie-btn {
    flex: 1 1 auto;
    text-align: center;
  }
}
