/* カスタムモーダルスタイル */
.c-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.c-modal.show {
    display: flex;
    opacity: 1;
}

.c-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.c-modal__container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

/* スマホ対応 */
@media (max-width: 768px) {
    .c-modal__container {
        padding: 1rem;
        align-items: flex-start;
        padding-top: 10vh;
    }
    
    .c-modal__content {
        max-width: 100%;
        margin: 0;
        border-radius: 0.5rem;
    }
    
    .c-modal__title {
        font-size: 1.4rem;
    }
    
    .c-modal__message {
        font-size: 1.3rem;
        line-height: 1.5;
    }
    
    .c-modal__btn {
        font-size: 1.4rem;
        padding: 1.2rem 2rem;
    }
}

.c-modal__content {
    background-color: #fff;
    border-radius: 0.8rem;
    box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.3);
    max-width: 50rem;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.c-modal__header {
    padding: 2rem 2rem 1rem 2rem;
    border-bottom: 1px solid #e0e0e0;
}

.c-modal__title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #51493c;
    margin: 0;
    text-align: center;
    letter-spacing: 0.02em;
}

.c-modal__body {
    padding: 2rem;
}

.c-modal__message {
    font-size: 1.6rem;
    line-height: 1.6;
    color: #000;
    margin: 0;
    text-align: center;
    letter-spacing: 0.02em;
    white-space: pre-line;
}

.c-modal__footer {
    padding: 1rem 2rem 2rem 2rem;
    text-align: center;
}

.c-modal__btn {
    background-color: #e83428;
    color: #fff;
    border: none;
    border-radius: 0.8rem;
    padding: 1.2rem 3rem;
    font-size: 1.4rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-width: 8rem;
    display: inline-block;
}

.c-modal__btn:hover {
    background-color: #d02a1f;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(232, 52, 40, 0.3);
}

.c-modal__btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(232, 52, 40, 0.3);
}

.c-modal__btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(232, 52, 40, 0.3);
}

/* レスポンシブデザイン */
@media screen and (max-width: 767px) {
    .c-modal__container {
        padding: 1rem;
    }
    
    .c-modal__content {
        max-width: 100%;
        margin: 0 1rem;
    }
    
    .c-modal__header {
        padding: 1.5rem 1.5rem 1rem 1.5rem;
    }
    
    .c-modal__title {
        font-size: 1.6rem;
    }
    
    .c-modal__body {
        padding: 1.5rem;
    }
    
    .c-modal__message {
        font-size: 1.4rem;
    }
    
    .c-modal__footer {
        padding: 1rem 1.5rem 1.5rem 1.5rem;
    }
    
    .c-modal__btn {
        font-size: 1.4rem;
        padding: 1rem 2.5rem;
        width: 100%;
        max-width: 20rem;
    }
}

/* エラーモーダル用のバリエーション */
.c-modal--error .c-modal__title {
    color: #e83428;
}

.c-modal--error .c-modal__btn {
    background-color: #e83428;
}

.c-modal--error .c-modal__btn:hover {
    background-color: #d02a1f;
}

/* 成功モーダル用のバリエーション */
.c-modal--success .c-modal__title {
    color: #28a745;
}

.c-modal--success .c-modal__btn {
    background-color: #28a745;
}

.c-modal--success .c-modal__btn:hover {
    background-color: #218838;
}

/* 警告モーダル用のバリエーション */
.c-modal--warning .c-modal__title {
    color: #ffc107;
}

.c-modal--warning .c-modal__btn {
    background-color: #ffc107;
    color: #000;
}

.c-modal--warning .c-modal__btn:hover {
    background-color: #e0a800;
}
