/* Chase the Ace envelopes - the SVGs share one 100 x 112 canvas, so an opened envelope's
   layers (inside, card, front) are simply stacked */

.cta-board {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 6px;
    margin: 10px 0;
}

.cta-envelope {
    position: relative;
    aspect-ratio: 100 / 112;
    filter: drop-shadow(0 2px 3px rgba(15, 42, 68, .14));
}

.cta-layer {
    position: absolute;
    inset: 0;
}

.cta-layer svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* envelope picker on the checkout */

.cta-picker input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cta-picker label {
    display: block;
    margin: 0;
    cursor: pointer;
    border-radius: 8px;
    outline: 3px solid transparent;
    outline-offset: -1px;
    transition: transform .1s ease-in-out, outline-color .1s ease-in-out;
}

.cta-picker label:hover {
    transform: translateY(-2px);
}

/* ~ not +: each radio has its own cell, and anything a script puts after the radio (such as a
   validation message) would otherwise unhook it from its envelope */
.cta-picker input[type="radio"]:checked ~ label {
    outline-color: var(--cta-color, #1895d2);
    transform: translateY(-3px);
}

.cta-picker input[type="radio"]:focus-visible ~ label {
    outline-color: var(--cta-color, #1895d2);
    outline-style: dashed;
}

.cta-picker .cta-opened {
    cursor: not-allowed;
    opacity: .55;
}

.cta-picker-selected {
    margin-top: 6px;
    font-weight: bold;
}

/* the order's envelope on the order status page */

.cta-order-envelope {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 10px 0;
}

.cta-order-envelope-image {
    flex: 0 0 90px;
}

/* the envelope sits in the lower two thirds of its image (the top is room for an opened
   envelope's card), so the label is moved down to its middle */
.cta-order-envelope-label {
    margin: 34px 0 0;
}

/* the opened envelope of a weekly winner on the winners list */

.cta-winner-card {
    width: 70px;
    max-width: 100%;
}

/* prize amounts */

.cta-prizes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 30px;
    margin: 10px 0;
}

.cta-prize-label {
    font-size: .9em;
    text-transform: uppercase;
    opacity: .75;
}

.cta-prize-value {
    font-size: 2em;
    font-weight: bold;
    line-height: 1.1;
}

/* envelopes list */

.cta-card-symbol-red {
    color: #c0392b;
}

.cta-hash {
    font-family: monospace;
    font-size: .85em;
    word-break: break-all;
}

/* the envelope field takes the full row, its label above the board (checkout/inc/field) -
   .form-horizontal .control-label would right-align it */
.form-horizontal .chase-the-ace-envelope-form-group .control-label {
    text-align: left;
}
