/**
 * Common Styles for Recruitment Forms
 * Based on the design of https://www.ka-anken.co.jp/contact/index.php
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Yu Gothic Medium", "游ゴシック Medium", YuGothic, "游ゴシック体", "ヒラギノ角ゴ Pro W3", "メイリオ", sans-serif;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    background-color: #fff;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

h1 {
    font-size: 26px;
    margin-bottom: 30px;
    color: #333;
    font-weight: bold;
}

h2 {
    font-size: 20px;
    margin: 40px 0 20px;
    color: #333;
    font-weight: bold;
}

h3 {
    font-size: 18px;
    margin: 30px 0 15px;
    color: #333;
    font-weight: bold;
}

p {
    margin-bottom: 15px;
    line-height: 1.8;
}

/* Required field indicator */
.required {
    display: inline-block;
    padding: 3px 8px;
    background-color: #D90000;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    border-radius: 3px;
    margin-left: 8px;
    vertical-align: middle;
}

/* Help block */
.help-block {
    color: #666;
    font-size: 12px;
    margin: 5px 0;
    line-height: 1.5;
}

/* Form control base */
.form-control {
    padding: 8px 10px;
    border: 1px solid #ccc;
    background-color: #fff;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.5;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #009bd2;
}

/* Width classes */
.w100p {
    width: 100%;
}

.w90p {
    width: 90%;
}

.w50p {
    width: 50%;
}

.w40p {
    width: 40%;
}

.w20p {
    width: 20%;
}

/* Responsive width classes */
@media (max-width: 800px) {
    .sp-w50p {
        width: 50%;
    }
}

/* Table form styles */
.table-form {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    border: 1px solid #ddd;
}

.table-form tr {
    border-bottom: 1px solid #e0e0e0;
}

.table-form th {
    width: 30%;
    padding: 20px 15px;
    text-align: left;
    font-weight: bold;
    vertical-align: top;
    background-color: #f2fafd;
    color: #333;
    border-right: 1px solid #ddd;
}

.table-form td {
    padding: 20px 15px;
    vertical-align: top;
}

/* Table line styles (for info tables) */
.table-line {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.table-line th,
.table-line td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    text-align: left;
}

.table-line th {
    background-color: #f0f0f0;
    font-weight: bold;
    width: 30%;
}

/* Textarea */
textarea.form-control {
    min-height: 150px;
    resize: vertical;
    font-family: inherit;
}

/* Select */
select.form-control {
    cursor: pointer;
    padding-right: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Radio button inline layout */
.radio-group-inline {
    display: flex;
    gap: 20px;
    align-items: center;
}

.radio-group-inline label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.radio-group-inline input[type="radio"] {
    margin-right: 5px;
    cursor: pointer;
}

/* Topicpath (Breadcrumb Navigation) */
.topicpath {
    width: 100%;
    min-width: 320px;
    margin: 0;
    padding: 10px 3.125%;
}

@media screen and (min-width: 835px), print {
    .topicpath {
        width: 960px;
        min-width: inherit;
        margin: 0 auto;
        padding: 30px 0;
    }
}

.topicpath ul {
    margin: 0;
    padding: 0;
    line-height: 1.1;
    text-align: left;
    list-style: none;
}

.topicpath ul li {
    position: relative;
    display: inline;
    margin-top: 0;
    margin-right: 0.8em;
    padding: 0;
    font-size: 1.0rem;
    line-height: 1.1;
    vertical-align: top;
}

@media screen and (min-width: 835px), print {
    .topicpath ul {
        text-align: right;
    }
    .topicpath ul li {
        display: inline-block;
        font-size: 1.3rem;
    }
}

.topicpath ul li + li {
    padding-left: 2em;
}

.topicpath ul li + li:before {
    position: absolute;
    display: block;
    top: 0.5em;
    left: 0;
    content: "";
    width: 0.6em;
    height: 0.6em;
    border-top: 1px solid #000;
    border-right: 1px solid #000;
    -webkit-transform: rotate(45deg);
    transform: rotate(45deg);
    vertical-align: middle;
}

@media screen and (min-width: 835px), print {
    .topicpath ul li + li:before {
        top: 0.3em;
    }
}

/* Button styles */
.btn {
    -webkit-box-sizing: border-box !important;
    box-sizing: border-box !important;
    color: #fff !important;
    padding: 1em 2em !important;
    text-align: center !important;
    text-decoration: none !important;
    display: inline-block !important;
    margin: 10px 12px !important;
    border: solid 1px #0064b4 !important;
    border-radius: 0 !important;
    font-size: 18px !important;
    background: #0064b4 !important;
    -ms-touch-action: manipulation;
    touch-action: manipulation;
    cursor: pointer !important;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background-image: none !important;
}

.btn:focus,
.btn:active:focus,
.btn.active:focus,
.btn.focus,
.btn:active.focus,
.btn.active.focus {
    outline: thin dotted;
    outline: 5px auto -webkit-focus-ring-color;
    outline-offset: -2px;
}

.btn:hover,
.btn:focus,
.btn.focus {
    color: #0064b4 !important;
    border-color: #0064b4 !important;
    background: #fff !important;
    text-decoration: none !important;
}

.btn:active,
.btn.active {
    background-image: none !important;
    outline: 0;
}

.form-group .btn {
    margin: 10px 12px !important;
    cursor: pointer;
}

a.btn,
a.btn:visited {
    color: #fff !important;
}

a.btn:hover {
    color: #0064b4 !important;
}

/* Text utilities */
.txtCenter {
    text-align: center;
}

.txtLarge {
    font-size: 16px;
}

.txtSmall {
    font-size: 12px;
}

/* Form group - center alignment for buttons */
.form-group.txtCenter {
    margin-top: 40px;
    margin-bottom: 30px;
}

.form-group.txtCenter .btn {
    margin: 10px 12px !important;
}

/* Error message styles */
.error-message {
    background-color: #fff0f0;
    border: 2px solid #D90000;
    color: #c0392b;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 4px;
}

.error-message p {
    margin-bottom: 10px;
    font-weight: bold;
}

.error-message ul {
    list-style-position: inside;
    margin-left: 10px;
}

.error-message li {
    margin-bottom: 5px;
}

/* Confirmation table styles */
.confirm-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    border: 1px solid #ddd;
}

.confirm-table tr {
    border-bottom: 1px solid #e0e0e0;
}

.confirm-table th {
    width: 30%;
    padding: 20px 15px;
    text-align: left;
    font-weight: bold;
    vertical-align: top;
    background-color: #f2fafd;
    color: #333;
    border-right: 1px solid #ddd;
}

.confirm-table td {
    padding: 20px 15px;
    vertical-align: top;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Success message styles */
.success-message {
    background-color: #e8f5e9;
    border: 2px solid #4caf50;
    color: #2e7d32;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 4px;
    text-align: center;
}

.success-message p {
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.8;
}

/* Link styles */
a {
    color: #009bd2;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 800px) {
    .container {
        padding: 20px 10px;
    }

    h1 {
        font-size: 22px;
    }

    .table-form th,
    .table-form td {
        display: block;
        width: 100%;
    }

    .table-form th {
        padding-bottom: 10px;
    }

    .table-form td {
        padding-top: 10px;
    }

    .confirm-table th,
    .confirm-table td {
        display: block;
        width: 100%;
    }

    .confirm-table th {
        padding-bottom: 10px;
    }

    .confirm-table td {
        padding-top: 10px;
    }

    .form-group.txtCenter .btn {
        display: block;
        width: 100%;
        margin: 10px 0;
    }

    .w100p,
    .w90p,
    .w50p,
    .w40p,
    .w20p {
        width: 100%;
    }

    .radio-group-inline {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Print Styles */
@media print {
    .btn {
        display: none;
    }

    .form-group.txtCenter {
        display: none;
    }
}
