
/* =========================================================
   Photo Group
   ========================================================= */

.photo-group {

    width: 100%;
    box-sizing: border-box;

}



/* ---------------------------------------------------------
   Photo trigger
   --------------------------------------------------------- */

.photo-trigger {
    position: absolute;
    top: 0;
    transform: translateY(-50%);

    z-index: 1;

    display: flex;
    align-items: center;

    gap: .5rem;

    width: fit-content;

    box-sizing: border-box;

    padding: 0;

    border: 0;
    background: transparent;

    font: inherit;

    cursor: pointer;
    pointer-events: none;
}

.photo-trigger,
.photo-content {
    pointer-events: auto;
}

.photo-group.photo-right
.photo-trigger {
    left: calc(
        50% + var(--branch-length)
    );

    flex-direction: row;
}

.photo-group.photo-left
.photo-trigger {
    right: calc(
        50% + var(--branch-length)
    );

    flex-direction: row-reverse;
}


/* ---------------------------------------------------------
   Photo branch
   --------------------------------------------------------- */

.photo-branch {
    position: absolute;

    top: 0;

    width: var(--branch-length, 30px);
    height: 2px;

    background: #000;

    pointer-events: none;

    z-index: 0;
}

.photo-group.photo-right
.photo-branch {
    left: 50%;
}

.photo-group.photo-left
.photo-branch {
    right: 50%;
}


/* ---------------------------------------------------------
   Photo trigger contents
   --------------------------------------------------------- */

.photo-symbol {
    display: block;

    width: .8rem;
    height: .8rem;

    border-radius: 50%;

    background: #000;

    transition:
        transform .2s ease;
}

.photo-symbol-multiple {
    position: relative;

    background: transparent;
}

.photo-symbol-multiple::before,
.photo-symbol-multiple::after {
    content: "";

    position: absolute;

    width: .8rem;
    height: .8rem;


    border: 2px solid #000;

    background: #fff;
    
    box-sizing: border-box;

    border-radius: 50%;
}

/* 뒤쪽 empty circle */
.photo-symbol-multiple::before {
    left: -3px;


}

/* 앞쪽 solid circle */
.photo-symbol-multiple::after {
    left: 3px;

    background: #000;
}


.photo-trigger:hover
.photo-symbol {
    transform: scale(1.2);
}

.photo-trigger:hover
.photo-title {
    color: var(--red);
}

.photo-title {
    display: block;

    max-width: 300px;

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.photo-trigger:hover
.photo-symbol {
    transform: scale(1.2);
}

.photo-trigger:hover
.photo-title {
    color: var(--red);
}


/* =========================================================
   Photo Viewer
   ========================================================= */

.photo-content {
    position: relative;
    z-index: 2;

    width: auto;
    max-width: calc(100% - 2rem);

    margin-left: auto;
    margin-right: auto;
    margin-top: 2rem;

    height: 0;
    overflow: hidden;

    box-sizing: border-box;

    background: #fff;

    border: 0;

    pointer-events: auto;

    transition:
        height .5s ease;
}

.photo-group.is-open {
    padding-bottom: 3rem;
}

.photo-group.is-open
.photo-content {
    border: 3px solid #000;
}

.photo-group.is-open
.photo-symbol,
.photo-group.is-open
.photo-title {
    color: var(--red);
}

.photo-group.is-open
.photo-symbol,
.photo-group.is-open
.photo-branch {
    background: var(--red);
}

.photo-group.is-open
.photo-title {
    font-weight: 700;
}

.photo-inner {
    padding: 1.5rem;
}


/* ---------------------------------------------------------
   Photo
   --------------------------------------------------------- */

.photo-viewer {
    width: 100%;

    overflow: hidden;

    padding-bottom: 1.5rem;

    border-bottom: 3px solid #000;
}

.photo-image-container {
    width: 100%;
}

.photo-image {
    display: block;

    width: auto;
    max-width: 100%;
    height: auto;

    margin: 0 auto;

    box-shadow:
        3px 3px 10px rgba(0, 0, 0, .15);
}


/* ---------------------------------------------------------
   Photo navigation
   --------------------------------------------------------- */

.photo-navigation {
    display: flex;

    justify-content: center;
    align-items: center;

    gap: 1rem;

    margin-top: .5rem;
}

.photo-navigation button {
    border: 0;
    background: transparent;

    padding: .2rem .5rem;

    font-size: 1.5rem;
    line-height: 1;

    cursor: pointer;
}

.photo-navigation button:disabled {
    opacity: .25;
    cursor: default;
}

.photo-counter {
    min-width: 3em;

    text-align: center;

    font-size: 1rem;
    color: #000;
}


/* ---------------------------------------------------------
   Photo meta
   --------------------------------------------------------- */

.photo-meta {
    display: flex;

    justify-content: flex-start;
    align-items: center;

    gap: 1rem;

    font-size: 1rem;
    color: #000;
}

.photo-meta-icon {
    margin-right: .25rem;
}

.photo-meta-row {
    display: flex;

    align-items: center;
    justify-content: space-between;

    margin-bottom: .5rem;
}

.photo-close {
    border: 0;
    background: none;

    padding: 0;

    font-size: 1.5rem;
    line-height: 1;

    color: #000;

    cursor: pointer;
}

.photo-close:hover {
    color: var(--red);
}


/* ---------------------------------------------------------
   Photo description
   --------------------------------------------------------- */

.photo-description {
    margin-top: .75rem;
    margin-bottom: 0;

    padding: .75rem 1rem;

    background: #fafafa;

    border: 1px solid #e6e6e6;
    border-radius: 4px;

    font-size: .85rem;
    line-height: 1.5;
}

.photo-description-title {
    margin-bottom: .3rem;

    font-size: 1.17rem;
    font-weight: 700;
}

.photo-description-text {
    font-size: 1rem;
}


/* =========================================================
   Photo Comments
   ========================================================= */

.photo-comments .comment-list-title {
    margin-top: 1rem;
}

.photo-comments .comment-editor-title {
    margin-top: 1.5rem;
}

.comment-write,
.comment-footer {
    margin: 0;
}

@media screen and (max-width: 767px) {

    /* Photo trigger */

    .photo-branch {
        width: 15px;
    }

    .photo-group.photo-right
    .photo-trigger {
        left: calc(50% + 15px);

        flex-direction: row;
    }

    .photo-group.photo-left
    .photo-trigger {
        right: calc(50% + 15px);

        flex-direction: row-reverse;
    }

    .photo-trigger {
        padding: 0;
    }

    .photo-title {
        max-width: 160px;

    }
}