/* ==================================
   写メ日記 - 独自アップロードUI追加スタイル
   ================================== */

/* ========== ドラッグ＆ドロップエリア ========== */
.krc-drop-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.krc-drop-zone:hover {
    border-color: #0073aa;
    background: #f0f7fc;
}

.krc-drop-zone.dragover {
    border-color: #0073aa;
    background: #e5f3ff;
    border-style: solid;
}

.krc-drop-zone.has-image {
    padding: 15px;
    border-style: solid;
    border-color: #ddd;
    background: #fff;
}

.krc-drop-zone.has-image .krc-drop-zone-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.krc-drop-zone.has-image .krc-drop-icon,
.krc-drop-zone.has-image .krc-drop-text,
.krc-drop-zone.has-image .krc-drop-hint {
    display: none;
}

.krc-drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.krc-drop-icon {
    font-size: 48px;
    line-height: 1;
    opacity: 0.5;
}

.krc-drop-text {
    margin: 0;
    font-size: 16px;
    color: #666;
    font-weight: 500;
}

.krc-drop-hint {
    margin: 0;
    font-size: 12px;
    color: #999;
}

/* プログレスバー */
.krc-upload-progress {
    padding: 20px;
}

.krc-progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.krc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0073aa, #00a0d2);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.krc-progress-text {
    font-size: 14px;
    color: #666;
}

/* 画像プレビュー（既存スタイルの拡張） */
.krc-image-preview-item {
    position: relative;
    display: inline-block;
    margin-top: 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.krc-image-preview-item img {
    max-width: 300px;
    max-height: 300px;
    width: auto;
    height: auto;
    border-radius: 4px;
    display: block;
}

.krc-image-info {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: #666;
}

.krc-image-info span {
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
}

.krc-image-preview-item .krc-remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: #dc3545;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.krc-image-preview-item .krc-remove-image::before {
    content: '×';
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
}

.krc-image-preview-item .krc-remove-image:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* エディタツールバー */
.krc-editor-toolbar {
    margin-bottom: 10px;
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ボタンスタイル調整 */
.krc-btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .krc-drop-zone {
        padding: 20px 15px;
    }
    
    .krc-drop-icon {
        font-size: 36px;
    }
    
    .krc-drop-text {
        font-size: 14px;
    }
    
    .krc-image-preview-item img {
        max-width: 100%;
        max-height: 200px;
    }
    
    .krc-image-info {
        flex-direction: column;
        gap: 5px;
    }
    
    .krc-editor-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
}

/* フォームヒントボックス */
.krc-form-hint-box {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-top: 20px;
}

.krc-form-hint-box p {
    margin: 0 0 5px 0;
    font-size: 13px;
    color: #666;
}

.krc-form-hint-box p:last-child {
    margin-bottom: 0;
}
