/*
 * Accessible Image styles.
 *
 * Shared by the AccessibleImage XBlock and the floating-image HTML snippet.
 * Loaded globally via the comprehensive theme so it is available in both
 * LMS and CMS, and in HTML components that use the snippet.
 *
 * Scope: all selectors are prefixed with .uw-accessible-image to avoid
 * conflicts with other XBlocks and Open edX core styles.
 */

.uw-accessible-image {
  font-size: smaller;
  width: 600px;
  margin: auto;
}

.uw-accessible-image img {
  margin: auto;
  display: block;
  width: 100%;
  margin-bottom: 5px;
}

.uw-accessible-image__caption {
  display: inline-block;
  width: 90%;
}

.uw-accessible-image__details {
  display: inline;
}

.uw-accessible-image__summary {
  float: right;
  display: inline-block;
  background: black;
  color: white;
  padding: 4px;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
}

.uw-accessible-image__description {
  border: 0.5px solid #808080;
  background: #f0f0f0;
  margin-top: 1em;
  padding: 5px;
}

.uw-accessible-image__credit {
  margin-top: 0.5em;
  font-style: italic;
}

/* Float modifiers for inline/floating images */
.uw-accessible-image--float-right {
  float: right;
  width: 250px;
  padding-left: 10px;
  margin: 0 0 1em 1em;
}

.uw-accessible-image--float-left {
  float: left;
  width: 250px;
  padding-right: 10px;
  margin: 0 1em 1em 0;
}

.uw-accessible-image--float-right img,
.uw-accessible-image--float-left img {
  width: 100%;
}
