@import "tailwindcss";

/* Custom Theme - Tailwind CSS v4 */
@theme {
  --color-dan-beige: #fcfbf7;
  --color-dan-green: #8cc685;
  --color-dan-brown: #3e2b20;
  --color-dan-orange: #e86a34;
  --color-dan-red: #d64640;
  --color-dan-blue: #2d84c6;

  /* Custom font */
  --font-sans: "Cairo", sans-serif;
}

/* ==========================================
   Custom Styles (from landing.css)
   ========================================== */

/* intl-tel-input overrides */
.iti {
  width: 100%;
}
.iti__flag {
  background-image: url("https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.8/img/flags.png");
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .iti__flag {
    background-image: url("https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.8/img/flags@2x.png");
  }
}

/* Swiper Customize */
:root {
  --swiper-theme-color: #fff !important;
  --swiper-navigation-size: 20px;
}

/* Ensure Swiper fills container height - override JS-added styles */
.mySwiper {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

.mySwiper .swiper-wrapper {
  height: 100% !important;
}

.mySwiper .swiper-slide {
  height: 100% !important;
  width: 100% !important;
  /* Ensure fade effect works with proper transition */
  transition: opacity 1s ease-in-out !important;
}

@media (min-width: 768px) {
  :root {
    --swiper-navigation-size: 44px;
  }
}

.swiper-button-next,
.swiper-button-prev {
  color: white !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.swiper:hover .swiper-button-next,
.swiper:hover .swiper-button-prev {
  opacity: 1;
}

@media (max-width: 768px) {
  .swiper-button-next,
  .swiper-button-prev {
    opacity: 0.7;
  }
}

/* Custom body styles */
body {
  font-family: "Cairo", sans-serif;
  background-color: #fdfbf7;
}

/* Custom scrollbar for webkit */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: #d4a373;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #bf865b;
}

.iti--separate-dial-code .iti__selected-flag {
  border-radius: 50px 0 0 50px;
}

/* ==========================================
   Cursor Pointer for Interactive Elements
   ========================================== */
button,
a,
[role="button"],
input[type="submit"],
input[type="button"],
.cursor-pointer,
select {
  cursor: pointer;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
}

/* ==========================================
   Animations
   ========================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse-soft {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}

.animate-slide-in-right {
  animation: slideInRight 0.3s ease-out forwards;
}

.animate-pulse-soft {
  animation: pulse-soft 2s ease-in-out infinite;
}

/* Skeleton loading shimmer effect */
.animate-shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

/* ==========================================
   Enhanced Table Styles for Dashboard
   ========================================== */
.dashboard-table {
  border-collapse: separate;
  border-spacing: 0;
}

.dashboard-table thead th {
  position: sticky;
  top: 0;
  background: linear-gradient(to bottom, #f9fafb, #f3f4f6);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid #e5e7eb;
  transition: background-color 0.2s;
}

.dashboard-table thead th:hover {
  background: linear-gradient(to bottom, #f3f4f6, #e5e7eb);
}

.dashboard-table tbody tr {
  transition: all 0.2s ease;
  border-bottom: 1px solid #f3f4f6;
}

.dashboard-table tbody tr:hover {
  background-color: #f0fdfa;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.dashboard-table tbody tr:active {
  background-color: #e6f7f4;
}

.dashboard-table td {
  padding: 1rem;
  vertical-align: middle;
}

/* Status Badge Animations */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.status-badge:hover {
  transform: scale(1.05);
}

/* Card hover effects */
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

/* Button hover effects */
.btn-hover {
  transition: all 0.2s ease;
}

.btn-hover:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-hover:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Smooth transitions for interactive elements (excluding Swiper) */
button,
a,
input,
select,
textarea,
.card-hover,
.btn-hover,
.status-badge,
.dashboard-table tbody tr {
  transition-property:
    color, background-color, border-color, opacity, box-shadow, transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
