/*

Personality Test Maker
https://scott2.neocities.org/personality-test-maker/

By Scott
https://scott2.neocities.org/

{personality-test-maker}/main.css

All the CSS for the Personality Test Maker itself goes here.

*/

/* === Basics + Reset === */

*
{
    box-sizing:border-box;
    margin:0;
    border:0;
    padding:0;
}

*:last-child
{
    margin-bottom:0;
}

html
{
    height:100%;
}

body
{
    min-height:100%;
    font-family:Arial, Helvetica, sans-serif;
    font-weight:normal;
    font-style:normal;
    text-decoration:none;
    background:rgba(0,0,0,0);
    color:rgb(0,0,0);
}

/* === Default Element Styles === */

/* --- Bottom margin and line-height for most elements --- */

h1,
h2,
h3,
h4,
h5,
h6,
p,
table,
ul,
ol,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6
{
    margin-bottom:1rem;
}

/* --- Site title --- */

.site-title
{
    font-size:2.0rem;
    font-weight:bold;
}

/* --- Headings + Fake Headings --- */

/* Fake headings are for showing what headings look like without messing with
   SEO. */
   
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6

h1, .h1 { font-size:1.86em; }
h2, .h2 { font-size:1.71rem; }
h3, .h3 { font-size:1.57rem; }
h4, .h4 { font-size:1.42rem; }
h5, .h5 { font-size:1.28rem; }
h6, .h6 { font-size:1.14rem; }

/* --- Lists --- */
ul, ol
{
    list-style-position:outside;
    margin-left:1.2rem;
}

li
{
    margin-bottom:0.5rem;
}

/* --- Images --- */

/* Scale them and maintain aspect ratio. Align to bottom to get rid of that
   white-space. */

img
{
    max-width:100%;
    object-fit:contain;
    vertical-align:bottom;
}

table
{
    border-spacing:0;
    border-collapse:collapse;
}

/* --- Links --- */

/* Make them orange and underlined by default! */

a
{
    color:rgb(255,99,71);
    text-decoration:underline;
}

a:active, a:hover
{
    color:rgb(255,140,0);
}

/* Block links */

a.block-link
{
    text-decoration:none;
}

a.block-link:hover .block-link-txt,
a.block-link:active .block-link-txt
{
    text-decoration:underline;
}

/* --- <em> + <strong> --- */

em
{
    font-style:italic;
}

strong
{
    font-weight:bold;
}

/* --- Forms --- */

/* Get rid of Chrome's blue border */
input,
textarea,
select
{
    outline:0;
}

textarea
{
    resize:vertical;
}

/* - Text inputs - */

input[type=text],
input[type=password],
textarea
{
    border-left:solid 1px rgb(72,72,72);
    border-top:solid 1px rgb(72,72,72);
    border-right:solid 1px rgb(212,212,212);
    border-bottom:solid 1px rgb(212,212,212);
    padding:0.25rem;
    background:rgb(255,255,255);
}

textarea
{
    width:100%;
    height:6.7rem;
}

/* - Buttons - */

input[type=button],
input[type=submit]
{
    background:rgb(255,102,0);
    color:rgb(255,255,255);
    font-weight:bold;
    padding:0.25rem 0.75rem;
    font-size:0.8rem;
    outline:none;
    cursor:pointer;
}

input[type=button]:hover
input[type=submit]:hover:enabled
{
    background:rgb(255,153,0);
    outline:none;
}

input[type=button]:active
input[type=submit]:active:enabled
{
    background:rgb(255,204,0);
    outline:none;
}

code
{
    border:solid 1px rgb(192,192,192);
    padding:0.5rem;
    display:block;
    margin-bottom:1rem;
}

/* === Reusable Stuff === */

/* --- Common --- */

.block
{
    margin-bottom:1rem;
}

.off
{
    display:none !important;
}

.hidden
{
    visibility:hidden;
}

.error
{
    color:rgb(255,0,0);
    font-weight:bold;
}

.success
{
    color:rgb(51,102,0);
    font-weight:bold;
}

/* Alignment lazy shortcuts */

.halign-left
{
    text-align:left;
}

.halign-center, .halign-middle
{
    text-align:center;
}

.halign-right
{
    text-align:right;
}

.valign-top
{
    vertical-align:top;
}

.valign-middle, .valign-center
{
    vertical-align:middle;
}

.valign-bottom
{
    vertical-align:bottom;
}

.align-top-left
{
    vertical-align:top;
    text-align:left;
}

.align-top
{
    vertical-align:top;
    text-align:center;
}

.align-top-right
{
    vertical-align:top;
    text-align:right;
}

.align-left
{
    vertical-align:middle;
    text-align:left;
}

.align-center, .align-centre
{
    vertical-align:middle;
    text-align:center;
}

.align-right
{
    vertical-align:middle;
    text-align:right;
}

.align-bottom-left
{
    vertical-align:bottom;
    text-align:left;
}

.align-bottom
{
    vertical-align:bottom;
    text-align:center;
}

.align-bottom-right
{
    vertical-align:bottom;
    text-align:right;
}

/* Margin-bottom shortcuts */

.margin-bottom-0
{
    margin-bottom:0;
}

.margin-bottom-1
{
    margin-bottom:1rem;
}

/* --- Inline List --- */

/* I can't think of a better name :O. Anyway, put this around a <ul> or <ol> 
   to make it align as a whole rather than per item. */

.inline-list
{
    display:inline-block;
    text-align:left;
}

/* Horizontal list (e.g. for navigation...) */
.hlist
{
    display:flex;
    list-style-type:none;
    margin-bottom:0;
}

.hlist li
{
    margin-right:1rem;
    margin-bottom:0;
}

.hlist li:last-child
{
    margin-right:0;
}

/* --- Tables --- */

/* - Make them responsive with a container div .table
   - Margin-bottom:1rem on .table instead of table
   - Single pixel grey border
   - Little padding in cells */

.table
{
    overflow-x:auto;
    margin-bottom:1rem;
}

.table table
{
    min-width:100%;
    border-spacing:0;
    margin-bottom:0;
    border-collapse:collapse;
}

.table th
{
    font-weight:bold;
}

.table th,
.table td
{
    padding:0.5rem;
}

.table table,
.table tr,
.table th,
.table td
{
    border:solid 1px rgb(192,192,192);
}

/* === Responsive YouTube Embed === */

.yt-wrapper
{
    max-width:560px;
    margin-bottom:1em;
    margin-left:auto;
    margin-right:auto; 
}

.yt-wrapper-inner
{
    position:relative;
    padding-bottom:56.25%; /* 16:9 */
    height:0; 
}

.yt-wrapper iframe
{
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:
    100%;
}

/* === Num Control === */

.num-ctrl
{
    display:inline-flex;
    align-items:center; /* vertical-align */
}

.num-ctrl-col
{
    margin-right:0.2em;
}

.num-ctrl-col:last-child
{
    margin-right:0;
}

.num-ctrl-tbx
{
    width:2em;
    text-align:center;
}

.off { display:none !important; }

/* Re-usable Buttons */

input[type=button].edit-btn, 
input[type=button].delete-btn,
input[type=button].move-up-btn, 
input[type=button].move-down-btn
{
    display:inline;
    background-repeat:no-repeat;
    background-position:center;
    border:0;
    width:2em;
    height:2em;
    color:transparent;
    text-decoration:none;
    background-size:75%;
}

input[type=button].edit-btn
{
    background-image:url(edit-btn.png);
}

input[type=button].delete-btn
{
    background-image:url(delete-btn.png);
}

input[type=button].move-up-btn
{
    background-image:url(move-up-btn.png);
}

input[type=button].move-down-btn
{
    background-image:url(move-down-btn.png);
}

h1
{
    margin-bottom:0.75rem;
}

h2
{
    border:solid 1px rgb(192,192,192);
    display:block;
    margin-bottom:0.5rem;
    background-color:lightgreen;
    padding:0.25em;
}

.box
{
    background:rgb(255,255,255);
    margin-bottom:0.5rem;
    padding:0.25em;
    border:solid 1px rgb(192,192,192);
}

.section:last-child
{
    margin-bottom:0;
}

/* Listy */

.listy .list
{
    margin-bottom:0.5em;
}

.listy .list .item
{
    display:flex;
}

.listy .list .item .title
{
    flex:1;
    display:flex;
    align-items:center;
    justify-content:flex-start;
}

.listy .list .item .buttons
{
    display:flex;
    align-items:center;
    justify-content:center;
}

.listy .list .item .buttons input[type=button]
{
    margin-right:0.25em;
}

.listy .list .item .buttons input[type=button]:last-child
{
    margin-right:0em;
}

.listy .list .item:last-child
{
    margin-bottom:0;
}

.mc-code
{
    font-family:"Courier New", monotype;
    color:green;
    font-weight:bold;
}

.warning
{
    color:orange;
    font-weight:bold;
}

/* Main structure */

body
{
    background:rgb(232,232,232);
    display:flex;
    justify-content:center;
    padding:1em;
}

.wrap
{
    background:rgb(255,255,255);
    width:100%;
    max-width:1024px;
    padding:1em;
    text-align:center;
}

/* menu */

.menu
{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:center;
    font-size:0.75em;
}

.menu .item
{
    margin-right:0.5em;
    margin-bottom:0.75rem;
}

.menu .debug-item input[type=button]
{
    background-color:rgb(192,192,192);
}

.menu .item.with-border
{
    border:solid 1px rgb(212,212,212);
    padding:0.5em;
}

.menu .item:last-child
{
    margin-right:0;
}

.quiz
{
    max-width:640px;
    margin:0 auto;
    border:solid 1px rgb(192,192,192);
    background:rgb(212,212,212);
    padding:0.5em;
    margin-bottom:1em;
}

/* banner */

.quiz .banner
{
    margin-bottom:0.5em;
}

.quiz .banner .banner-image-container
{
    background-image:url(no-banner-set-2.png);
    background-position:center center;
    min-height:3em;
    padding:0;
    display:flex;
    align-items:center;
    justify-content:center;
}

.quiz .banner .inputs
{
    width:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    margin-bottom:1em;
}

.quiz .banner .inputs .left
{
    flex:1;
    max-width:20em;
    margin-right:0.5em;
}

.quiz .banner .inputs .left input[type=text].banner-image-url-tbx
{
    display:block;
    width:100%;
    max-width:auto;
}
    
/* mode-overview */

/* -results */

.mode-overview .results
{
    margin-bottom:0.5em;
}

.mode-overview .results.listy .list .item
{
    padding:0;
}

.mode-overview .results.listy .list .item > div
{
    padding:0.25em;
    display:flex;
}

.mode-overview .results.listy .list .id
{
    width:6em;
    background:orange;
    justify-content:center;
    align-items:center;
    font-weight:bold;
}

.mode-overview .results.listy .list .title
{
    justify-content:flex-start;
    align-items:center;
}

/* -questions */

.mode-overview .questions.listy .list .item
{
    padding:0;
}

.mode-overview .questions.listy .list .item > div
{
    padding:0.25em;
    display:flex;
}

.mode-overview .questions.listy .list .num
{
    width:4em;
    background:red;
    justify-content:center;
    align-items:center;
    font-weight:bold;
    color:white;
}

.mode-overview .questions.listy .list .txt
{
    justify-content:flex-start;
    align-items:center;
    flex:1;
}
        
/* mode-welcome */
        
.mode-welcome .show-welcome
{
    display:flex;
}

.mode-welcome .show-welcome .left
{
    padding:0.5em;
}

.mode-welcome .show-welcome .right
{
    flex:1;
    padding:0.5em;
    text-align:left;
}

.mode-welcome .title-tbx
{
    width:100%;
    max-width:auto;
}


.mode-welcome .welcome-tbx
{
    height:15em;
    font-family:Arial, Helvetica, sans-serif;
    font-size:1em;
    padding:0.5em;
}

/* mode-result */

.mode-result .id-container
{
    display:flex;
}

.mode-result .id-container .left
{
    display:flex;
    align-items:center;
    justify-content:center;
    margin-right:0.5em;
}

.mode-result .id-container input[type=text].id-tbx
{
    width:5em;
}

.mode-result .id-container .right
{
    flex:1;
    display:flex;
    justify-content:flex-start;
    align-items:center;
}

.mode-result .title-tbx
{
    width:100%;
}

.mode-result .description-tbx
{
    height:15em;
}

/* mode-question */

/* -question bit */

.mode-question .question
{
    display:flex;
    padding:0;
}

.mode-question .num
{
    width:3em;
    background:red;
    color:white;
    font-size:2em;
    font-weight:bold;
    padding:1em;
}

.mode-question .question-tbx-container
{
    flex:1;
    padding:0.5em;
}

.mode-question .question-tbx-container textarea.question-tbx
{
    display:block;
    height:100%;
}

/* -answers list bit */

.mode-question .answers.listy .list .item
{
    display:block;
}

.mode-question .answers.listy .list .item .top
{
    display:flex;
    margin-bottom:0.5em;
}

.mode-question .answers.listy .list .item .answer-tbx-container
{
    flex:1;
    margin-right:0.5em;
}

.mode-question .answers.listy .list .item input[type=text].answer-tbx
{
    width:100%;
}

/* answers list points bit */

.mode-question .answers .points
{
    display:flex;
    flex-wrap:wrap;
}

.mode-question .answers .points .points-item
{
    display:flex;
    flex-direction:row;
    align-items:flex-start;
    justify-content:flex-start;
    margin-right:0.5em;
    border:solid 1px rgb(212,212,212);
    padding:0.25em;
    margin-bottom:0.25em;
    align-items:center;
}

.mode-question .answers .points .points-item:last-child
{
    margin-bottom:0;
}

.mode-question .answers .points .points-item .id
{
    margin-right:0.5em;
}

.mode-question .answers .points .points-item .controls input[type=text].num-tbx
{
    width:3em;
}

/* mode-preview */

.mode-preview
{
    margin-bottom:1em;
}

.mode-preview .errors
{
    border:solid 1px rgb(212,212,212);
    margin:0 auto;
    max-width:640px;
    padding:0.5em;
}

footer p
{
    font-size:0.8em;
    margin-bottom:0.5em;
}

/* mode-publish */

.mode-publish .errors
{
    margin-bottom:0;
}

/* big-dialog */

body.dialog-on
{
    overflow:hidden;
}

.dialog
{
    position:fixed;
    top:0;
    left:0;
    bottom:0;
    right:0;
    background:rgba(0,0,0,0.1);
    display:flex;
    align-items:center;
    justify-content:center;
    padding:2.5em 2.5em;
}

.dialog-panel
{
    width:100%;
    padding:0.7em 1em;
    background-color:white;
    width:576px;
    max-width:100%;
    height:100%;
    max-height:500px;
    -webkit-box-shadow: 0px 0px 1em 0px rgba(0,0,0,0.5);
    -moz-box-shadow: 0px 0px 1em 0px rgba(0,0,0,0.5);
    box-shadow: 0px 0px 1em 0px rgba(0,0,0,0.5);
    display:flex;
    flex-direction:column;
    overflow-y:hidden;
}

.dialog .top
{
    margin-bottom:0.7em;
}

.dialog .content
{
    flex:1;
    overflow-y:auto;
    padding:0 0.5em;
}

.dialog .bottom
{
    margin-top:0.7em;
    text-align:center;
}