/* ============================================================================================
	FEATURED PLANS LIST / PATTERN
============================================================================================ */
.resola-section-pull {
	position: relative;
	z-index: 2;
	margin-top: -8lvh !important;
	padding-top: clamp(16px, 6%, 30px)
}
.resola-plans-item {
	margin-bottom: 2em !important
}
.resola-plans-item-inner {
    cursor: pointer
}
.resola-plans-image {
	position: relative
}
.resola-plans-image::before {
	content: "詳細を見る";
	display: inline-block;
	position: absolute;
	bottom: 1em;
	right: 1em;
	padding: 1em 2em;
	border-radius: 100px;
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--white);
	font-size: var(--wp--preset--font-size--x-small);
	pointer-events: none
}
.resola-plans-title {
	margin: 1em 0 .5em !important;
	font-weight: bold
}
.resola-plans-desc {
	margin: 0 0 1em !important;
	font-size: var(--wp--preset--font-size--x-small)
}
body:has(.resola-modal-overlay.is-visible) .navigation-common {
	opacity: 0;
	pointer-events: none
}
@media screen and (min-width: 920px) {
	.resola-plans-list {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 0 4%
	}
	.resola-plans-image::before {
		opacity: 0;
		bottom: 50%;
		right: 50%;
		transform: translate(50%, 40%);
		transition: transform .6s ease, opacity .6s
	}
	.resola-plans-item-inner:hover .resola-plans-image::before {
		opacity: 1;
		transform: translate(50%, 50%);
	}
}

/* =============================================
   MODAL CONTENTS
============================================= */
.resola-plans-modal-content {
    display: none
}

/* =============================================
   MODAL OVERLAY
============================================= */
.resola-modal-overlay {
    opacity: 0;
    visibility: hidden;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000;
    width: 100%;
    height: 100lvh;
    background: rgba(0,0,0,.8);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 !important;
    max-width: none !important;
    transition: opacity .4s, visibility .4s
}

.resola-modal-overlay.is-visible {
    opacity: 1;
    visibility: visible
}

/* =============================================
   MODAL CONTAINER
============================================= */
.resola-modal-container {
	opacity: 0;
    position: relative;
    width: 92%;
    max-width: 800px;
    max-height: 80vh;
    margin: 0 auto;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    background: white;
    transform: scale(.9) translateY(-20px);
    transition: transform .4s, opacity .4s
}
@media screen and (min-width: 769px) {
    .resola-modal-container {
        max-height: 95vh;
    }
}

.resola-modal-overlay.is-visible .resola-modal-container {
    transform: scale(1) translateY(0) !important;
    opacity: 1 !important;
}

/* =============================================
   CLOSE BUTTON
============================================= */
.resola-modal-close {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 0;
    background: rgba(0,0,0,.7);
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: background-color .2s
}
@media screen and (min-width: 769px) {
    .resola-modal-close {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }}

.resola-modal-close:hover {
    background: rgba(0,0,0,.9)
}

/* =============================================
   MODAL BODY
============================================= */
.resola-modal-body {
    padding: 30px 4% 30px;
}
.resola-modal-body::after {
    content: "";
    display: block;
    width: 1px;
    height: 120px
}

/* =============================================
   CONTENT STYLES
============================================= */
.resola-modal-desc {
	font-size: var(--wp--preset--font-size--small)
}
/* =============================================
   MODAL GALLERY STYLES
============================================= */
.resola-modal-gallery {
    margin-bottom: 20px;
}

.resola-modal-main-image {
    position: relative;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.resola-modal-main-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.3s ease;
}

.resola-modal-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px
}

.resola-modal-thumbnail {
    position: relative;
    width: 80px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
    background: #f5f5f5;
}

.resola-modal-thumbnail:hover {
    transform: scale(1.05);
    border-color: #ddd;
}

.resola-modal-thumbnail.is-active {
    box-shadow: 4px 4px 0 0 var(--wp--preset--color--accent);
    pointer-events: none
}

.resola-modal-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Legacy styles for backward compatibility */
.resola-modal-body .resola-modal-image {
    margin-bottom: 20px;
}

.resola-modal-body .resola-modal-image img {
    border-radius: 8px;
}

.resola-modal-body .resola-modal-desc {
    margin-bottom: 30px
}

.resola-modal-body .resola-modal-desc p {
	margin-bottom: 15px
}

.resola-modal-body .resola-plans-price {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.resola-modal-body .resola-plans-price p:first-child {
    margin-bottom: 10px;
    color: #666;
}

.resola-modal-body .resola-plans-price p:last-child {
    margin: 0;
    color: #333;
    font-size: var(--wp--preset--font-size--x-small)
}
.resola-modal-body .resola-plans-price p:last-child strong {
    font-size: 1.5em;
	letter-spacing: 1px
}
.resola-price-attention {
	margin-top: 1em;
	font-size: var(--wp--preset--font-size--x-small) !important;
	text-align: right
}
.resola-price-attention p {
	margin: .5em 0 0 !important
}
.resola-anniversary {
	display: flex;
	flex-flow: column;
	align-items: center
}
.resola-reservation-tel {
	margin: 0 !important
}
.resola-reservation-tel a {
	color: currentColor;
	text-decoration: none
}

/* =============================================
   SCROLLBAR GUTTER
============================================= */
html {
    scrollbar-gutter: stable;
}

/* より確実なスクロールバー対策 */
@supports (scrollbar-gutter: stable) {
    html {
        scrollbar-gutter: stable;
    }
}

/* フォールバック：古いブラウザ用 */
@supports not (scrollbar-gutter: stable) {
    html {
        margin-right: calc(100vw - 100%);
    }
}

/* =============================================
   ANIMATION
============================================= */
@media (prefers-reduced-motion: reduce) {
    .resola-modal-overlay,
    .resola-modal-container,
    .resola-plans-item {
        transition: none;
    }
}

/* =============================================
   PLAN PREVIEW IN BOOKING CALENDAR
============================================= */
.plan-preview-image {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e9ecef;
}

.plan-preview-title {
    font-size: var(--wp--preset--font-size--x-small);
    color: #666;
    margin-bottom: 10px;
    font-weight: bold;
}

.plan-preview-image img {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.plan-preview-name {
    font-size: var(--wp--preset--font-size--small);
    font-weight: bold;
    color: var(--wp--preset--color--contrast);
    margin-top: 10px;
}

/* Responsive adjustments for plan preview */
@media (max-width: 768px) {
    .plan-preview-image {
        margin-top: 15px;
        padding: 15px;
    }
    
    .plan-preview-image img {
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .plan-preview-image {
        margin-top: 10px;
        padding: 10px;
    }
    
    .plan-preview-image img {
        max-width: 200px;
    }
}

/* =============================================
   FUGU PLAN DISABLED STATE
============================================= */
.fugu-disabled {
    opacity: 0.6 !important;
    background-color: #999 !important;
    cursor: not-allowed !important;
    position: relative;
}

.fugu-disabled:hover {
    opacity: 0.7 !important;
    background-color: #888 !important;
    transform: none !important;
}

.fugu-disabled::before {
    content: "" !important;
    opacity: 0 !important;
}

/* ============================================================================================
   PLAN MODAL
   プランモーダル
============================================================================================ */

.resola-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.resola-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.resola-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    background: #fff;
    border-radius: 12px;
    overflow-y: auto;
    padding: 0;
}

.resola-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    z-index: 10;
    font-size: 18px;
    line-height: 1;
    transition: background 0.2s ease;
}

.resola-modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* モーダル内コンテンツ */
.resola-modal-content > p:first-child {
    margin: 0;
    padding: 30px 30px 0;
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.resola-modal-gallery {
    padding: 20px 0;
}

.resola-modal-main-image {
    width: 100%;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.resola-modal-main-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.15s ease;
}

.resola-modal-thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.resola-modal-desc {
    padding: 0 30px 20px;
}

.resola-modal-desc p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.resola-modal-content .resola-plans-price {
    padding: 0 30px;
    margin-bottom: 20px;
}

.resola-modal-content .resola-price-attention {
    padding: 0 30px 30px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .resola-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .resola-modal-content > p:first-child {
        padding: 20px 20px 0;
        font-size: 20px;
    }
    
    .resola-modal-desc {
        padding: 0 20px 15px;
    }
    
    .resola-modal-content .resola-plans-price {
        padding: 0 20px;
    }
    
    .resola-modal-content .resola-price-attention {
        padding: 0 20px 20px;
    }
    
    .resola-modal-thumbnail {
        width: 60px;
        height: 45px;
    }
}

/* プラン内モーダルコンテンツは非表示 */
.resola-plans-modal-content {
    display: none !important;
}

/* モーダルが開いている時、背景スクロールを防止 */
body.modal-open {
    overflow: hidden;
}

/* Shine effect for buttons */
.shine-btn .wp-block-button__link {
    position: relative;
    overflow: hidden;
}

.shine-btn .wp-block-button__link::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transition: left 0.5s ease;
}

.shine-btn .wp-block-button__link:hover::before {
    left: 100%;
}

/* Shimmer loading effect */
@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }
    100% {
        background-position: 468px 0;
    }
}

.shimmer {
    animation: shimmer 2s infinite linear;
    background: linear-gradient(
        to right,
        #eeeeee 8%,
        #dddddd 18%,
        #eeeeee 33%
    );
    background-size: 800px 104px;
}

/* プランリストのhover効果削除用 */
.resola-plans-item-inner::before,
.resola-plans-item-inner::after {
    content: "" !important;
    opacity: 0 !important;
}

/* 河豚プランカレンダーのグレーアウト */
.fugu-out-of-season {
    opacity: 0.3 !important;
    pointer-events: none !important;
    background-color: #f5f5f5 !important;
    color: #999 !important;
}

.fugu-out-of-season * {
    color: #999 !important;
}

/* 河豚プラン期間外日付のホバー効果を無効化 */
.fugu-out-of-season:hover {
    opacity: 0.3 !important;
    background-color: #f5f5f5 !important;
}

