/*
 * --- 画面上部・下部 著者エリア共通スタイル ---
 */
.author-area {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px 0;
}

.author-area p {
    margin-top: 0;
}

/* 著者 */
.author-area .author {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.author-area .author .author__item {
    display: flex;
    flex-direction: column;
}

.author-area .author .author__role {
    font-weight: bold;
    color: #ff789f;
}

/* クレジット */
.author-area .credit .credit__role {
    font-weight: bold;
    color: #ff789f;
}

/* 初出 */
.author-area .source-wrapper {
    position: relative;
}

.author-area .source-wrapper .source__source-text {
    font-weight: bold;
    color: #999;
}

.author-area .source-wrapper .source__magazine-title {
    cursor: pointer;
}

.author-area .source-wrapper .source__magazine-title:hover {
    color: #999;
}

/*
 * --- 画面上部 著者エリア用スタイル ---
 */
.upper-author-area {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px 0;
}

/* 著者 */
.upper-author-area .author {
    gap: 8px;
}

.upper-author-area .author .author__item {
    gap: 16px;
}

.upper-author-area .author .author__title-wrapper {
    position: relative;
}

.upper-author-area .author .author__name {
    cursor: pointer;
}

.upper-author-area .author .author__name:hover {
    color: #999;
}

/*
 * --- 画面下部 著者エリア用スタイル ---
 */
.lower-author-area {
    margin-top: 24px;
}

/* 著者 */
.lower-author-area .author {
    border-top: #000 1px solid;
    border-bottom: #000 1px solid;
    padding: 24px 0;
    gap: 24px;
}

.lower-author-area .author .author__title {
    font-size: 16px;
    margin-bottom: 12px;
}

.lower-author-area .author .author__link {
    line-height: 1.8;
    width: fit-content;
    margin: 14px 0 0 auto;
    color: #000;
}

.lower-author-area .author .author__link:hover {
    color: #999;
}

/*
 * --- 著者POPUP ---
 */
.author-popup {
    --passing-left-value: 50%; /* 擬似要素に受け渡す用のleftの値 */
    z-index: 10;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    border: #ff789f 1px solid;
    padding: 16px;
    width: 400px;
    background-color: #fff;
    box-shadow: rgb(0 0 0 / 15%) 0 2px 6px;
    transform: scale(0);
    opacity: 0;
    transform-origin: top;
}

/* フキダシ */
.author-popup::before {
    content: "";
    position: absolute;
    bottom: calc(100% + 0.75px);
    left: var(--passing-left-value);
    width: 0;
    height: 0;
    border: 9px solid transparent;
    border-bottom-color: #ff789f;
    transform: translateX(-50%);
}

/* フキダシ */
.author-popup::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: var(--passing-left-value);
    width: 0;
    height: 0;
    border: 8px solid transparent;
    border-bottom-color: #fff;
    transform: translateX(-50%);
}

.author-popup.active {
    animation: showPopup 0.1s ease-out forwards;
}

.author-popup .author-popup__title {
    display: flex;
    gap: 16px;
}

.author-popup .author-popup__avatar {
    width: 56px;
    height: 56px;
    border-radius: 100%;
}

.author-popup .author-popup__title-text {
    /* POPUP - POPUPの左右padding - アイコン画像 - アイコン画像とタイトルの間の余白 - 閉じるボタン */
    width: calc(400px - 16px * 2 - 56px - 16px - 24px) ;
}

.author-popup .author-popup__name {
    font-size: 16px;
    font-weight: bold;
}

.author-popup .author-popup__role {
    color: #ff789f;
}

.author-popup .author-popup__description {
    width: 100%;
    overflow: hidden;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.author-popup .author-popup__link {
    display: block;
    width: fit-content;
    width: fit-content;
    margin: 0 0 0 auto;
    color: #000;
}

.author-popup .author-popup__link:hover {
    color: #999;
}

/* デフォルトのbuttonのスタイルを削除 */
.author-popup button.author-popup__button {
    border: none;
    background-color: transparent;
    font: inherit;
    outline: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    appearance: none;
}

/* 閉じるボタン */
.author-popup .author-popup__button {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 24px;
    height: 24px;
}

.author-popup .author-popup__button::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 1px;
    background-color: #000;
    transform: translate(-50%, -50%) rotate(45deg);
}

.author-popup .author-popup__button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 1px;
    background-color: #000;
    transform: translate(-50%, -50%) rotate(-45deg);
}

/*
 * --- 初出POPUP ---
 */
.source-popup {
    --passing-left-value: 50%; /* 擬似要素に受け渡す用のleftの値 */
    z-index: 10;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    display: flex;
    gap: 16px;
    border: #ff789f 1px solid;
    padding: 16px;
    width: 400px;
    background-color: #fff;
    box-shadow: rgb(0 0 0 / 15%) 0 2px 6px;
    transform: scale(0);
    opacity: 0;
    transform-origin: top;
}

/* フキダシ */
.source-popup::before {
    content: "";
    position: absolute;
    bottom: calc(100% + 0.75px);
    left: var(--passing-left-value);
    width: 0;
    height: 0;
    border: 9px solid transparent;
    border-bottom-color: #ff789f;
    transform: translateX(-50%);
}

/* フキダシ */
.source-popup::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: var(--passing-left-value);
    width: 0;
    height: 0;
    border: 8px solid transparent;
    border-bottom-color: #fff;
    transform: translateX(-50%);
}

.source-popup.active {
    animation: showPopup 0.1s ease-out forwards;
}

.source-popup .source-popup__shoei {
    width: 132px;
    height: 169px;
}

.source-popup .source-popup__info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.source-popup .source-popup__title {
    display: flex;
    gap: 8px;
}

.source-popup .source-popup__logo {
    width: auto;
    height: 32px;
}

.source-popup .source-popup__issue-text {
    display: flex;
    align-items: flex-end;
    line-height: 1;
    margin: auto 0 0;
}

.source-popup .source-popup__issue-text-value {
    display: block;
    font-size: 20px;
}

.source-popup .source-popup__issue-text-unit {
    display: block;
    font-size: 16px;
}

.source-popup .source-popup__detail {
    display: flex;
    gap: 16px;
}

.source-popup .source-popup__overview {
    width: 100%;
    overflow: hidden;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.source-popup .source-popup__link {
    display: block;
    width: fit-content;
    width: fit-content;
    margin: auto 0 0 auto;
    color: #000;
}

.source-popup .source-popup__link:hover {
    color: #999;
}

/* デフォルトのbuttonのスタイルを削除 */
.source-popup button.source-popup__button {
    border: none;
    background-color: transparent;
    font: inherit;
    outline: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    appearance: none;
}

/* 閉じるボタン */
.source-popup .source-popup__button {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 24px;
    height: 24px;
}

.source-popup .source-popup__button::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 1px;
    background-color: #000;
    transform: translate(-50%, -50%) rotate(45deg);
}

.source-popup .source-popup__button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 1px;
    background-color: #000;
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* POPUP表示時のアニメーション */
@keyframes showPopup {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}
