/*
 *  MUIWebDocument.css
 *  Mail
 *
 *  Copyright 2012 Apple Inc. All rights reserved. 
 */

* {
    -webkit-user-modify: initial !important;
}

html {
    font: @[FONT_SIZE]px @[FONT_NAME];
}

body {
    margin: 18px @[HORIZONTAL_MARGIN]px 22px;
    padding: 0;
    word-wrap: break-word;
    word-break: break-word;
 }

table {
    word-break: normal;
}

/* Attachments */

attachment {
    -webkit-user-drag: none;
}

img.Apple-small-image {
    width:320px;
}

img.Apple-medium-image {
    width:640px;
}

img.Apple-large-image {
    width:1280px;
}

@-webkit-keyframes Apple-discrete-spinner {
    /* These keyframes try to reproduce the 16 discrete steps seen in a standard system progress indicator. */
    0% {
        background-image: url('x-bundle-resource:IndeterminateProgressSpinner1.pdf');
    }
    6.250% {
        background-image: url('x-bundle-resource:IndeterminateProgressSpinner2.pdf');
    }
    12.500% {
        background-image: url('x-bundle-resource:IndeterminateProgressSpinner3.pdf');
    }
    18.750% {
        background-image: url('x-bundle-resource:IndeterminateProgressSpinner4.pdf');
    }
    25.000% {
        background-image: url('x-bundle-resource:IndeterminateProgressSpinner5.pdf');
    }
    31.250% {
        background-image: url('x-bundle-resource:IndeterminateProgressSpinner6.pdf');
    }
    37.500% {
        background-image: url('x-bundle-resource:IndeterminateProgressSpinner7.pdf');
    }
    43.750% {
        background-image: url('x-bundle-resource:IndeterminateProgressSpinner8.pdf');
    }
    50.000% {
        background-image: url('x-bundle-resource:IndeterminateProgressSpinner9.pdf');
    }
    56.250% {
        background-image: url('x-bundle-resource:IndeterminateProgressSpinner10.pdf');
    }
    62.500% {
        background-image: url('x-bundle-resource:IndeterminateProgressSpinner11.pdf');
    }
    68.750% {
        background-image: url('x-bundle-resource:IndeterminateProgressSpinner12.pdf');
    }
    75.000% {
        background-image: url('x-bundle-resource:IndeterminateProgressSpinner13.pdf');
    }
    81.250% {
        background-image: url('x-bundle-resource:IndeterminateProgressSpinner14.pdf');
    }
    87.500% {
        background-image: url('x-bundle-resource:IndeterminateProgressSpinner15.pdf');
    }
    93.750% {
        background-image: url('x-bundle-resource:IndeterminateProgressSpinner16.pdf');
    }
    100% {
        background-image: url('x-bundle-resource:IndeterminateProgressSpinner1.pdf');
    }
}

div.Apple-indeterminate-progress-spinner {
    width: 16px;
    height: 16px;
    background-image: url('x-bundle-resource:IndeterminateProgressSpinner1.pdf');
    background-repeat: no-repeat;
    background-size: 100% 100%;
    -webkit-animation-name: Apple-discrete-spinner;
    -webkit-animation-duration: 1s;
    -webkit-animation-iteration-count: infinite;
    -webkit-animation-timing-function: step-start;
}

/* List Styles */

ul.Apple-dash-list, ul.Apple-dash-list ul {
    list-style-type: none;
}
    
ul.Apple-dash-list li:before {
    content: "\2013";
    position: absolute;
    margin: 0 -1.25em;
}

/* Ordered Lists: Support 9 deep, like Pages, then fall back to dashes */
ol, ol ol ol ol, ol ol ol ol ol ol ol {
    list-style-type: decimal;
}

ol ol, ol ol ol ol ol, ol ol ol ol ol ol ol ol {
    list-style-type: lower-alpha;
}

ol ol ol, ol ol ol ol ol ol, ol ol ol ol ol ol ol ol ol {
    list-style-type: lower-roman;
}

ol ol ol ol ol ol ol ol ol ol {
    list-style-type: none;
}

ol ol ol ol ol ol ol ol ol ol li:before {
    content: "\2013";
    position: absolute;
    -webkit-margin-start: -1.25em;
}

/* Mail-specific Styles */

a.x-apple-mail-see-more, a.x-apple-mail-see-more-from {
    font-size: 10px;
    font-family: Helvetica;
    text-decoration: none;
    color: -apple-system-blue;
    -apple-color-filter: none;
}

a.x-apple-mail-see-more {
    font-size: 11px;
    font-weight: bold;
}

body.ApplePlainTextBody {
    -webkit-nbsp-mode: space;
    font-size: @[PLAIN_TEXT_FONT_SIZE]px;
    font-family: @[PLAIN_TEXT_FONT_NAME];
}

body.Singleton {
    margin-left: @[SINGLETON_LEADING_MARGIN]px;
}

.x-apple-maildropbanner {
    display: none;
}

blockquote[type=cite] {
    padding-left: 8px;
    margin: 0;
    border-left-width: 2px;
    border-left-style: solid;
    border-left-color: @[QUOTE_BAR_COLOR_LVL1_RGB];
    color: @[QUOTE_TEXT_COLOR_LVL1_RGB];
}

blockquote[type=cite] blockquote[type=cite] {
    border-left-width: 2px;
    border-left-style: solid;
    border-left-color: @[QUOTE_BAR_COLOR_LVL2_RGB];
    color: @[QUOTE_TEXT_COLOR_LVL2_RGB];
}

blockquote[type=cite] blockquote[type=cite] blockquote[type=cite] {
    border-left-width: 2px;
    border-left-style: solid;
    border-left-color: @[QUOTE_BAR_COLOR_LVL3_RGB];
    color: @[QUOTE_TEXT_COLOR_LVL3_RGB];
}

img.Apple-web-attachment {
    vertical-align: top !important;
    max-width: 100% !important;
}

video.Apple-web-attachment {
    max-width: 100% !important;
}

img.Apple-edge-to-edge-visual-media, video.Apple-edge-to-edge-visual-media {
    display: block;
    max-width: calc(100% + @[MEDIA_MAX_WIDTH]px) !important;
    margin: 0 @[MEDIA_HORIZONTAL_MARGIN]px;
}

img.Apple-edge-to-edge-visual-media.Singleton, video.Apple-edge-to-edge-visual-media.Singleton {
    display: block;
    max-width: calc(100% + @[SINGLETON_MEDIA_MAX_WIDTH]px) !important;
    margin: 0 @[SINGLETON_MEDIA_TRAILING_MARGIN]px 0 @[SINGLETON_MEDIA_LEADING_MARGIN]px;
}


/* Media Query Overrides (Leave at bottom) */

@media screen and (prefers-color-scheme: dark) {
    /* Implicit (color-filtered) dark mode */
    :root.apple-mail-implicit-dark-support {
        -apple-color-filter: apple-invert-lightness();
        --quote-bar-color-level-1: @[QUOTE_BAR_COLOR_LVL1_RGB_IMPLICIT_DARK];
        --quote-text-color-level-1: @[QUOTE_TEXT_COLOR_LVL1_RGB_IMPLICIT_DARK];
        --quote-bar-color-level-2: @[QUOTE_BAR_COLOR_LVL2_RGB_IMPLICIT_DARK];
        --quote-text-color-level-2: @[QUOTE_TEXT_COLOR_LVL2_RGB_IMPLICIT_DARK];
        --quote-bar-color-level-3: @[QUOTE_BAR_COLOR_LVL3_RGB_IMPLICIT_DARK];
        --quote-text-color-level-3: @[QUOTE_TEXT_COLOR_LVL3_RGB_IMPLICIT_DARK];
    }

    /* Explicit (declared) dark mode */
    :root:not(.apple-mail-implicit-dark-support) {
        --quote-bar-color-level-1: @[QUOTE_BAR_COLOR_LVL1_RGB_EXPLICIT_DARK];
        --quote-text-color-level-1: @[QUOTE_TEXT_COLOR_LVL1_RGB_EXPLICIT_DARK];
        --quote-bar-color-level-2: @[QUOTE_BAR_COLOR_LVL2_RGB_EXPLICIT_DARK];
        --quote-text-color-level-2: @[QUOTE_TEXT_COLOR_LVL2_RGB_EXPLICIT_DARK];
        --quote-bar-color-level-3: @[QUOTE_BAR_COLOR_LVL3_RGB_EXPLICIT_DARK];
        --quote-text-color-level-3: @[QUOTE_TEXT_COLOR_LVL3_RGB_EXPLICIT_DARK];
    }

    blockquote[type=cite] {
        border-left-color: var(--quote-bar-color-level-1);
        color: var(--quote-text-color-level-1);
    }

    blockquote[type=cite] blockquote[type=cite] {
        border-left-color: var(--quote-bar-color-level-2);
        color: var(--quote-text-color-level-2);
    }

    blockquote[type=cite] blockquote[type=cite] blockquote[type=cite] {
        border-left-color: var(--quote-bar-color-level-3);
        color: var(--quote-text-color-level-3);
    }
}

/* Print Styles */

@media print {
    body {
        font-size: 80%;
        padding: 0;
        margin: 0;
    }
}
