/* Unsplash Image Component Styles */

.ihub-unsplash-container {
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.ihub-unsplash-container:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.ihub-unsplash-image-container {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
  transition: transform 0.5s ease;
}

.ihub-unsplash-image {
  transition: all 0.5s ease;
}

.ihub-unsplash-image-container:hover .ihub-unsplash-image {
  transform: scale(1.05);
}

.ihub-unsplash-loading {
  opacity: 0.7;
}

.ihub-unsplash-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 5;
  background-color: rgba(255, 255, 255, 0.8);
}

.ihub-unsplash-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0, 131, 143, 0.3);
  border-radius: 50%;
  border-top-color: var(--DarkCyan, #00838f);
  animation: ihub-spin 1s infinite linear;
}

@keyframes ihub-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.ihub-unsplash-error {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 5;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 20px;
  text-align: center;
}

.ihub-unsplash-error p {
  color: #ea5f5e;
  margin-bottom: 15px;
  font-weight: 500;
}

.ihub-unsplash-error button {
  padding: 8px 16px;
  background-color: var(--DarkCyan, #00838f);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.ihub-unsplash-error button:hover {
  background-color: var(--ViridianGreen, #009ba2);
}

.ihub-unsplash-error button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

.ihub-unsplash-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0) 60%
  );
  z-index: 1;
}

.ihub-unsplash-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  color: white;
  z-index: 2;
  transition: transform 0.3s ease;
}

.ihub-unsplash-image-container:hover .ihub-unsplash-info {
  transform: translateY(-5px);
}

.ihub-unsplash-description {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 10px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ihub-unsplash-metadata {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.ihub-unsplash-avatar {
  border-radius: 50%;
  margin-right: 8px;
  border: 2px solid white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.ihub-unsplash-user-info {
  margin-right: auto;
}

.ihub-unsplash-username {
  color: white;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  display: block;
}

.ihub-unsplash-username:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.ihub-unsplash-location {
  font-size: 12px;
  opacity: 0.9;
  display: block;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.ihub-unsplash-stats {
  display: flex;
  align-items: center;
  font-size: 12px;
  margin-left: 15px;
}

.ihub-unsplash-date {
  margin-right: 15px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.ihub-unsplash-likes {
  display: flex;
  align-items: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.ihub-unsplash-heart {
  color: #ea5f5e;
  margin-right: 4px;
  font-size: 14px;
}

.ihub-unsplash-actions {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ihub-unsplash-container:hover .ihub-unsplash-actions {
  opacity: 1;
}

.ihub-unsplash-refresh {
  background-color: rgba(255, 255, 255, 0.9);
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: var(--Gunmetal, #2c333a);
  transition: all 0.3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ihub-unsplash-refresh:hover {
  background-color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.ihub-unsplash-refresh:disabled {
  background-color: #e0e0e0;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .ihub-unsplash-description {
    font-size: 14px;
  }

  .ihub-unsplash-info {
    padding: 15px;
  }

  .ihub-unsplash-stats {
    margin-top: 10px;
    margin-left: 0;
    width: 100%;
  }

  .ihub-unsplash-actions {
    top: 10px;
    right: 10px;
  }
}

@media (max-width: 480px) {
  .ihub-unsplash-info {
    padding: 10px;
  }

  .ihub-unsplash-description {
    -webkit-line-clamp: 1;
  }

  .ihub-unsplash-avatar {
    width: 20px;
    height: 20px;
  }

  .ihub-unsplash-username,
  .ihub-unsplash-location,
  .ihub-unsplash-date,
  .ihub-unsplash-likes {
    font-size: 11px;
  }
}
