/* モーダルの基本スタイル */
.kirokubo-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.kirokubo-modal.show {
    display: block;
    opacity: 1;
}

.kirokubo-modal__content {
    position: relative;
    background-color: #fff;
    width: 80%;
    max-width: 600px;
    max-height: 80vh;
    margin: 10vh auto;
    padding: 30px;
    border-radius: 12px;
    transform: translateY(-20px);
    transition: transform 0.3s ease-in-out;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.kirokubo-modal.show .kirokubo-modal__content {
    transform: translateY(0);
}

.kirokubo-modal__body {
    position: relative;
    margin-top: 20px;
    padding-right: 5px; /* スクロールバー分の余白 */
}

/* スクロールバーのスタイル */
.kirokubo-modal__content::-webkit-scrollbar {
    width: 8px;
}

.kirokubo-modal__content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.kirokubo-modal__content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.kirokubo-modal__content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* モーダルを閉じるボタンを固定 */
.kirokubo-modal__close {
    position: sticky;
    top: 0;
    right: 20px;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    background-color: #fff;
    z-index: 1;
}

.kirokubo-modal__close:hover {
    color: #e60012;
    background-color: rgba(230,0,18,0.1);
}

/* 説明ブロックのスタイル */
.kirokubo-description {
    margin-bottom: 35px;
    text-align: center;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.kirokubo-description__title {
    font-size: 26px;
    margin-bottom: 20px;
    color: #333;
    font-weight: bold;
    position: relative;
    display: inline-block;
}

.kirokubo-description__title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background-color: #e60012;
}

.kirokubo-description__text {
    font-size: 13px;
    line-height: 1.8;
    margin-bottom: 25px;
    color: #555;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.kirokubo-description__list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.kirokubo-description__item {
    margin-bottom: 10px;
    color: #333;
    font-size: 14px;
    padding-left: 28px;
    position: relative;
}

.kirokubo-description__item:last-child {
    margin-bottom: 0;
}

.kirokubo-description__item::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #e60012;
    font-weight: bold;
}

.kirokubo-description__emphasis {
    color: #e60012;
    font-weight: bold;
    font-size: 1.1em;
}

/* フォームのスタイル */
.kirokubo-form {
    max-width: 400px;
    margin: 0 auto;
    padding: 25px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.kirokubo-form__group {
    margin-bottom: 20px;
}

.kirokubo-form__label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: bold;
    font-size: 15px;
}

.kirokubo-form__input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.kirokubo-form__input:focus {
    outline: none;
    border-color: #e60012;
    box-shadow: 0 0 0 3px rgba(230,0,18,0.1);
}

.kirokubo-form__submit {
    width: 100%;
    padding: 15px;
    background-color: #e60012;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.kirokubo-form__submit:hover {
    background-color: #cc0010;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(230,0,18,0.2);
}

.kirokubo-form__submit:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* メッセージのスタイル */
.kirokubo-message-container {
    margin-bottom: 20px;
}

.kirokubo-message {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    display: none;
    font-size: 15px;
    line-height: 1.6;
    text-align: center;
}

.kirokubo-message br.sp-only {
    display: none;
}

.kirokubo-message--success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.kirokubo-message--error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
    .kirokubo-modal__content {
        width: 95%;
        margin: 5vh auto;
        padding: 20px;
        max-height: 90vh; /* モバイルではより大きく */
    }

    .kirokubo-modal__close {
        position: sticky;
        top: 0;
        right: 10px;
    }

    .kirokubo-description {
        padding: 15px;
    }

    .kirokubo-description__title {
        font-size: 22px;
    }

    .kirokubo-description__text {
        font-size: 14px;
    }

    .kirokubo-description__item {
        font-size: 14px;
    }

    .kirokubo-form {
        padding: 15px;
    }

    .kirokubo-message {
        font-size: 13px;
        padding: 12px;
    }

    .kirokubo-message br.sp-only {
        display: block;
    }
}

/* 本サイト登録へのリンク */
.kirokubo-form__alt-link {
    text-align: center;
    padding-top: 25px;
    font-size: 12px;
    font-weight: bold;
}

.kirokubo-form__alt-link a {
    color: #007bff; /* 青系の色 */
    text-decoration: underline;
    transition: color 0.3s ease;
    font-size: 14px;
}

.kirokubo-form__alt-link a:hover {
    color: #0056b3; /* ホバー時の色 */
} 