/**
 * WBK KBoard Image Drag and Drop Uploader Styles
 */

/* 드롭존 래퍼 - 각 에디터별로 개별 정의됨 */

/* 드롭존 오버레이 */
.wbk-dnd-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(37, 99, 235, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border-radius: 8px;
    border: 3px dashed #fff;
    pointer-events: none;
}

.wbk-dnd-active .wbk-dnd-overlay {
    opacity: 1;
    visibility: visible;
}

.wbk-dnd-overlay-content {
    text-align: center;
    color: #fff;
}

/* 드롭 아이콘 */
.wbk-dnd-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation: wbk-dnd-bounce 1s ease infinite;
}

@keyframes wbk-dnd-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.wbk-dnd-text {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* 업로드 진행률 */
.wbk-dnd-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    padding: 0 16px;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border-radius: 0 0 8px 8px;
}

.wbk-dnd-uploading .wbk-dnd-progress {
    opacity: 1;
    visibility: visible;
}

.wbk-dnd-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 0 0 0 8px;
}

.wbk-dnd-progress-text {
    position: relative;
    z-index: 1;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
}

/* 에디터별 스타일 조정 */

/* Summernote - .note-editor 자체가 wrapper가 됨 */
.note-editor.wbk-dnd-wrapper {
    position: relative !important;
}

.note-editor.wbk-dnd-wrapper .wbk-dnd-overlay,
.note-editor.wbk-dnd-wrapper .wbk-dnd-progress {
    border-radius: 0;
}

/* TinyMCE - .wp-editor-container가 wrapper가 됨 */
.wp-editor-container.wbk-dnd-wrapper {
    position: relative !important;
    border-radius: 8px;
    overflow: hidden;
}

/* Textarea - #kboard_content가 wrapper가 됨 */
#kboard_content.wbk-dnd-wrapper {
    position: relative !important;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

#kboard_content.wbk-dnd-wrapper.wbk-dnd-active {
    border-color: #2563eb;
}

/* 드래그 중 커서 */
.wbk-dnd-active * {
    cursor: copy !important;
}

/* 반응형 */
@media screen and (max-width: 600px) {
    .wbk-dnd-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 16px;
    }

    .wbk-dnd-text {
        font-size: 15px;
    }

    .wbk-dnd-progress {
        height: 36px;
        padding: 0 12px;
    }

    .wbk-dnd-progress-text {
        font-size: 12px;
    }
}

/* 다크모드 지원 */
@media (prefers-color-scheme: dark) {
    .wbk-dnd-progress {
        background-color: rgba(30, 41, 59, 0.95);
    }
}
