/* Common */
html {
    height: 100%;
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

body {
    height: 100%;
    margin: 0;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", Meiryo,sans-serif;
    font-size: 18px;
    background-color: floralwhite;
    color: #5f414b;
}

.show { display: block; }
.hide { display: none; }

.common-width {width: 100%; }

.error { color: crimson; }

a { color: steelblue; }
a:hover { color: lightsteelblue; }
a:visited { color: mediumpurple; }

/* Wrapper */
.wrapper {
    width: 1200px;
    max-width: 1200px;
    height: 100%;
    margin-right: auto;
    margin-left: auto;
    padding: 229px 0 80px 0;
    position: relative;
    background-image: url("../image/img_logo.png");
    background-position: top -80px right -130px;
    background-size: 50%;
    background-repeat: no-repeat;
}

/* Header */
header {
    height: 125px;
    min-height: 125px;
    padding-top: 5px;
    padding-bottom:10px;
    position: absolute;
    top: 0;
    left: 0;
}

header > h1 {
    margin: 15px 0;
}

header > p {
    margin:10px 0;
    font-size: 20px;
}

/* TabMenu */
/* Whole */
.tab {
    position: absolute;
    top: 133px;
    left: 0;
    z-index: 10;
}

/* Tab Menu */
.tab-menu {
    height: 40px;
    min-height: 40px;
    margin: 0;
    padding: 0;
    display: flex;
}

.tab-menu > li {
    display: flex;
    align-items: center;
    border:1px solid steelblue;
    border-top-right-radius: 10px;
    border-top-left-radius: 10px;
    list-style: none;
    background-color: white;
}

.tab-menu > li + li {
    margin-left: -1px;
}

.tab-menu > li:first-child {
    border-bottom-left-radius: 0;
}

.tab-menu > li:last-child {
    border-bottom-right-radius: 0;
}

.tab-menu > li.active {
    background-color: steelblue;
}

.tab-menu > li > a {
    padding:8px 15px 12px 15px;
    display: block;
    vertical-align: middle;
    text-decoration: none;
    color: steelblue;
}

.tab-menu > li.active > a {
    color: floralwhite;
}

/* Tab Contents */
.tab-contents {
    height: 57px;
    min-height: 57px;
    margin-top: -1px;
    display: flex;
    align-items: center;
    border: 1px solid ;
    border-color: steelblue steelblue #5f414b steelblue;
    color: #5f414b;
    background-color: white;
}

.tab-content {
    padding: 15px 15px;
}

.tab-content.hide {
    opacity: 0;
}

.tab-content.show {
    opacity: 1;
    animation: fadeIn 0.3s ease-in 0s forwards;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Form */
.tab-content > label + label {
    margin-left: 10px;
}

.tab-content > input[type=checkbox] + label,
.tab-content > input[type=radio] + label {
    margin-right: 33px;
}

.tab-content > label > input {
    margin-right: 3px;
    margin-left: 3px;
}

.tab-content > label > input[type=number] {
    width: 60px;
    height: 24px;
    padding: 3px;
    border: 1px solid #5f414b;
    border-radius: 3px;
    font-size: 18px;
}

.tab-content > input[type=checkbox],
.tab-content > input[type=radio] {
    display: none;
}

.tab-content > label.checkbox,
.tab-content > label.radio {
    margin-right: 20px;
    display: inline-block;
    position: relative;
}

.tab-content > label.checkbox::before {
    width: 18px;
    height: 18px;
    margin-top: -8px;
    margin-left: 5px;
    display: block;
    position: absolute;
    top: 50%;
    right: -21px;
    border: 2px solid #a89dac;
    border-radius: 3px;
    content: '';
}

.tab-content > label.checkbox::after {
    width: 8px;
    height: 13px;
    margin-top: -7px;
    margin-left: 5px;
    display: inline-block;
    position: absolute;
    top: 50%;
    right: -17px;
    border: solid steelblue;
    border-width: 0 3px 4px 0;
    transform: rotate(45deg);
    content: '';
    opacity: 0;
}

.tab-content > label.radio::before {
    width: 18px;
    height: 18px;
    margin-top: -8px;
    margin-left: 5px;
    display: block;
    position: absolute;
    top: 50%;
    right: -21px;
    border: 2px solid #a89dac;
    border-radius: 50%;
    content: '';
}

.tab-content > label.radio::after {
    width: 10px;
    height: 10px;
    margin-top: -4px;
    margin-left: 10px;
    display: inline-block;
    position: absolute;
    top: 50%;
    right: -17px;
    border: 1px solid steelblue;
    border-radius: 50%;
    background-color: steelblue;
    content: '';
    opacity: 0;
}

.tab-content > input[type=checkbox]:checked + label.checkbox::after,
.tab-content > input[type=radio]:checked + label.radio::after {
    opacity: 1;
}

.tab-content > label > input:focus {
    background-color: lavender;
    outline: 0;
}

.tab-content >  button {
    padding: 7px 10px;
    border: 1px solid steelblue;
    border-radius: 5px;
    cursor: pointer;
    color: white;
    background-color: steelblue;
}

.tab-content > label:not(.checkbox, .radio) + button,
.tab-content > input + button {
    margin-left: 10px;
}

.tab-content > button:hover {
    border: 1px solid lightsteelblue;
    background-color: lightsteelblue;
}

/* Preview Area */
.preview-area {
    height: 100%;
    margin: 0;
    padding: 0;
    position: relative;
    text-align: center;
    border: solid #5f414b;
    border-width: 0 1px 0 1px;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(200, 200, 200, 0.3)), url("../image/img_bg.gif"), repeat;
}

.preview-area > .status-bar {
    width: 100%;
    height: 20px;
    padding-left: 10px;
    position: absolute;
    bottom: 0;
    font-size: 0.8em;
    text-align: left;
    color: white;
    background: rgba(0,0,0,0.5);
}

.preview-area > .button-area {
    width: 60px;
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 2;
}

.preview-area > .button-area > a#file-reset { background: url("../image/img_reset.png"); }
.preview-area > .button-area > a#download { background: url("../image/img_download.png"); }

.preview-area > .button-area > a#file-reset,
.preview-area > .button-area > a#download {
    width: 60px;
    height: 60px;
    margin: 0;
    padding: 0;
    background-size: contain;
    opacity: 0.5;
    cursor: pointer;
}

.preview-area > .button-area > a#file-reset:hover,
.preview-area > .button-area > a#download:hover {
    opacity: 0.8;
}

.image {
    width: 100%;
    height: 100%;
    object-fit: scale-down;
}

/* Upload Area */
.upload-area {
    margin: 0;
    padding: 10px 0;
    height: 80px;
    min-height: 80px;
    position: absolute;
    bottom:0;
    left: 0;
    text-align: center;
    border: solid #5f414b;
    border-width: 1px 1px 0 1px;
    color: lavender;
    background-color: #71686c;
}

#file-input {
    position: relative;
    z-index: 2;
}

.drop {
    margin-right: auto;
    margin-left: auto;
    position: absolute;
    top: 229px;
    bottom: 0;
    right: 0;
    left: 0;
    z-index: 1;
}

/* DarkMode */
@media (prefers-color-scheme: dark) {
    body {
        color: floralwhite;
        background-color: #524e4d;
    }

    .tab-menu > li {
        border-color: #595857;
        background-color: #433d3c;
    }

    .tab-menu > li > a { color: floralwhite; }

    .tab-contents {
        border-color: #595857 #302833 #302833 #302833;
        color: floralwhite;
        background-color: #433d3c;
    }
    .preview-area { border-color: #302833; }
    .upload-area { border-color: #302833; }
}
