/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

%include ../../shared/downloads/allDownloadsViewOverlay.inc.css

/*** List items ***/

:root {
  --downloads-item-height: 6em;
}

/*** Button icons ***/

.downloadButton.downloadIconCancel {
  -moz-image-region: rect(0px, 16px, 16px, 0px);
}
@item@:hover .downloadButton.downloadIconCancel {
  -moz-image-region: rect(0px, 32px, 16px, 16px);
}
@item@:hover .downloadButton.downloadIconCancel:hover {
  -moz-image-region: rect(0px, 48px, 16px, 32px);
}
@item@:hover .downloadButton.downloadIconCancel:active {
  -moz-image-region: rect(0px, 64px, 16px, 48px);
}
@itemFocused@ .downloadButton.downloadIconCancel {
  -moz-image-region: rect(0px, 80px, 16px, 64px);
}
@itemFocused@:hover .downloadButton.downloadIconCancel {
  -moz-image-region: rect(0px, 96px, 16px, 80px);
}
@itemFocused@:hover .downloadButton.downloadIconCancel:hover {
  -moz-image-region: rect(0px, 112px, 16px, 96px);
}
@itemFocused@:hover .downloadButton.downloadIconCancel:active {
  -moz-image-region: rect(0px, 128px, 16px, 112px);
}

.downloadButton.downloadIconShow {
  -moz-image-region: rect(16px, 16px, 32px, 0px);
}
@item@:hover .downloadButton.downloadIconShow {
  -moz-image-region: rect(16px, 32px, 32px, 16px);
}
@item@:hover .downloadButton.downloadIconShow:hover {
  -moz-image-region: rect(16px, 48px, 32px, 32px);
}
@item@:hover .downloadButton.downloadIconShow:active {
  -moz-image-region: rect(16px, 64px, 32px, 48px);
}
@itemFocused@ .downloadButton.downloadIconShow {
  -moz-image-region: rect(16px, 80px, 32px, 64px);
}
@itemFocused@:hover .downloadButton.downloadIconShow {
  -moz-image-region: rect(16px, 96px, 32px, 80px);
}
@itemFocused@:hover .downloadButton.downloadIconShow:hover {
  -moz-image-region: rect(16px, 112px, 32px, 96px);
}
@itemFocused@:hover .downloadButton.downloadIconShow:active {
  -moz-image-region: rect(16px, 128px, 32px, 112px);
}

.downloadButton.downloadIconRetry {
  -moz-image-region: rect(32px, 16px, 48px, 0px);
}
@item@:hover .downloadButton.downloadIconRetry {
  -moz-image-region: rect(32px, 32px, 48px, 16px);
}
@item@:hover .downloadButton.downloadIconRetry:hover {
  -moz-image-region: rect(32px, 48px, 48px, 32px);
}
@item@:hover .downloadButton.downloadIconRetry:active {
  -moz-image-region: rect(32px, 64px, 48px, 48px);
}
@itemFocused@ .downloadButton.downloadIconRetry {
  -moz-image-region: rect(32px, 80px, 48px, 64px);
}
@itemFocused@:hover .downloadButton.downloadIconRetry {
  -moz-image-region: rect(32px, 96px, 48px, 80px);
}
@itemFocused@:hover .downloadButton.downloadIconRetry:hover {
  -moz-image-region: rect(32px, 112px, 48px, 96px);
}
@itemFocused@:hover .downloadButton.downloadIconRetry:active {
  -moz-image-region: rect(32px, 128px, 48px, 112px);
}

@media (min-resolution: 2dppx) {
  .downloadButton {
    list-style-image: url("chrome://browser/skin/downloads/buttons@2x.png");
  }
  .downloadButton > .button-box > .button-icon {
    width: 16px;
    height: 16px;
  }

  .downloadButton.downloadIconCancel {
     -moz-image-region: rect(0px, 32px, 32px, 0px);
  }
  @item@:hover .downloadButton.downloadIconCancel {
    -moz-image-region: rect(0px, 64px, 32px, 32px);
  }
  @item@:hover .downloadButton.downloadIconCancel:hover {
    -moz-image-region: rect(0px, 96px, 32px, 64px);
  }
  @item@:hover .downloadButton.downloadIconCancel:active {
    -moz-image-region: rect(0px, 128px, 32px, 96px);
  }
  @itemFocused@ .downloadButton.downloadIconCancel {
    -moz-image-region: rect(0px, 160px, 32px, 128px);
  }
  @itemFocused@:hover .downloadButton.downloadIconCancel {
    -moz-image-region: rect(0px, 192px, 32px, 160px);
  }
  @itemFocused@:hover .downloadButton.downloadIconCancel:hover {
    -moz-image-region: rect(0px, 224px, 32px, 192px);
  }
  @itemFocused@:hover .downloadButton.downloadIconCancel:active {
    -moz-image-region: rect(0px, 256px, 32px, 224px);
  }

  .downloadButton.downloadIconShow {
    -moz-image-region: rect(32px, 32px, 64px, 0px);
  }
  @item@:hover .downloadButton.downloadIconShow {
    -moz-image-region: rect(32px, 64px, 64px, 32px);
  }
  @item@:hover .downloadButton.downloadIconShow:hover {
    -moz-image-region: rect(32px, 96px, 64px, 64px);
  }
  @item@:hover .downloadButton.downloadIconShow:active {
    -moz-image-region: rect(32px, 128px, 64px, 96px);
  }
  @itemFocused@ .downloadButton.downloadIconShow {
    -moz-image-region: rect(32px, 160px, 64px, 128px);
  }
  @itemFocused@:hover .downloadButton.downloadIconShow {
    -moz-image-region: rect(32px, 192px, 64px, 160px);
  }
  @itemFocused@:hover .downloadButton.downloadIconShow:hover {
    -moz-image-region: rect(32px, 224px, 64px, 192px);
  }
  @itemFocused@:hover .downloadButton.downloadIconShow:active {
    -moz-image-region: rect(32px, 256px, 64px, 224px);
  }

  .downloadButton.downloadIconRetry {
    -moz-image-region: rect(64px, 32px, 96px, 0px);
  }
  @item@:hover .downloadButton.downloadIconRetry {
    -moz-image-region: rect(64px, 64px, 96px, 32px);
  }
  @item@:hover .downloadButton.downloadIconRetry:hover {
    -moz-image-region: rect(64px, 96px, 96px, 64px);
  }
  @item@:hover .downloadButton.downloadIconRetry:active {
    -moz-image-region: rect(64px, 128px, 96px, 96px);
  }
  @itemFocused@ .downloadButton.downloadIconRetry {
    -moz-image-region: rect(64px, 160px, 96px, 128px);
  }
  @itemFocused@:hover .downloadButton.downloadIconRetry {
    -moz-image-region: rect(64px, 192px, 96px, 160px);
  }
  @itemFocused@:hover .downloadButton.downloadIconRetry:hover {
    -moz-image-region: rect(64px, 224px, 96px, 192px);
  }
  @itemFocused@:hover .downloadButton.downloadIconRetry:active {
    -moz-image-region: rect(64px, 256px, 96px, 224px);
  }
}
