/**
 * file-upload-preview.css
 * 営業許可証アップロードUI - 未添付/添付済みのビジュアル状態
 * 全LP共通（LP G/F/H）
 */

/* 未添付状態: オレンジ点線ボーダー + パルスアニメーション */
.file-drop-area--empty {
    border: 2px dashed #f97316 !important;
    background-color: #fff7ed;
    animation: file-pulse 2s ease-in-out infinite;
}

@keyframes file-pulse {
    0%, 100% {
        border-color: #f97316;
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0);
    }
    50% {
        border-color: #ea580c;
        box-shadow: 0 0 12px 2px rgba(249, 115, 22, 0.15);
    }
}

/* 「必須」バッジ */
.file-drop-area__badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 9999px;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

/* ドラッグオーバー状態 */
.file-drop-area.dragover {
    border-color: #2563eb !important;
    background-color: #eff6ff !important;
    animation: none;
}

/* 添付済み状態 */
.file-drop-area.has-file {
    border: 2px solid #22c55e !important;
    background-color: #f0fdf4 !important;
    animation: none;
}

/* プレビューコンテナ */
.file-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

/* サムネイル */
.file-preview__thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

/* PDFアイコン代替 */
.file-preview__pdf-icon {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #dc2626;
    font-size: 0.75rem;
    font-weight: 700;
}

/* ファイル名 */
.file-preview__name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #16a34a;
    word-break: break-all;
    flex: 1;
    text-align: left;
}

/* 削除ボタン */
.file-preview__remove {
    position: absolute;
    top: -8px;
    left: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    border: 2px solid #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s ease;
}

.file-preview__remove:hover {
    transform: scale(1.15);
    background: #dc2626;
}

/* 添付済みのチェックマーク（バッジ位置に表示） */
.file-drop-area__check {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #22c55e;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.4);
    font-size: 14px;
    font-weight: 700;
}

/* モバイル対応 */
@media (max-width: 640px) {
    .file-preview__thumb,
    .file-preview__pdf-icon {
        width: 60px;
        height: 60px;
    }

    .file-preview__name {
        font-size: 0.75rem;
    }
}
