/*
    Full page printing CSS
    ======================

    Since we want precisely specify the card sizes, we must not allow the user to scale the content to fit a sheet of paper.
    We must also make sure the browser does not add randomly sized margins to the page.

    Instead, we use absolute sizes for all content, such that it fills a sheet of paper:
    1) Remove all page margins (using the @page CSS rule). The borders of the document will be outside of the printable area,
       however, we will cluster all content around the center, so that we won't crop anything.
    2) Fill the document with <page> elements which have an absolute size equal to the full area of the paper.
    3) Fill each page with cards, arranged around the center of the page.
*/


/* Center all content within a page */
.page {
    display: block;
    page-break-after: always;
    padding: 0;
    box-sizing: border-box;
}

.page-zoom {
    display: flex;
    align-content: center;
    justify-content: center;
    flex-direction: row;
    flex-wrap: wrap;
}

@media print {
    .page.landscape {
        transform: rotate(-90deg) translateX(-100%); 
        -moz-transform: rotate(-90deg) translateX(-100%);
        transform: rotate(-90deg) translateX(-100%);
        transform-origin: top left; 
        -moz-transform-origin: top left;
        transform-origin: top left;
    }
}

/* A4 paper area */
/* Chrome has problems with page sizes given in metric units. Make the paper area slightly smaller to work around this. */
page[size="A4"] {
    width:  210mm; /* full: 210.0mm */
    height: 296mm; /* full: 297.0mm */
}

/* US letter area */
page[size="Letter"] {
    width:  8.5in;
    height: 11.0in;
}

/* US letter area */
page[size="Letter - Landscape"] {
    width:  11.0in;
    height: 8.5in;
}

page[size="25x35"] {
    width: 2.5in;
    height: 3.5in;
}

/* Default card size */
.card {
    width:2.5in;
    height:3.5in;
}

/* Business card size */
.card-size-20x35 {
    width:2.0in;
    height:3.5in;
}
.card-size-20x35 .card-back-icon {
    width: 0.8in;
    height: 0.8in;
}

/* Bridge card size */
.card-size-225x35 {
    width:2.25in;
    height:3.5in;
}
.card-size-225x35 .card-back-icon {
    width: 1in;
    height: 1in;
}

/* Poker / Magic card size */
.card-size-25x35 {
    width:2.5in;
    height:3.5in;
}
.card-size-25x35 .card-back-icon {
    width: 1in;
    height: 1in;
}

/* Poker / Magic card size */
.card-size-35x50 {
    width:3.5in;
    min-width:3.5in;
    height:5.0in;
}
.card-size-35x50 .card-back-icon {
    width: 1.5in;
    height: 1.5in;
}

/* Landscape Index Card */
.card-size-50x30 {
    width:5.0in;
    height:3.0in;
}
.card-size-50x30 .card-back-icon {
    width: 1.5in;
    height: 1.5in;
}

/* Landscape big card */
.card-size-75x50 {
    width:7.5in;
    height:5.0in;
}
.card-size-75x50 .card-back-icon {
    width: 2in;
    height: 2in;
}

/* Card sizes that fill out the entire sheet of paper (minimal margins) */
.page[size="A4"] .card-size-full3x3 {
    width:69mm;
    height:98mm;
}

.page[size="Letter"] .card-size-full3x3 {
    width:71mm;
    height:92mm;
}
