/* フォームサイズ調整 */
.form{
    height: fit-content;
}


.text-area{
    margin-bottom: 35px;
}

/* 画像エリア */
.img-area {
    position: relative;
}

/* ボタン */
.modal-trigger {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    cursor: pointer;
    overflow: hidden;
}

/* 画像 */
.modal-trigger img {
    display: block;
    width: 100%;
    height: auto;
    transition: .3s ease;
}

/* 黒いオーバーレイ */
.modal-trigger::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.35);
    opacity: 0;
    transition: .3s ease;
    z-index: 1;
}


/* SVGアイコン */
.zoom-icon-hover {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    opacity: 0;
    transition: .3s ease;
    z-index: 2;
    pointer-events: none;

    display: flex;
    justify-content: center;
    align-items: center;
}

.zoom-icon-hover svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* テキスト */
.txt_img-area {
    position: absolute;
    top: calc(42% + 55px);
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    padding: 8px 16px;
    background: rgba(255,255,255,0.95);
    color: #333;
    font-size: 16px;
    font-weight: 700;
    border-radius: 4px; 
    opacity: 0;
    transition: .3s ease;
    z-index: 2;
    pointer-events: none;
    white-space: nowrap;
}

/* ホバー時 */
.modal-trigger:hover::before,
.modal-trigger:hover .zoom-icon-hover,
.modal-trigger:hover .txt_img-area {
    opacity: 1;
}

/* 少し拡大させたい場合 */
.modal-trigger:hover img {
    transform: scale(1.03);
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: flex-start;
    justify-content: center;

    overflow: auto;
    padding-top: 60px;
}

.modal.active {
    display: flex;
}

.modal-bg {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.7);
}


.modal-content {
    position: relative;
    z-index: 1;
    /* width: 90vw; */
    height: 90vh;

     display: block;
    /* justify-content: center;
    align-items: flex-start; */

    overflow-y: scroll;
    overflow-x: hidden;
}

.modal-img {
    /* max-width: 90vw;
    max-height: 90vh; */
    width: clamp(300px, 85vw, 1200px);;
    height: auto;
    max-width: none;
    max-height: none;
    transition: none;
    transform-origin: top center;
    display: block;
    /* cursor: grab; */

    user-select: none;
    /* -webkit-user-drag: none; */
}

/* .modal-content img:active {
    cursor: grabbing;
} */

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    width: 25px;
    height: 25px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;


    appearance: none;
    -webkit-appearance: none;
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    z-index: 10;
}

.modal-close svg{
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    
}

.modal-close:hover {
    opacity: 0.8;
    color: rgb(88, 88, 88);
}

/* テンプレート共有ボタン */
.share-btn span{
    color: #025293;
    font-size: 13px;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  border:none;
  background: none;
  cursor: pointer;
  margin-bottom: 18px;
}

.share-btn span:hover{
    text-decoration: underline;
}

/* コピー中は下線を消す */
.share-btn.copied span:hover {
    text-decoration: none;
}

.share-icon{
    width: 24px;
  height: 18px;
}

.check-icon {
  width: 17px;
  height: 14px;
}



/* アイコン切り替え */
.share-icon,
.check-icon{
    display:flex;
    align-items:center;
    justify-content:center;
}

.check-icon{
    display:none;
}

.share-btn.copied{
    color:#025293;
}

.share-btn.copied .share-icon{
    display:none;
}

.share-btn.copied .check-icon{
    display:block;
}

/* 通常時拡大アイコン（青） */
.template-image {
  position: relative;
  display: inline-block;
}

.template-image img {
  display: block;
}

.zoom-icon-default {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 0;
  top: 0;
  
  width: 40px;
  height: 40px;
  padding: 8px;
  background-color: #ECECEC;

  transition: opacity 0.3s ease;

  opacity: 1;
  z-index: 3;
}


/* 画像エリアにホバーしたらアイコンを消す */
.modal-trigger:hover .zoom-icon-default {
  opacity: 0;
}



/* おすすめテンプレートリスト */

.template_recommend_box{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-bottom: 100px;
}

.template_recommend_title{
    text-align: center;
    font-size: 22px;
    font-weight: bold;
}

.template_recommend_listbox{
    display: flex;
    gap: 20px;
    width: calc(100% - 100px);
    max-width: 1080px;
}

.template_recommend_listitem {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    background-color:#ffffff94;
    border: solid 1px #bbbbbb;
    padding: 25px;
    text-decoration: none !important;
    color: #0E376F;

    transition: all 0.2s ease-out 0s;
    /* width: clamp(200px, 17.7vw,255px); */
}

.template_recommend_listitem:hover{
    opacity: 0.8;
    color: #ffaf02;

    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}


.txt_listitem{
    text-align: center;
    align-items: center;
    justify-content: center;
    display: flex;
    font-size: clamp(15px, 1.1vw, 16px);
    font-weight: 400;
    height: 3em;
    margin: 0;
}

.img_listitem{
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* .img_listitem_box{
    width: clamp(185px,15.6vw,225px);
    height: clamp(200px,17vw,245px);
} */

/* .template_recommend_listitem .img_listitem{
    object-fit: contain;
} */

@media screen and (max-width: 1080px) {
    .template_recommend_listbox{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}
}

@media screen and (max-width: 510px) {
    .template_recommend_listbox{
    display: flex;
    flex-direction: column;
    gap: 15px;
}
}


