/* 네이터 에디터인 경우 padding = 0으로 */
.page-id-119 #wp--skip-link--target .fpd-product-designer-wrapper{
    padding-top: 0px;
}



@media screen and (max-width: 782px) {
    .page-editor .custom-logo { 
        margin-left: 30px;
    }
    .page-editor .editor-button-container{
        margin-right: 30px;
    }

    .page-editor .custom-logo{ 
        height: 28px !important;
        width: auto;
    }

    .page-editor #editor-before-btn, .page-editor #editor-save-btn{
        padding: 8px 10px !important;
        font-size: 12px !important;
    }
}

/* 에디터 버튼이랑 같이 나오게 높이 제한 */
.page-editor .fpd-product-designer-wrapper{
    --fpd-max-h: 85vh;
    --fpd-ar: 1000/1100; /* stageWidth / stageHeight (예: 1000/600) */

    height: var(--fpd-max-h);
    max-height: var(--fpd-max-h);

    /* 높이 * 비율 = 너비, 단 화면 너비(100%)를 넘지 않게 */
    width: min(100%, calc(var(--fpd-max-h) * var(--fpd-ar)) + 400px);
    margin: 0 auto;
    margin-top: 10px;

    /* 잘림 방지: 내부가 100%로 맞춰지지 않을 때 임시로 보이게 */
    overflow: visible;
}

/* 내부는 래퍼를 꽉 채우게 */
.page-editor .fpd-product-designer-wrapper .fpd-container{
    width: 100%;
    height: 100%;
}

/* .page-editor .editor_wrapper{ 
    width: 100%;
    max-width: var(--fpd-max-width);
} */

.page-editor .wp-block-group-is-layout-constrained{ 
    padding-top: 0px !important;
    padding-bottom: 0px !important;
}

/* 저장버튼 위치 */
.editor-button-container {
    max-width : none !important;
    display: flex; /* Flex 컨테이너로 설정 */
    justify-content: flex-end; /* 버튼들을 오른쪽으로 정렬 */
    gap: 10px; 
}

/* 제공하는 기능 안보이게 */
.fpd-tooltip[data-context="qr-code"], .fpd-tool-fill-opacity,
.fpd-tool-scaleY, .fpd-img-meta, .woocommerce-Tabs-panel h2{
    display: none !important;
}

/* fpd모서리 둥글게 */
.fpd-container {
    border-radius: 12px; /* ← 원하는 만큼 조절 */
    overflow: hidden; 
}

/* fpd 패널 글자 크기 */
.fpd-panel-tabs {
    font-size: 16px;
}
.fpd-sub-panel {
    font-size: 12px;
}

/* fpd에디터 상단 바  */
fpd-actions-bar, fpd-actions-bar * {
    color: black !important;
    background-color: white !important;
}

/* 뷰 전환하는 상자 위치 설정 */
fpd-views-nav {
    position: absolute;
    top: 10px;
    right: 10px;
    height: 20px;
}

/* 에디터 있는경우 이미지 안보이게 */
body:has(.fpd-product-designer-wrapper) .wp-block-woocommerce-product-image-gallery {
    display: none
}
/* 에디터 있는 경우 7:3 */
@media (min-width: 782px) { 
    body:has(.fpd-product-designer-wrapper) .woo-product-info {
    flex-basis:  30% !important;
    flex-grow:0 !important
    }
}

/* FPD 디자인 요소 목록 패널의 배경에 격자무늬 적용 */
.fpd-designs-active .fpd-scroll-area .fpd-item, .fpd-thumbnail-preview {
    background-color: #e6e6e6 !important; 

    /* 기존 배경색을 덮어쓰기 위해 !important 사용 */
    /* background-color: transparent !important;  */
    
    /* 격자무늬 패턴 생성 */
    /* background-image: linear-gradient(45deg, #e6e6e6 25%, transparent 25%),
                      linear-gradient(-45deg, #e6e6e6 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, #e6e6e6 75%),
                      linear-gradient(-45deg, transparent 75%, #e6e6e6 75%); */
    
    /* 격자 크기 및 위치 조정 */
    /* background-size: 4px 4px;  */
    /* background-position: 0 0, 0 2px, 2px -2px, -2px 0px;  */
}


.fpd-preview-title {
    display: none;
}

/* 고객센터 탭 */
.tab-menu { display: flex; border-bottom: 2px solid #ddd; margin-bottom: 20px; }
.tab-menu a {
  flex: 1; padding: 10px; text-align: center;
  background: #f5f5f5; border-right: 1px solid #ddd;
  color: #333; text-decoration: none;
}
.tab-menu a.active {
  background: #fff; border-bottom: 2px solid black; color: black; font-weight: bold;
}

/* 팝업 스크롤로 나오게 */
.pum-container {
    max-height: 700px !important; /* 팝업 전체 최대 높이 */
    overflow-y: auto !important;  /* 내용이 넘치면 스크롤 */
}

@media screen and (max-width: 767px) {
    .custum-guide-text {
        display: none !important; 
    }
}

/* fpd 모듈 바 zindex */
fpd-main-bar {
    z-index: 999 !important;
}


/* 폰트 리스트 높이 조절 */
.fpd-panel-font-family {
    height: 250px !important;
} 

/* 인쇄영역 저장할때 툴바 나오는거 지우기 */
#fpd-target fpd-element-toolbar.fpd-show {
    display: none !important;
    left: -9999999px;
}

/* fpd 탬플릿 영역 */
.template-tabs {
    display: flex;
    justify-content: center;   /* 가운데 정렬 */
    gap: 10px;
    margin-bottom: 14px;
}

.template-tabs .tab-btn {
    flex: 1;                   /* 두 버튼 동일 비율 너비 */
    max-width: 150px;          /* 너무 넓어지는 것 방지 */
    height: 40px;              /* 동일 높이 */
    display: flex;
    justify-content: center;
    align-items: center;
    background: #eee;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    border: 1px solid #ccc;
    transition: all .2s;
}

.template-tabs .tab-btn.active {
    background: #333;
    color: #fff;
    border-color: #333;
}

.template-section {
    margin-top: 10px;
}

fpd-module-templates .templates-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

/* 그리드 */
.my-templates-grid, .designer-templates-grid {
    display: grid;
    overflow-y: auto;
    grid-template-columns: repeat(2, 1fr); 
    gap: 12px;
    padding: 10px;
}

/* 탬플릿 1개 카드 */
.my-templates-grid .template-item, .designer-templates-grid .template-item,
.my-templates-grid .category-card, .designer-templates-grid .category-card {
    display: flex;
    position: relative;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 5px rgba(0,0,0,0.08);
    width: 100%; /* 칸을 꽉 채우기 */
    background: #f7f7f7;
    border-radius: 8px;
    padding: 8px;
    font-size: 12px;   
    aspect-ratio: 1 / 1;
    min-height: 0;      
}

.my-templates-grid .template-item:hover, .designer-templates-grid .template-item:hover,
.my-templates-grid .category-card:hover, .designer-templates-grid .category-card:hover  {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* 썸네일 */
.thumb-box {
    width: 100%;       /* 정사각형 너비 */
    aspect-ratio: 1 / 1;   /* 정사각형 유지 */
    background-size: contain;   /* 영역 안에 꽉차게 */
    background-repeat: no-repeat;
    background-position: center; /* 가운데 정렬 */
    background-color: #f8f8f8;   /* 비어 있는 공간 */
    border-radius: 6px;
}

.customer-template-delete-btn{
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background-color: red;
    color: white;
    font-weight: bold;
    cursor: pointer;
    line-height: 24px;
    text-align: center;
    z-index: 10;
}

/* 저장 필드 */
.template-save-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
}

#templateTitleInput {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: 0.2s;
    margin-bottom: 0px !important;
}
#templateTitleInput:focus {
    border-color: #333;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}

.customer-template-save-btn {
    padding: 10px 16px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: 0.2s;
}

.customer-template-save-btn:hover {
    background: #333;
}

#template-controls {
    display: flex;
    justify-content: flex-end; /* 오른쪽 정렬 */
    align-items: center;
    gap: 12px; /* 입력창과 버튼 사이 간격 */
    margin-top: 20px;
    margin-bottom: 20px;
}

#templateTitle, #templateCategorySelect {
    flex: 0 0 250px; /* 고정 폭 */
    padding: 8px 10px;
    font-size: 14px;
}

#template-save-btn {
    padding: 8px 18px;
    font-size: 14px;
    height: 36px;
    line-height: 18px;
}

/* 뒤로가기 */
.designer-templates-grid .back-to-categories {
    grid-column: 1 / -1; /* 한 줄 전체 */
    aspect-ratio: auto;  /* 카드 비율 무시 */
    background-color: #f7f7f7;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

#fpd-save-order {
    /* 배경 및 글자 색상 */
    background-color: #000000; /* 완전한 검은색 배경 */
    color: #ffffff;             /* 흰색 텍스트 */

    /* 글꼴 스타일 */
    font-size: 18px;            /* 텍스트 크기 */
    font-weight: bold;          /* 굵은 글씨 (선택 사항) */
    line-height: 1.5;           /* 줄 높이 (텍스트 중앙 정렬에 도움) */

    /* 안쪽 여백 (padding) */
    padding: 12px 30px;         /* 상하 12px, 좌우 30px */

    /* 모서리 둥글게 */
    border-radius: 8px;         /* 둥근 정도 (이미지와 유사하게) */
    
    /* 테두리 제거 및 커서 모양 */
    border: none;               /* 기본 테두리 제거 */
    cursor: pointer;            /* 마우스 커서를 포인터로 변경 */

    /* 전환 효과 (transition) - 호버 효과를 부드럽게 함 */
    transition: background-color 0.3s ease;
    
    /* 텍스트 중앙 정렬 (선택 사항, 필요에 따라) */
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

#fpd-save-order:hover {
    /* 배경색을 살짝 밝게 또는 어둡게 변경 */
    background-color: #333333; /* 약간 밝은 회색 (검은색보다 덜 강렬하게) */
  }


.notice_page_wrapper {
    width: 1500px !important;
}





#guideModalOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
}

#guideModal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: 550px;
    height: 750px;

    background: #fff;
    border-radius: 10px;
    z-index: 9999;

    overflow: hidden;
}

/* 실제 스크롤 영역 */
#guideModalContent {
    height: 100%;
    overflow-y: auto;
    padding: 24px;
    box-sizing: border-box;
}

/* 닫기 버튼 */
#closeGuideModal {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
}



/* 전체 모달 내부 */
.guide-modal-inner {
    font-family: inherit;
}

/* 탭 영역 */
.guide-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

/* 탭 버튼 */
.guide-tab {
    padding: 10px 18px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all .2s ease;
}

.guide-tab:hover {
    color: #000;
}

/* 활성 탭 */
.guide-tab.active {
    color: #000;
    font-weight: 600;
    border-bottom-color: #000;
}

/* 콘텐츠 영역 */
.guide-tab-contents {
    min-height: 200px; /* 페이지처럼 보이게 */
}

/* 개별 탭 콘텐츠 */
.guide-tab-content {
    display: none;
    animation: fadeIn .2s ease;
}

.guide-tab-content.active {
    display: block;
}

/* 공통 버튼 스타일 */
.guide-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10001;

    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 24px;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;
}

/* 좌 / 우 위치 */
.guide-nav.prev {
    left: 12px;
}

.guide-nav.next {
    right: 12px;
}


/* 부드러운 전환 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 모바일 대응 */
@media screen and (max-width: 782px) {
    #guideModal {
        width: 90%;          /* 화면 거의 꽉 차도록 */
        height: auto;
        padding: 15px;       /* 패딩 줄이기 */
        border-radius: 5px;  /* 모서리 덜 둥글게 */
        font-size: 12px;
    }

    .guide-tab {
        padding: 10px 8px;
        font-size: 8px;
    }

    .guide-nav {
        width: 52px;
        height: 52px;
        font-size: 28px;
    }
}

