.jd-imageupload-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 40px 20px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    background-color: #fafafa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.jd-imageupload-box:hover {
    border-color: #999;
    background-color: #f5f5f5;
}

.jd-imageupload-icon {
    font-size: 96px;
    color: #999;
    margin-bottom: 20px;
}

.jd-imageupload-text {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.jd-image-preview-box {
    border: 2px dashed #ddd;
    background: #f5f5f5;
    padding: 0;
    text-align: center;
    border-radius: 4px;
    min-height: 200px; /* 최소 높이 설정 */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 이미지가 있을 때만 inline-flex */
.jd-image-preview-box.has-image {
    display: inline-flex;
    width: 100%;
}

.jd-preview-image {
    max-width: 100%;
    max-height: 300px; /* 최대 높이 제한 */
    object-fit: contain; /* 비율 유지하며 fit */
}

.jd-placeholder-text {
    color: #999;
}

.button-group {
    display: flex;
    gap: 5px;
    align-items: center;
}

.panel-heading {
    background-color: #f9f9f9 !important;
}

.panel-heading:hover {
    background-color: #f0f0f0 !important;
}

.jd-effect-text {
    padding: 5px;
    font-weight: bold;
    font-size: 16px;
}

.jd-effect-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    font-weight: bold;
    margin-left: 10px;
}

.jd-action-button {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 70px;
    height: 70px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    margin: 0 5px 10px 5px;
}

.jd-action-button:hover {
    border-color: #ff8c00;
    background: #fff5eb;
}

.jd-action-button img {
    width: 32px;
    height: 32px;
}

.jd-action-button span {
    font-size: 13px;
    color: #333;
    font-weight: bold;
}


.jd-action-button.active {
    border: 2px solid #ff6666;
    background: #fff5f5;
}

/* 9칸 그리드 */
.jd-text-position-grid {
    display: grid;
    grid-template-columns: repeat(3, 20px);
    grid-template-rows: repeat(3, 20px);
    gap: 2px;
    border: 1px solid #ddd;
    padding: 5px;
    border-radius: 4px;
    background: #f9f9f9;
}

/* 각 칸 */
.jd-position-cell {
    width: 20px;
    height: 20px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 2px;
}

.jd-position-cell:hover {
    background: #fff5eb;
    border-color: #ff8c00;
}

/* 선택된 칸 */
.jd-position-cell.active {
    background: #ff8c00;
    border-color: #ff8c00;
}

.jd-direction-btn {
    width: 25px;
    height: 25px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    padding: 0;
    outline: none;
}

.jd-direction-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #374151;
}

.jd-direction-btn:active {
    background: #f3f4f6;
    transform: scale(0.95);
}

.jd-direction-btn.active {
    background: #ff8c00;
    border-color: #ff8c00;
    color: white;
    box-shadow: 0 1px 2px rgba(59, 130, 246, 0.2);
}

.jd-image-text-content {
    word-break: break-all;
}