/* CSS Variables */
:root {
  --color-primary: #2c0a71;
  --color-secondary: #c69638;
}

/* ==================== */
/* Global Glass Patterns */
/* ==================== */
body {
  font-family: "Noto Sans Arabic", sans-serif;
}

/* Animated background */
.bg-glass-pattern {
  background: linear-gradient(
    135deg,
    rgba(44, 10, 113, 0.02) 0%,
    rgba(198, 150, 56, 0.02) 100%
  );
  position: relative;
}

/* Animation Delays */
.animation-delay-2000 {
  animation-delay: 2s;
}

/* ==================== */
/* Liquid Glass Modal Styles */
/* ==================== */

.liquid-glass-modal-white {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(198, 150, 56, 0.2);
  border-radius: 24px;
  box-shadow:
    0 25px 50px -12px rgba(44, 10, 113, 0.25),
    inset 0 1px 1px rgba(255, 255, 255, 0.8),
    inset 0 -1px 1px rgba(44, 10, 113, 0.1);
  position: relative;
  overflow: hidden;
}

.liquid-glass-modal-white::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(198, 150, 56, 0.1),
    rgba(198, 150, 56, 0.2),
    rgba(198, 150, 56, 0.1),
    transparent
  );
  transform: skewX(-15deg);
  animation: shine-white 8s infinite;
  pointer-events: none;
}

@keyframes shine-white {
  0% {
    left: -100%;
  }

  20% {
    left: 100%;
  }

  100% {
    left: 100%;
  }
}

/* Custom Scrollbar for Modal */
.liquid-glass-modal-white ::-webkit-scrollbar {
  width: 6px;
}

.liquid-glass-modal-white ::-webkit-scrollbar-track {
  background: rgba(44, 10, 113, 0.05);
  border-radius: 10px;
}

.liquid-glass-modal-white ::-webkit-scrollbar-thumb {
  background: rgba(198, 150, 56, 0.3);
  border-radius: 10px;
}

.liquid-glass-modal-white ::-webkit-scrollbar-thumb:hover {
  background: rgba(198, 150, 56, 0.5);
}

/* ==================== */
/* Glass Input Fields */
/* ==================== */

.glass-input-modal-white {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(44, 10, 113, 0.2);
  border-radius: 1rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.glass-input-modal-white:hover {
  border-color: rgba(198, 150, 56, 0.5);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 20px rgba(198, 150, 56, 0.1);
}

.glass-input-modal-white:focus-within {
  border-color: var(--color-secondary);
  background: white;
  box-shadow: 0 0 30px rgba(198, 150, 56, 0.15);
}

/* Glass Input (General) */
.glass-input {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(44, 10, 113, 0.15);
  border-radius: 14px;
  transition: all 0.3s ease;
}

.glass-input:focus-within {
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 4px rgba(198, 150, 56, 0.1);
  background: white;
}

/* Glass Select */
.glass-select-modal-white {
  background: transparent;
  color: #2c0a71;
}

.glass-select-modal-white option {
  background: white;
  color: #2c0a71;
  padding: 10px;
}

/* ==================== */
/* Glass Checkbox */
/* ==================== */

.glass-checkbox-modal-white {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(44, 10, 113, 0.15);
  border-radius: 1rem;
  transition: all 0.3s ease;
}

.glass-checkbox-modal-white:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(198, 150, 56, 0.4);
}

.glass-checkbox-input-white {
  appearance: none;
  width: 1.2rem;
  height: 1.2rem;
  background: white;
  border: 2px solid rgba(44, 10, 113, 0.3);
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.glass-checkbox-input-white:checked {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
}

.glass-checkbox-input-white:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 0.8rem;
  font-weight: bold;
}

.glass-checkbox-input-white:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(198, 150, 56, 0.2);
}

/* ==================== */
/* Glass Buttons */
/* ==================== */

/* Primary Button */
.glass-button-primary-white,
.glass-button-primary {
  background: linear-gradient(135deg, #2c0a71, #1a0642);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(198, 150, 56, 0.4);
  border-radius: 40px;
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  flex: 1;
}

.glass-button-primary-white::before,
.glass-button-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.glass-button-primary-white:hover,
.glass-button-primary:hover {
  background: linear-gradient(135deg, #3a0e91, #2c0a71);
  border-color: var(--color-secondary);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(44, 10, 113, 0.4);
}

.glass-button-primary-white:hover::before,
.glass-button-primary:hover::before {
  left: 100%;
}

/* Secondary Button */
.glass-button-secondary-white {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(44, 10, 113, 0.2);
  border-radius: 40px;
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.3s ease;
  flex: 1;
}

.glass-button-secondary-white:hover {
  background: white;
  border-color: var(--color-secondary);
  color: var(--color-secondary);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(44, 10, 113, 0.2);
}

/* Outline Button */
.glass-button-outline {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(44, 10, 113, 0.15);
  border-radius: 40px;
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.3s ease;
  flex: 1;
}

.glass-button-outline:hover {
  background: white;
  border-color: var(--color-secondary);
  color: var(--color-secondary);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -5px rgba(44, 10, 113, 0.2);
}

.glass-button-outline.delete:hover {
  border-color: #ef4444;
  color: #ef4444;
}
.red-bg {
  background: #ef4444;
  color: #fff;
}

.orange-bg{
    background-color: var(--color-secondary);
    color: #fff;
}

/* Navigation Button */
.glass-nav-button-white {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(44, 10, 113, 0.15);
  border-radius: 12px;
  padding: 8px;
  transition: all 0.3s ease;
}

.glass-nav-button-white:hover {
  background: white;
  border-color: rgba(198, 150, 56, 0.4);
  transform: scale(1.05);
}

/* Modal Button */
.glass-button-modal-white {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(44, 10, 113, 0.2);
  border-radius: 12px;
  padding: 8px;
  transition: all 0.3s ease;
}

.glass-button-modal-white:hover {
  background: white;
  border-color: var(--color-secondary);
  transform: scale(1.1);
}

/* ==================== */
/* Glass Image Section */
/* ==================== */

.glass-image-section-white {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(44, 10, 113, 0.15);
  border-radius: 1.5rem;
  padding: 1rem;
}

.glass-image-frame-white {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
  border-radius: 1rem;
  overflow: hidden;
}

/* ==================== */
/* Liquid Glass Card */
/* ==================== */

.liquid-glass-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(44, 10, 113, 0.1);
  border-radius: 24px;
  box-shadow: 0 20px 40px -15px rgba(44, 10, 113, 0.2);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.liquid-glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 50px -20px rgba(44, 10, 113, 0.3);
  border-color: rgba(198, 150, 56, 0.3);
}

.liquid-glass-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(198, 150, 56, 0.08),
    rgba(198, 150, 56, 0.15),
    rgba(198, 150, 56, 0.08),
    transparent
  );
  transform: skewX(-15deg);
  transition: left 0.7s ease;
  pointer-events: none;
}

.liquid-glass-card:hover::before {
  left: 100%;
}

/* ==================== */
/* Property Card - 2 Column Layout */
/* ==================== */

.property-card {
  background: white;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 10px 30px -10px rgba(44, 10, 113, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(44, 10, 113, 0.08);
  position: relative;
  display: flex;
  flex-direction: row;
  height: 100%;
  min-height: 240px;
}

.property-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 25px 40px -15px rgba(44, 10, 113, 0.25);
  border-color: rgba(198, 150, 56, 0.3);
}

/* Left Column - Image */
.property-image-section {
  flex: 0 0 200px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
}

.property-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.property-card:hover .property-image {
  transform: scale(1.08);
}

/* Image Overlay Badges */
.image-badge {
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-radius: 40px;
  padding: 4px 12px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(44, 10, 113, 0.1);
  z-index: 2;
}

.badge-top-right {
  top: 12px;
  right: 12px;
}

.badge-bottom-left {
  bottom: 12px;
  left: 12px;
}

.badge-bottom-right {
  bottom: 12px;
  right: 12px;
}

/* ==================== */
/* Right Column - Details */
/* ==================== */

.property-details-section {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Header with ID and Type */
.property-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.property-id {
  background: rgba(44, 10, 113, 0.05);
  padding: 4px 12px;
  border-radius: 40px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.property-type {
  background: rgba(198, 150, 56, 0.1);
  padding: 4px 12px;
  border-radius: 40px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #a87c2e;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Status Badge */
.status-badge-section {
  margin-bottom: 15px;
}

.status-badge {
  padding: 6px 14px;
  border-radius: 40px;
  font-size: 0.7rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.status-active {
  background: rgba(34, 197, 94, 0.15);
  color: #166534;
  border-color: rgba(34, 197, 94, 0.3);
}

.status-reserved {
  background: rgba(234, 179, 8, 0.15);
  color: #854d0e;
  border-color: rgba(234, 179, 8, 0.3);
}

.status-sold {
  background: rgba(239, 68, 68, 0.15);
  color: #991b1b;
  border-color: rgba(239, 68, 68, 0.3);
}

.status-rented {
  background: rgba(59, 130, 246, 0.15);
  color: #1e40af;
  border-color: rgba(59, 130, 246, 0.3);
}

.status-negotiation {
  background: rgba(168, 85, 247, 0.15);
  color: #6b21a8;
  border-color: rgba(168, 85, 247, 0.3);
}

.status-archived {
  background: rgba(107, 114, 128, 0.15);
  color: #1f2937;
  border-color: rgba(107, 114, 128, 0.3);
}

/* Address */
.property-address {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 15px;
  background: rgba(44, 10, 113, 0.02);
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(44, 10, 113, 0.05);
}

.address-icon {
  color: var(--color-secondary);
  flex-shrink: 0;
}

.address-text {
  font-size: 0.85rem;
  color: var(--color-primary);
  line-height: 1.5;
}

/* Details Grid - 2x2 */
.details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 15px;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(44, 10, 113, 0.02);
  border-radius: 14px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.detail-item:hover {
  background: rgba(198, 150, 56, 0.05);
  border-color: rgba(198, 150, 56, 0.15);
  transform: translateX(-2px);
}

.detail-icon {
  width: 28px;
  height: 28px;
  background: rgba(44, 10, 113, 0.05);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  transition: all 0.3s ease;
}

.detail-item:hover .detail-icon {
  background: var(--color-secondary);
  color: white;
  transform: scale(1.05);
}

.detail-content {
  flex: 1;
}

.detail-label {
  font-size: 0.6rem;
  color: var(--color-primary);
  opacity: 0.5;
  margin-bottom: 2px;
}

.detail-value {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-primary);
  line-height: 1.2;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(44, 10, 113, 0.08);
}

/* ==================== */
/* Pagination */
/* ==================== */

.glass-pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 30px;
}

.pagination-item {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 40px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(44, 10, 113, 0.15);
  color: var(--color-primary);
  font-weight: 500;
  transition: all 0.3s ease;
}

.pagination-item:hover {
  background: white;
  border-color: var(--color-secondary);
  transform: translateY(-2px);
  box-shadow: 0 8px 15px -5px rgba(44, 10, 113, 0.2);
}

.pagination-item.active {
  background: var(--color-primary);
  border-color: var(--color-secondary);
  color: white;
  box-shadow: 0 10px 20px -5px rgba(44, 10, 113, 0.3);
}

/* ==================== */
/* RTL Support */
/* ==================== */

[dir="rtl"] .glass-input-modal-white,
[dir="rtl"] .glass-select-modal-white {
  text-align: right;
}

[dir="rtl"] .detail-item:hover {
  transform: translateX(2px);
}

/* ==================== */
/* Responsive Adjustments */
/* ==================== */

@media (max-width: 768px) {
  .property-card {
    flex-direction: column;
    min-height: auto;
  }

  .property-image-section {
    flex: 0 0 180px;
    width: 100%;
  }

  .details-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .liquid-glass-modal-white,
  .liquid-glass-card {
    border-radius: 1.5rem;
  }
}

@media (max-width: 480px) {
  .property-details-section {
    padding: 15px;
  }

  .action-buttons {
    flex-wrap: wrap;
  }

  .glass-button-primary,
  .glass-button-outline,
  .glass-button-primary-white,
  .glass-button-secondary-white {
    flex: 1 1 calc(50% - 4px);
    font-size: 0.7rem;
    padding: 6px 8px;
  }
}

/* Glass Sidebar Styles */
.glass-stat {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(44, 10, 113, 0.1);
  border-radius: 14px;
  padding: 8px 12px;
  transition: all 0.3s ease;
}

.glass-stat:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(198, 150, 56, 0.3);
}

.glass-footer {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(44, 10, 113, 0.1);
}

/* Icon Wrapper */
.icon-wrapper {
  width: 32px;
  height: 32px;
  background: rgba(44, 10, 113, 0.05);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2c0a71;
  transition: all 0.3s ease;
}

/* Menu Items */
.menu-item > a,
.parent-item {
  color: #2c0a71;
  position: relative;
  overflow: hidden;
}

.menu-item > a::before,
.parent-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(198, 150, 56, 0.1),
    transparent
  );
  transition: left 0.5s ease;
  pointer-events: none;
}

.menu-item > a:hover::before,
.parent-item:hover::before {
  left: 100%;
}

.menu-item > a:hover .icon-wrapper,
.parent-item:hover .icon-wrapper {
  background: rgba(198, 150, 56, 0.15);
  color: #c69638;
  transform: scale(1.05);
}

/* Active Menu Item */
.active-menu-item {
  background: linear-gradient(
    135deg,
    rgba(44, 10, 113, 0.05),
    rgba(198, 150, 56, 0.1)
  );
  border: 1px solid rgba(198, 150, 56, 0.2);
  box-shadow: 0 8px 20px -8px rgba(44, 10, 113, 0.15);
}

.active-menu-item .icon-wrapper {
  background: rgba(198, 150, 56, 0.2);
  color: #c69638;
}

/* Active Submenu Item */
.active-submenu-item {
  background: rgba(198, 150, 56, 0.1);
  border-right: 3px solid #c69638;
}

.active-submenu-item .w-1\.5 {
  background-color: #c69638 !important;
  transform: scale(1.2);
}

/* Submenu Items */
.submenu-item {
  color: #2c0a71;
  position: relative;
  overflow: hidden;
}

.submenu-item:hover {
  background: rgba(198, 150, 56, 0.08);
  transform: translateX(-4px);
}

.submenu-item:hover .w-1\.5 {
  transform: scale(1.5);
}

/* Submenu Animation */
.submenu {
  transition: max-height 0.3s ease-in-out;
  overflow: hidden;
}

.submenu.active {
  max-height: 200px;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(44, 10, 113, 0.05);
  border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(198, 150, 56, 0.3);
  border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(198, 150, 56, 0.5);
}

/* Arrow Rotation */
.submenu-arrow.rotate-180 {
  transform: rotate(180deg);
}

/* Sidebar Transition */
.sidebar-translation {
  transform: translateX(0);
}

/* collapsed desktop state uses width instead of translate to keep bar visible */
.sidebar-collapsed {
  transform: none;
}

/* overlay for mobile sliding sidebar */
#sidebarOverlay {
  transition: opacity 0.3s ease;
}

/* hide helper for overlay if no utility class exists */
#sidebarOverlay.hidden {
  display: none;
}

/* Responsive and sliding rules */
#sidebar {
  transition: right 0.3s ease;
  right: -100%;
}

/* showing sidebar (used on mobile and desktop) */
#sidebar.show {
  right: 0;
}

@media (max-width: 1024px) {
  #sidebar {
    position: fixed;
    right: -100%;
    top: 0;
  }

  /* when show on mobile brings it in */
  #sidebar.show {
    right: 0;
  }
}

/* Hover Effects */
.menu-item > a,
.parent-item {
  transition: all 0.3s ease;
}

.menu-item > a:active,
.parent-item:active {
  transform: scale(0.98);
}

/* Glass Morphism Effects */
.glass-panel {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Active Link Indicator Pulse */
@keyframes activePulse {
  0%,
  100% {
    opacity: 1;
    transform: scaleY(1);
  }

  50% {
    opacity: 0.7;
    transform: scaleY(0.8);
  }
}

.animate-pulse {
  animation: activePulse 2s ease-in-out infinite;
}
