@charset "utf-8";

header {
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: clamp(2rem, 1.5vw + 2rem, 5rem);
    font-family: 'Allura', cursive;
}


/* ----入力画面の設定 最初---- */

form {
    width: min(760px,90vw);
    padding: 30px 0;
    margin: 20px auto;
    display: flex;
    flex-flow: column nowrap;
}

form p {
    color: var(--primary-text-color);
    margin-bottom: 0.5em;
}

form span {
    display: inline-block;
    color: #fffffe;
    font-size: 0.8em;
    font-weight: bold;
    border-radius: 5px;
    padding: 1px 4px;
    margin-left: 8px;
}

.mandatory {
    background-color: #ff0000;
}

.optional {
    background-color: #373737;
    border: solid 1px #fffffe;
}

label {
    margin-bottom: 56px;
    position: relative;
}

input {
    display: inline-block;
    width: 100%;
}

input[name="belong"] {
    width: fit-content;
}

input[type="text"]:focus, input[type="email"]:focus {
    outline-style: none;
    outline-width: 0;
    box-shadow: 0 0 2px 3px var(--highlight-color);
}

input[type="text"] {
    width: min(420px, 100%);
    border-radius: 8px;
}

input[type="email"] {
    width: min(560px, 100%);
    border-radius: 8px;
}

textarea {
    width: 100%;
    aspect-ratio: 4.5;
    border-radius: 8px;
    position: relative;
}

textarea:focus {
    outline-style: none;
    outline-width: 0;
    box-shadow: 0 0 2px 3px var(--highlight-color);
}

.radio_p {
    display: inline-block;
    margin-left: 5px;
}

.radio_label {
    margin-bottom: auto;
}

#confirm {
    width: fit-content;
    flex-grow: 0;
    align-self: center;
    color: var(--primary-text-color);
    font-size: 1.2rem;
    font-weight: bold;
    padding: 10px 10px;
    border-radius: 14px;
    background-color: var(--highlight-color);
    border: 2px solid var(--secondary-text-color);
}

#confirm:hover {
    opacity: 0.7;
}

/* ----入力画面の設定 最後---- */


/* ----アラートの設定 最初---- */

.null_alart input, .null_alart textarea, .ruby_alart input, .mail_alart input, .belong_alart input {
    box-shadow: 0 0 2px 3px #ff0000;
}

.fullname::after, .ruby_alart::after, .mail_alart::after, .usertext::after, .belong_alart::after {
    position: absolute;
    top: 105%;
    left: 0;
    font-size: 0.8em;
    font-weight: bold;
    color: #ff0000;
}

.belong_alart:not(.radio_label)::after {
    content: '*どちらかを選択してください';
}

.fullname::after {
    content: '*お名前を入力してください';
}

.ruby_alart::after {
    content: '*正しいふりがなを入力してください';
}

.mail_alart::after {
    content: '*有効なメールアドレスを入力してください';
}

.usertext::after {
    content: '*お問い合わせ内容を入力してください';
}

/* ----アラートの設定 最後---- */


/* ----確認画面の設定 最初---- */

form div {
    margin-bottom: 56px;
}

.title {
    color: var(--secondary-text-color);
}

.notice {
    text-align: center;
}

.buttons {
    align-self: center;
}

#input {
    width: fit-content;
    flex-grow: 0;
    align-self: center;
    color: var(--highlight-color);
    font-size: 1.2rem;
    font-weight: bold;
    padding: 10px 10px;
    border-radius: 14px;
    background-color: var(--secondary-text-color);
    border: 2px solid var(--primary-text-color);
}

#input:hover {
    opacity: 0.7;
}

#send {
    width: fit-content;
    flex-grow: 0;
    align-self: center;
    color: var(--primary-text-color);
    font-size: 1.2rem;
    font-weight: bold;
    padding: 10px 10px;
    border-radius: 14px;
    background-color: var(--highlight-color);
    border: 2px solid var(--secondary-text-color);
}

#send:hover {
    opacity: 0.7;
}

/* ----確認画面の設定 最後---- */