/**
 * @file
 * Base element styles for Invertir Pro theme.
 */

/* ========================================
 * GLOBAL STYLES
 * ======================================== */

html {
  font-size: 16px;
}

body {
  background-color: var(--color-white);
  overflow-x: hidden;
}

/* Body class when nav is open */
body.nav-open {
  overflow: hidden;
}

/* ========================================
 * SELECTION
 * ======================================== */

::selection {
  background-color: var(--color-peach);
  color: var(--color-text-primary);
}

::-moz-selection {
  background-color: var(--color-peach);
  color: var(--color-text-primary);
}

/* ========================================
 * FOCUS STYLES
 * ======================================== */

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--color-black);
  outline-offset: 2px;
}

/* ========================================
 * IMAGES
 * ======================================== */

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

figure {
  margin: 0;
}

figcaption {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}

/* ========================================
 * TABLES
 * ======================================== */

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-lg);
}

th, td {
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

th {
  font-weight: var(--font-weight-semibold);
  background-color: var(--color-bg-gray);
}

tr:hover {
  background-color: var(--color-bg-light);
}

/* ========================================
 * ADDRESSES
 * ======================================== */

address {
  font-style: normal;
  margin-bottom: var(--space-md);
}

/* ========================================
 * ABBR
 * ======================================== */

abbr[title] {
  text-decoration: underline dotted;
  cursor: help;
  border-bottom: none;
}

/* ========================================
 * MARK
 * ======================================== */

mark {
  background-color: var(--color-peach-light);
  padding: var(--space-3xs) var(--space-2xs);
}

/* ========================================
 * DRUPAL ADMIN ELEMENTS
 * ======================================== */

/* Contextual links */
.contextual {
  position: absolute;
  top: var(--space-xs);
  right: var(--space-xs);
  z-index: var(--z-dropdown);
}

/* ========================================
 * UTILITY CLASSES
 * ======================================== */

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.container-narrow {
  max-width: var(--container-narrow);
}

.container-wide {
  max-width: var(--container-wide);
}

.container-fluid {
  max-width: none;
}

/* Spacing utilities */
.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

.py-sm { padding-top: var(--space-sm); padding-bottom: var(--space-sm); }
.py-md { padding-top: var(--space-md); padding-bottom: var(--space-md); }
.py-lg { padding-top: var(--space-lg); padding-bottom: var(--space-lg); }
.py-xl { padding-top: var(--space-xl); padding-bottom: var(--space-xl); }
.py-2xl { padding-top: var(--space-2xl); padding-bottom: var(--space-2xl); }
.py-3xl { padding-top: var(--space-3xl); padding-bottom: var(--space-3xl); }

.px-sm { padding-left: var(--space-sm); padding-right: var(--space-sm); }
.px-md { padding-left: var(--space-md); padding-right: var(--space-md); }
.px-lg { padding-left: var(--space-lg); padding-right: var(--space-lg); }

/* Background utilities */
.bg-white { background-color: var(--color-white); }
.bg-light { background-color: var(--color-bg-light); }
.bg-gray { background-color: var(--color-bg-gray); }
.bg-cream { background-color: var(--color-bg-cream); }
.bg-peach { background-color: var(--color-peach); }
.bg-peach-light { background-color: var(--color-peach-light); }
.bg-black { background-color: var(--color-black); }

/* Border utilities */
.border { border: 1px solid var(--color-border); }
.border-top { border-top: 1px solid var(--color-border); }
.border-bottom { border-bottom: 1px solid var(--color-border); }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }

/* Shadow utilities */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* Display utilities */
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* Flexbox utilities */
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* Position utilities */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

/* Width utilities */
.w-full { width: 100%; }
.w-auto { width: auto; }

/* Aspect ratios */
.aspect-video { aspect-ratio: 16 / 9; }
.aspect-square { aspect-ratio: 1 / 1; }
.aspect-4-3 { aspect-ratio: 4 / 3; }

/* Object fit */
.object-cover {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.object-contain {
  object-fit: contain;
  width: 100%;
  height: 100%;
}

/* ========================================
 * ANIMATIONS
 * ======================================== */

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

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

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

.animate-fade-in {
  animation: fadeIn 0.5s var(--ease-out-expo) forwards;
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s var(--ease-out-expo) forwards;
}

/* Stagger delays */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

/* Helper paragraph for the StringRange views filter. */
p.min {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

span.Propietario.Recibe.Oferta {
  font-weight: bold;
}
