﻿/*------------------------------------------------------------------ 
Project:      Inkscape, Keyboard and mouse reference   (keys)
--------------------------------------------------------------------
[Table of contents] 
1. Body
2. Header / #header
3. Table of content / .toc 
4. Page content
    4.1. Headings
    4.2. Sections
    4.3. Shortcuts list
    4.4. Keys
5. Footer / #footer
6. Keyboard and mouse reference - Layout adjustments for wider screens
7. Offline specific
8. Online specific
-------------------------------------------------------------------*/  

/*------------------------------------------------------------------ 
[1. Body] 
*/

/*------------------------------------------------------------------ 
[2. Header ]
*/
.kmr-releaseinfo, .kmr-pubdate {
    font-family: sans-serif;
    font-size: .7em;
    font-weight: bold;
    padding-left: 60px;
}

/*------------------------------------------------------------------ 
[3. Table of contents ]
*/
.kmr-toc {
    border-radius: 10px;
    padding: 1em;
    background-color: #eeeeee;
    font-size: .8em;
    line-height: 1.5em;
}
.kmr-toc ul {
    padding-left: 10px;
    list-style: none;
}
.kmr-toc li {
    padding-left: 1em;
    text-indent: -1em;
}
.kmr-toc-section {
    font-size: 1.4em;
    font-weight: bold;
    text-decoration: none;
}
.kmr-toc-group {
    font-size: .9em;
    text-decoration: none;
}
.kmr-toc a:hover {
    text-decoration: underline;
}
/*------------------------------------------------------------------ 
[4. Content ]
*/

/*-- [4.1. Headings] --*/
h2.kmr {
    font-size: 1.6em;
    margin: .5em 0 .2em 0;
    padding: 0 0 0 2em;
    border-bottom: none;
}
h2.kmr .anchor {
    position: relative;
    top: -.1em;
    left: -5em;
    opacity: 0;
    transition: left 0.25s ease-out, opacity 0.25s;
    padding: 0 .25em;
    text-decoration: none;
    font-size: .7em;
}
h2.kmr:hover .anchor,
section:target .anchor {
    left: 0;
    opacity: 1;
    color: #666;
}
h3.kmr {
    font-size: 1.1em;
    font-style: italic;
    padding: 1em 3em .25em 3em;
    margin: 0;
    border-bottom: 1px solid #999;
    position: relative;
}
h3.kmr::before, /* tweak for hiding border endings, simulate margin */
h3.kmr::after {
    background: inherit;
    display: inline-block;
    content: " ";
    width: 1em;
    height: 1em;
    position: absolute;
    top: 2em;
}
h3.kmr::before {
    left: 0;
}
h3.kmr::after {
    right: 0;
}

/*-- [4.2. Sections] --*/
.kmr-chapter section:nth-child(25n+1) > *:not(h2)  { background-color: #f5f5f5 }
.kmr-chapter section:nth-child(25n+2) > *:not(h2)  { background-color: #f0eae7 }
.kmr-chapter section:nth-child(25n+3) > *:not(h2)  { background-color: #f8f3e9 }
.kmr-chapter section:nth-child(25n+4) > *:not(h2)  { background-color: #e5f1e7 }
.kmr-chapter section:nth-child(25n+5) > *:not(h2)  { background-color: #efcfdf }
.kmr-chapter section:nth-child(25n+6) > *:not(h2)  { background-color: #f3f2e2 }
.kmr-chapter section:nth-child(25n+7) > *:not(h2)  { background-color: #e8fae1 }
.kmr-chapter section:nth-child(25n+8) > *:not(h2)  { background-color: #f6f9d9 }
.kmr-chapter section:nth-child(25n+9) > *:not(h2)  { background-color: #f4ecf5 }
.kmr-chapter section:nth-child(25n+10) > *:not(h2) { background-color: #f9f1d9 }
.kmr-chapter section:nth-child(25n+11) > *:not(h2) { background-color: #eee4dc }
.kmr-chapter section:nth-child(25n+12) > *:not(h2) { background-color: #f9f1d9 }
.kmr-chapter section:nth-child(25n+13) > *:not(h2) { background-color: #f2f1ea }
.kmr-chapter section:nth-child(25n+14) > *:not(h2) { background-color: #ebf1fd }
.kmr-chapter section:nth-child(25n+15) > *:not(h2) { background-color: #cff4e2 }
.kmr-chapter section:nth-child(25n+16) > *:not(h2) { background-color: #ffece8 }
.kmr-chapter section:nth-child(25n+17) > *:not(h2) { background-color: #f8f7d5 }
.kmr-chapter section:nth-child(25n+18) > *:not(h2) { background-color: #f3f3f3 }
.kmr-chapter section:nth-child(25n+19) > *:not(h2) { background-color: #e7e9f3 }
.kmr-chapter section:nth-child(25n+20) > *:not(h2) { background-color: #e9efc5 }
.kmr-chapter section:nth-child(25n+21) > *:not(h2) { background-color: #e7f5d7 }
.kmr-chapter section:nth-child(25n+22) > *:not(h2) { background-color: #e9dfef }
.kmr-chapter section:nth-child(25n+23) > *:not(h2) { background-color: #f2f9da }
.kmr-chapter section:nth-child(25n+24) > *:not(h2) { background-color: #e9f3e7 }
.kmr-chapter section:nth-child(25n+25) > *:not(h2) { background-color: #feeffa }

/*-- [4.3. Shortcuts list] --*/
.kmr-chapter section > :nth-child(2) {
    border-top-left-radius: 1em;
    border-top-right-radius: 1em;
}
.kmr-chapter section > :last-child {
    border-bottom-left-radius: 1em;
    border-bottom-right-radius: 1em;
}
.kmr-chapter section > ul {
    list-style: none;
    margin: 0;
    padding: 1em;
}
.kmr-chapter section > ul > li {
    padding: 0;
    margin: 0;
}
.kmr-chapter section p.kmr-note {
    margin: 0 1em .5em 4em;
    padding: 0 1em;
    font-size: .7em;
    color: #333333;
    text-align: left;
}
.kmr-chapter section p:not(.kmr-note) {
    display: flex;
    line-height: 1.5em;
    margin: 0 0 .5em 0;
    padding: 0;
}
.kmr-chapter section p:not(.kmr-note) > span {
    flex: 50%;
}
.kmr-chapter section p:not(.kmr-note) > span.kmr-keys {
    text-align: right;
}
.kmr-chapter section p:not(.kmr-note) > span.kmr-action {
    padding-left: 1em;
}

/*-- [4.4. Keys] --*/
.kmr kbd.kmr-keycombo {}
.kmr kbd.kmr-key {
    display: inline-block;
    background-color: #eee;
    border-radius: 5px;
    border: 1px solid #b4b4b4;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .2), 0 2px 0 0 rgba(255, 255, 255, .7) inset;
    color: #555;
    font-weight: bold;
    line-height: 1;
    padding: 3px 5px;
    white-space: nowrap;
    cursor: default;
    letter-spacing: 1px;
    user-select: none;
}
.kmr kbd.kmr-key:hover {
    color: black;
}
.kmr kbd.kmr-key:active {
    color: black;
    box-shadow: 1px 1px 0px #ddd inset;
}
.kmr kbd.kmr-modifierkey {
    display: inline-block;
    background-color: #555;
    border-radius: 5px;
    border: 1px solid #666;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .2), 0 2px 0 0 rgba(255, 255, 255, .2) inset;
    color: white;
    font-weight: bold;
    line-height: 1;
    padding: 3px 5px;
    white-space: nowrap;
    cursor: default;
    letter-spacing: 1px;
    user-select: none;
}
.kmr kbd.kmr-modifierkey:hover {
    color: rgba(255, 255, 255, .8);
}
.kmr kbd.kmr-modifierkey:active {
    color: rgba(255, 255, 255, .7);
    box-shadow: 1px 1px 0px rgba(255, 255, 255, .2) inset;
}
.kmr .kmr-plussign {
    padding: 0 .2em;
}
.kmr .kmr-commasign {
    padding: 0 .3em 0 .1em;
}
.kmr kbd.kmr-mousebutton {
    font-weight: bold;
    cursor: default;
    color: #555;
}
.kmr kbd.kmr-mousebutton:hover {
    color: black;
}
.kmr kbd.kmr-mousebutton:active {
    color: #555;
}
.kmr kbd.kmr-mousebutton::before {
    display: inline-block;
    content: " ";
    width: 24px;
    height: 24px;
    background-image: url("../tutorials/mouse.svg");
    background-repeat: no-repeat;
    background-size: cover;
    vertical-align: middle;
}
.kmr kbd.kmr-mousebutton.click::before              { background-position: 0 -24px }
.kmr kbd.kmr-mousebutton.double-click::before       { background-position: 0 -48px }
.kmr kbd.kmr-mousebutton.middle-click::before       { background-position: 0 -72px }
.kmr kbd.kmr-mousebutton.right-click::before        { background-position: 0 -96px }
.kmr kbd.kmr-mousebutton.mouse-wheel::before        { background-position: 0 -120px }
.kmr kbd.kmr-mousebutton.mouse-drag::before         { background-position: 0 -144px }
.kmr kbd.kmr-mousebutton.middle-button-drag::before { background-position: 0 -168px }
.kmr kbd.kmr-mousebutton.right-button-drag::before  { background-position: 0 -192px }

.kmr code.tutorial-filename {
    background-color: #eee;
    padding: 0 .25em;
}

/*------------------------------------------------------------------ 
[5. Footer] 
*/
img.kmr {
    border: 0;
}

/*------------------------------------------------------------------
[6. Keyboard and mouse reference - Layout adjustments for wider screens]
*/
@media (min-width: 699px) and (min-width: 30em) {
    .kmr-toc {
        width: 250px;
        float: left;
    }
    .kmr-chapter {
        margin-left: 300px;
    }
    .kmr-chapter section p.kmr-note {
        border-left: none;
        text-align: center;
    }
}
/*------------------------------------------------------------------
[7. Offline specific - Only for offline version
*/
body.kmr {
    margin: 1em;
    font: 1em serif;
    background-color: #ffffff;
}
body.kmr h1.kmr {
    margin-top: .5em;
    padding-left: 40px;
    padding-bottom: 0;
    margin-bottom: 0;
    letter-spacing: -.02em;
}

/*------------------------------------------------------------------
[8. Online specific - Only for website
*/
body:not(.kmr) .wrapper h1.kmr {
    display: none;
}
body:not(.kmr) .wrapper .kmr-releaseinfo, .wrapper .kmr-pubdate {
    padding-left: 30px;
}
body:not(.kmr) .kmr-chapter section p.kmr-note { /* only on website */
    border-left: 1px solid #999999;
    text-align: left;
}
body:not(.kmr) .kmr kbd:not(.kmr-keycombo) { /* only on website */
    font-size: 0.8em;
}
body:not(.kmr) .kmr kbd.kmr-mousebutton::before { /* only on website */
    background-image: url("../tutorials/mouse.svg");
}
