/* The only stylesheet this site has of its own. It covers the two App Store links on the
 * SwimCharts page and nothing else.
 *
 * Everything else comes from marekkultys.com/css/styles.css. A rule only belongs here if it
 * could not be built from the classes that already exist there.
 */

/* ---- Our own button, at the top of the page ----------------------------------------------
 *
 * Nothing in the main stylesheet draws a rounded box with a shadow, which is the only reason
 * these rules exist. They say nothing about type or colour: the label inside is an ordinary
 * paragraph, so Barlow, the size, the weight and the ink all still come from the main sheet
 * and still follow it if it changes.
 */

.app-store-button {
   display: inline-flex;
   align-items: center;
   gap: 0.9em;
   padding: 0.75em 1.25em 0.75em 0.75em;
   background: rgba(255, 255, 255, 1);
   border: none;             /* the main sheet underlines every link; a button is not underlined */
   border-radius: 18px;
   /* The same shadow the screenshots carry, so the button sits in the same light. */
   box-shadow: 0 2px 10px rgba(0, 0, 66, 0.25);
   transition: box-shadow 0.2s ease, transform 0.2s ease;
}

/* The main sheet sets img { width: 100% }, which would fill the button. */
.app-store-button img {
   width: 56px;
   height: 56px;
   flex: none;
}

/* The label is a paragraph so it keeps the site's own type. It only needs its spacing
   removed and its colour released, so it can follow the link on hover. */
.app-store-button p {
   margin: 0;
   color: inherit;
}

.app-store-button:hover {
   box-shadow: 0 4px 16px rgba(0, 0, 66, 0.3);
   transform: translateY(-1px);
}

.app-store-button:active {
   box-shadow: 0 1px 4px rgba(0, 0, 66, 0.3);
   transform: translateY(0);
}

/* ---- Apple's badge, in the list at the foot of the page ----------------------------------
 *
 * Apple's own artwork, used unchanged — their guidelines say to use only the badge they supply
 * and not to modify, angle or animate it, so there is no hover state here and no filter.
 *
 * 234.4px wide is 78.3px tall, against a 40px minimum onscreen. The margins are the clear space
 * they ask for — a quarter of the badge's height, so 19.6px, with nothing allowed inside it —
 * which is more than the list's own spacing between items would leave.
 */
.app-store-badge {
   width: 234.375px;
   margin: 0.4em 0 0.9em;
}
