@import "tailwindcss";

@theme {
  --font-size: 14px;
  --background: #ffffff;
  --foreground: oklch(0.145 0 0);
  --card: #ffffff;
  --card-foreground: oklch(0.145 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.145 0 0);
  --primary: #030213;
  --primary-foreground: oklch(1 0 0);
  --secondary: oklch(0.95 0.0058 264.53);
  --secondary-foreground: #030213;
  --muted: #ececf0;
  --muted-foreground: #717182;
  --accent: #e9ebef;
  --accent-foreground: #030213;
  --destructive: #d4183d;
  --destructive-foreground: #ffffff;
  --border: rgba(0, 0, 0, 0.1);
  --input: transparent;
  --input-background: #f3f3f5;
  --switch-background: #cbced4;
  --ring: oklch(0.708 0 0);
  --chart-1: oklch(0.646 0.222 41.116);
  --chart-2: oklch(0.6 0.118 184.704);
  --chart-3: oklch(0.398 0.07 227.392);
  --chart-4: oklch(0.828 0.189 84.429);
  --chart-5: oklch(0.769 0.188 70.08);
  --radius: 0.625rem;
  --sidebar: oklch(0.985 0 0);
  --sidebar-foreground: oklch(0.145 0 0);
  --sidebar-primary: #030213;
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.97 0 0);
  --sidebar-accent-foreground: oklch(0.205 0 0);
  --sidebar-border: oklch(0.922 0 0);
  --sidebar-ring: oklch(0.708 0 0);
  
  /* Brand colors - official platform colors */
  --slack-purple: #4A154B;
  --slack-green: #00D924;
  --teams-purple: #6264A7;
  --enterprise-primary: #334155;
  --enterprise-secondary: #64748b;

  /* Dark theme overrides */
  &.dark {
    --background: oklch(0.145 0 0);
    --foreground: oklch(0.985 0 0);
    --card: oklch(0.145 0 0);
    --card-foreground: oklch(0.985 0 0);
    --popover: oklch(0.145 0 0);
    --popover-foreground: oklch(0.985 0 0);
    --primary: oklch(0.985 0 0);
    --primary-foreground: oklch(0.205 0 0);
    --secondary: oklch(0.269 0 0);
    --secondary-foreground: oklch(0.985 0 0);
    --muted: oklch(0.269 0 0);
    --muted-foreground: oklch(0.708 0 0);
    --accent: oklch(0.269 0 0);
    --accent-foreground: oklch(0.985 0 0);
    --destructive: oklch(0.396 0.141 25.723);
    --destructive-foreground: oklch(0.637 0.237 25.331);
    --border: oklch(0.269 0 0);
    --input: oklch(0.269 0 0);
    --ring: oklch(0.439 0 0);
    --chart-1: oklch(0.488 0.243 264.376);
    --chart-2: oklch(0.696 0.17 162.48);
    --chart-3: oklch(0.769 0.188 70.08);
    --chart-4: oklch(0.627 0.265 303.9);
    --chart-5: oklch(0.645 0.246 16.439);
    --sidebar: oklch(0.205 0 0);
    --sidebar-foreground: oklch(0.985 0 0);
    --sidebar-primary: oklch(0.488 0.243 264.376);
    --sidebar-primary-foreground: oklch(0.985 0 0);
    --sidebar-accent: oklch(0.269 0 0);
    --sidebar-accent-foreground: oklch(0.985 0 0);
    --sidebar-border: oklch(0.269 0 0);
    --sidebar-ring: oklch(0.439 0 0);
  }
}

/* Base styles */
* {
  border-style: solid;
  border-color: rgb(231 229 228);
  outline-width: 2px;
  outline-offset: 2px;
  outline-color: rgb(120 113 108 / 0.5);
}

body {
  background-color: white;
  color: rgb(15 23 42);
  font-size: var(--font-size);
  font-family: system-ui, -apple-system, sans-serif;
}

/* Typography */
h1 {
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 500;
  line-height: 1.25;
}

h2 {
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 500;
  line-height: 1.25;
}

h3 {
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 500;
  line-height: 1.25;
}

h4 {
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 500;
  line-height: 1.25;
}

p {
  font-size: 1rem;
  line-height: 1.5rem;
  line-height: 1.625;
}

label {
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 500;
  line-height: 1.25;
}

button {
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 500;
  line-height: 1.25;
}

input {
  font-size: 1rem;
  line-height: 1.5rem;
  line-height: 1.25;
}

/* 3D perspective effects - enhanced for colorful books, subtle for enterprise elements */
.perspective-1000 {
  perspective: 1000px;
}

.rotateY-6 {
  transform: rotateY(6deg);
}

.hover\:rotateY-6:hover {
  transform: rotateY(6deg);
}

.rotateY-12 {
  transform: rotateY(12deg);
}

.hover\:rotateY-12:hover {
  transform: rotateY(12deg);
}

/* Professional book-like shadow effects for enterprise cards */
.book-shadow {
  box-shadow: 
    6px 6px 12px rgba(0,0,0,0.15),
    inset -1px 0 4px rgba(0,0,0,0.1),
    1px 0 2px rgba(0,0,0,0.05);
}

/* Enhanced shadow effects for colorful book slider */
.book-shadow-enhanced {
  box-shadow: 
    8px 8px 16px rgba(0,0,0,0.3),
    inset -2px 0 8px rgba(0,0,0,0.2),
    2px 0 4px rgba(0,0,0,0.1);
}

/* Enterprise button styles */
.enterprise-btn-primary {
  background-color: rgb(30 41 59);
  color: white;
  border: none;
}

.enterprise-btn-primary:hover {
  background-color: rgb(15 23 42);
}

.enterprise-btn-secondary {
  background-color: rgb(243 244 246);
  color: rgb(31 41 55);
  border: 1px solid rgb(209 213 219);
}

.enterprise-btn-secondary:hover {
  background-color: rgb(229 231 235);
}

/* Smooth transitions for interactive elements */
.transition-all {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* MicroModal styles */
.modal {
  display: none;
}

.modal.is-open {
  display: block;
}

.modal__overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 1rem;
}

.modal__container {
  background-color: white;
  border-radius: 8px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgb(229 231 235);
}

.modal__title {
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 600;
  color: rgb(17 24 39);
  margin: 0;
}

.modal__close {
  color: rgb(156 163 175);
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  padding: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.modal__close:hover {
  background-color: rgb(243 244 246);
  color: rgb(75 85 99);
}

.modal__close:focus {
  outline: 2px solid rgb(59 130 246);
  outline-offset: 2px;
}

.modal__content {
  padding: 1.5rem 2rem;
}

/* Mobile responsive modal adjustments */
@media (max-width: 640px) {
  .modal__overlay {
    padding: 1rem 0.75rem;
  }
  
  .modal__container {
    max-width: calc(100vw - 1.5rem);
  }
  
  .modal__header {
    padding: 0.75rem 1rem;
  }
  
  .modal__content {
    padding: 1.25rem 1.25rem;
  }
  
  .modal__title {
    font-size: 1.125rem;
    line-height: 1.75rem;
  }
  
  .modal__close {
    width: 28px;
    height: 28px;
    padding: 6px;
  }
}

/* Animation classes */
.micromodal-slide {
  display: none;
}

.micromodal-slide.is-open {
  display: block;
}

.micromodal-slide .modal__overlay {
  animation: mmfadeIn 0.3s cubic-bezier(0.0, 0.0, 0.2, 1);
}

.micromodal-slide .modal__container {
  animation: mmslideIn 0.3s cubic-bezier(0, 0, 0.2, 1);
}

.micromodal-slide.is-opening .modal__overlay {
  animation: mmfadeIn 0.3s cubic-bezier(0.0, 0.0, 0.2, 1);
}

.micromodal-slide.is-opening .modal__container {
  animation: mmslideIn 0.3s cubic-bezier(0, 0, 0.2, 1);
}

.micromodal-slide.is-closing .modal__overlay {
  animation: mmfadeOut 0.3s cubic-bezier(0.0, 0.0, 0.2, 1);
}

.micromodal-slide.is-closing .modal__container {
  animation: mmslideOut 0.3s cubic-bezier(0, 0, 0.2, 1);
}

@keyframes mmfadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes mmfadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes mmslideIn {
  from { transform: translateY(15%); }
  to { transform: translateY(0); }
}

@keyframes mmslideOut {
  from { transform: translateY(0); }
  to { transform: translateY(-10%); }
}

/* Swiper customizations */
.bookSwiper {
  padding: 60px 0 20px 0;
  position: relative;
}

.bookSwiper .swiper-button-next,
.bookSwiper .swiper-button-prev {
  color: rgb(75 85 99);
  width: 44px;
  height: 44px;
  margin-top: -22px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  z-index: 10;
}

.bookSwiper .swiper-button-next:hover,
.bookSwiper .swiper-button-prev:hover {
  color: rgb(31 41 55);
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: scale(1.05);
}

.bookSwiper .swiper-button-next::after,
.bookSwiper .swiper-button-prev::after {
  font-size: 18px;
  font-weight: 600;
}

.bookSwiper .swiper-pagination {
  position: static !important;
  margin-top: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.bookSwiper .swiper-pagination-bullet {
  background-color: rgb(156 163 175);
  width: 8px;
  height: 8px;
  opacity: 0.5;
  margin: 0 4px !important;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.bookSwiper .swiper-pagination-bullet-active {
  background-color: rgb(37 99 235);
  opacity: 1;
  transform: scale(1.2);
}

.bookSwiper .swiper-slide {
  height: auto;
  display: flex;
  align-items: stretch;
}

/* Mobile responsive adjustments for Swiper navigation */
@media (max-width: 640px) {
  .bookSwiper {
    padding: 20px 0;
  }
  
  .bookSwiper .swiper-button-next,
  .bookSwiper .swiper-button-prev {
    width: 36px;
    height: 36px;
    margin-top: -18px;
    top: 45%;
  }
  
  .bookSwiper .swiper-button-prev {
    left: 8px;
  }
  
  .bookSwiper .swiper-button-next {
    right: 8px;
  }
  
  .bookSwiper .swiper-button-next::after,
  .bookSwiper .swiper-button-prev::after {
    font-size: 14px;
  }
  
  .bookSwiper .swiper-pagination {
    margin-top: 16px;
  }
  
  .bookSwiper .swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    margin: 0 3px !important;
  }
}

/* Tablet adjustments */
@media (min-width: 641px) and (max-width: 1024px) {
  .bookSwiper .swiper-button-prev {
    left: 16px;
  }
  
  .bookSwiper .swiper-button-next {
    right: 16px;
  }
}