/* =========================================================
   날씨보고 정했다! 이곳 좋수다 - weekend.css
   ========================================================= */

/* 1. 기본 레이아웃 */
.weekend-container,
.weekend-container * {
    box-sizing: border-box;
}

.weekend-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 24px 16px;
    color: #334155;
    font-family: "Malgun Gothic", "맑은 고딕", sans-serif;
}

.weekend-container button {
    font-family: inherit;
}

/* 2. 이번 주말 추천 장소: 제목과 최신 콘텐츠 버튼 */
.weekend-container .weekend-current-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 10px;
    margin-bottom: 20px;
}

.weekend-container .weekend-current-header h2 {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding-left: 12px;
    border-left: 4px solid #2f78ad;
    color: #203b5d;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.5;
    word-break: keep-all;
}

.weekend-container .weekend-latest-button {
    flex-shrink: 0;
    padding: 9px 13px;
    border: 1px solid #c8dced;
    border-radius: 7px;
    background: #f0f7fd;
    color: #205c91;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.weekend-container .weekend-latest-button[hidden] {
    display: none;
}

.weekend-container .weekend-latest-button:hover {
    background: #dfeefb;
}

.weekend-container .weekend-latest-button:focus-visible {
    outline: 2px solid #205c91;
    outline-offset: 2px;
}

/* 3. 추천 장소 이미지: 모서리 및 클릭 영역 */
.weekend-container .weekend-image {
    width: 100%;
    border-radius: 12px;
    /* 확대 안내 문구까지 포함하므로 여기서는 overflow를 숨기지 않음 */
}

.weekend-container .weekend-image-button {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 12px;
    overflow: hidden;
    background: transparent;
    line-height: 0;
    cursor: zoom-in;
}

.weekend-container .weekend-image-button img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.weekend-container .weekend-image-button:focus-visible {
    outline: 3px solid #2f78ad;
    outline-offset: 3px;
}

/* 4. 이미지 확대 안내: SVG 돋보기 */
.weekend-container .weekend-zoom-guide {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: fit-content;
    max-width: 100%;
    margin: 16px auto 0;
    padding: 11px 20px;
    border: 1px solid #d5e8fa;
    border-radius: 999px;
    background: #eaf4ff;
    color: #205c91;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    word-break: keep-all;
}

.weekend-container .weekend-zoom-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M15.5 15.5L21 21M10.5 7v7M7 10.5h7' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M15.5 15.5L21 21M10.5 7v7M7 10.5h7' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* 5. 지난 추천 장소 영역 */
.weekend-container .weekend-history {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.weekend-container .weekend-history-header {
    margin-bottom: 20px;
}

/* 지난 추천 장소 제목 */
.weekend-container .weekend-history-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 12px;
    color: #1e3a5f;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.5;
}

/* 제목 아이콘 - 코랄색 포인트 */
.weekend-container .weekend-history-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    background: #fdece8;
    color: #e65b45;
    border-radius: 11px;
}

.weekend-container .weekend-history-title-icon svg {
    display: block;
    width: 23px;
    height: 23px;
}

/* 지난 추천 장소 설명 */
.weekend-container .weekend-history-header p {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.7;
    word-break: keep-all;
}

/* 6. 지난 추천 장소 목록 */
.weekend-container .weekend-history-list {
    background: #fff;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    overflow: hidden;
    padding: 0;
}

.weekend-container .weekend-history-item {
    display: flex;
    align-items: center;
    min-height: 64px;
    padding: 12px 18px;
    gap: 14px;
    background: #fff;
    color: #1e3a5f;
    font-size: 15px;
    line-height: 1.5;
}

.weekend-container .weekend-history-item:last-child {
    border-bottom: 0;
}

/* 달력 SVG - 목록은 JS에서 생성되므로 CSS 가상 요소 사용 */ 
.weekend-container .weekend-history-item::before {
    content: "";
    display: block;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 9px;
    background-color: #f1f4f6;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%235b7485' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18M8 14h.01M12 14h.01M16 14h.01'/%3E%3C/svg%3E");
    background-size: 20px 20px;
    background-position: center;
    background-repeat: no-repeat;
}

.weekend-container .weekend-history-item::after {
    content: "›";
    margin-left: auto;
    color: #8ba2b8;
    font-size: 20px;
    line-height: 1;
}

.weekend-container .weekend-history-item:hover {
    background: #f0f7fd;
    color: #205c91;
}

.weekend-container .weekend-history-item:focus-visible {
    outline: 2px solid #2f78ad;
    outline-offset: -2px;
}

/* 7. 페이징 */
.weekend-container .weekend-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 20px;
}

.weekend-container .weekend-page-button {
    min-width: 36px;
    height: 36px;
    padding: 0 9px;
    border: 1px solid #d7e0ea;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    font-size: 14px;
    cursor: pointer;
}

.weekend-container .weekend-page-button:hover:not(:disabled) {
    background: #edf6fd;
    border-color: #2f78ad;
}

.weekend-container .weekend-page-button.active {
    border-color: #2f78ad;
    background: #2f78ad;
    color: #fff;
    font-weight: 700;
}

.weekend-container .weekend-page-button:disabled {
    opacity: 0.35;
    cursor: default;
}

.weekend-container .weekend-page-button:focus-visible {
    outline: 2px solid #203b5d;
    outline-offset: 2px;
}

/* 8. 이미지 확대 모달 (JSP main 바깥에도 적용) */
.weekend-modal[hidden] {
    display: none !important;
}

.weekend-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.9);
}

.weekend-modal-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: none;
}

.weekend-modal-content img {
    display: block;
    max-width: 95vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    transform-origin: center center;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    will-change: transform;
}

.weekend-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.weekend-modal-close:hover {
    background: rgba(255,255,255,0.2);
}

.weekend-modal-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.weekend-container .weekend-history-list, .weekend-container #weekend-history-list {
	display: block;
	width: 100%;
	box-sizing: border-box;
}

.weekend-container .weekend-history-item {
	display: flex;
	align-items: center;
	width: 100%;
	box-sizing: border-box;
	border: 0;
	border-bottom: 1px solid #e5e7eb;
	border-radius: 0;
	box-shadow: none;
	background: #ffffff;
}

.weekend-container .weekend-history-item:last-child {
	border-bottom: 0;
}

/* PC에서 마우스 올렸을 때 */
@media (hover: hover) {
    .weekend-container .weekend-history-item:hover {
        background: #f7f9fc;
    }
}

/* 9. 모바일 최적화 */
@media (max-width: 768px) {
    .weekend-container {
        padding: 20px 14px;
    }

    .weekend-container .weekend-current-header {
        gap: 8px;
        margin-bottom: 14px;
    }

    .weekend-container .weekend-current-header h2 {
        padding-left: 10px;
        font-size: clamp(14px, 3.6vw, 19px);
        letter-spacing: -0.5px;
        white-space: nowrap;
    }

    .weekend-container .weekend-latest-button {
        padding: 7px 9px;
        font-size: 11px;
    }

    .weekend-container .weekend-zoom-guide {
        margin-top: 14px;
        padding: 10px 14px;
        font-size: 12px;
    }

    .weekend-container .weekend-history {
        margin-top: 28px;
        padding-top: 24px;
    }

    .weekend-container .weekend-history-header {
        margin-bottom: 12px;
    }
    
    .weekend-container .weekend-pagination {
        gap: 5px;
        margin-top: 16px;
    }

    .weekend-container .weekend-page-button {
        min-width: 34px;
        height: 34px;
        font-size: 13px;
    }

    .weekend-modal-close {
        top: 12px;
        right: 12px;
    }

    .weekend-container .weekend-history-item {
        min-height: 58px;
        padding: 10px 12px;
        gap: 10px;
        font-size: 13px;
    }

    .weekend-container .weekend-history-item::before {
        width: 30px;
        height: 30px;
        background-size: 18px 18px;
    }

	    .weekend-container .weekend-history-header h2 {
        font-size: 19px;
        gap: 10px;
        margin-bottom: 10px;
    }

    .weekend-container .weekend-history-title-icon {
        width: 34px;
        height: 34px;
        border-radius: 9px;
    }

    .weekend-container .weekend-history-title-icon svg {
        width: 21px;
        height: 21px;
    }

    .weekend-container .weekend-history-header p {
        font-size: 13px;
        line-height: 1.6;
    }

    .weekend-container .weekend-history-header {
        margin-bottom: 14px;
    }
    
}


