/* static/css/components/images.css */
/* Image styling and utilities */

/* Base image styles */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Square aspect ratio */
.img-square {
  aspect-ratio: 1/1;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

/* Circle images */
.img-circle {
  border-radius: 50%;
  object-fit: cover;
  aspect-ratio: 1/1;
}

/* Thumbnail sizes */
.img-xs {
  width: 40px;
  height: 40px;
}

.img-sm {
  width: 60px;
  height: 60px;
}

.img-md {
  width: 80px;
  height: 80px;
}

.img-lg {
  width: 120px;
  height: 120px;
}

.img-xl {
  width: 180px;
  height: 180px;
}

/* Images with borders */
.img-border {
  border: 2px solid var(--bg-medium);
  padding: 3px;
}

.img-border-primary {
  border-color: var(--primary);
}

.img-border-accent {
  border-color: var(--accent);
}

/* Image with shadow */
.img-shadow {
  box-shadow: var(--shadow-sm);
}

.img-shadow-md {
  box-shadow: var(--shadow-md);
}

/* Image alignment */
.img-center {
  margin-left: auto;
  margin-right: auto;
}

.img-left {
  margin-right: auto;
}

.img-right {
  margin-left: auto;
}

/* Image hover effects */
.img-hover-zoom {
  overflow: hidden;
}

.img-hover-zoom img {
  transition: transform var(--transition-normal);
}

.img-hover-zoom:hover img {
  transform: scale(1.05);
}

/* Float images */
.img-float-left {
  float: left;
  margin-right: var(--space-md);
  margin-bottom: var(--space-sm);
}

.img-float-right {
  float: right;
  margin-left: var(--space-md);
  margin-bottom: var(--space-sm);
}

/* Responsive image handling */
.img-responsive {
  width: 100%;
  height: auto;
}

/* Background images */
.bg-img {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.bg-img-fixed {
  background-attachment: fixed;
}

/* Image containers */
.img-container {
  position: relative;
  overflow: hidden;
}

/* Image with captions */
.img-caption {
  position: relative;
}

.img-caption figcaption {
  margin-top: var(--space-xs);
  font-size: 0.9rem;
  color: var(--text-medium);
  text-align: center;
}

/* Image overlay */
.img-overlay {
  position: relative;
}

.img-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  transition: background-color var(--transition-normal);
}

.img-overlay:hover::after {
  background-color: rgba(0, 0, 0, 0.1);
}

/* Gallery grid */
.img-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-sm);
}

/* Profile avatars with proper sizing */
.avatar {
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--bg-white);
}

.avatar-xs {
  width: 30px;
  height: 30px;
}

.avatar-sm {
  width: 50px;
  height: 50px;
}

.avatar-md {
  width: 80px;
  height: 80px;
}

.avatar-lg {
  width: 120px;
  height: 120px;
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .img-float-left,
  .img-float-right {
    float: none;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--space-md);
    display: block;
  }
}