/* ===========================
   プロフィール画像アップロードCSS
   =========================== */

/* 画像アップロードエリア */
.image-upload-area {
    width: 100%;
    margin: 20px 0;
}

.upload-placeholder {
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.upload-placeholder:hover {
    border-color: #4a90e2;
    background: #f8f9fa;
}

.upload-placeholder i {
    font-size: 48px;
    color: #8e8e93;
}

.upload-placeholder p {
    margin: 0;
    color: #495057;
    font-weight: 500;
}

.upload-placeholder small {
    color: #6c757d;
    font-size: 12px;
}

/* アバター・カバー編集ボタン */
.btn-edit-avatar,
.btn-edit-cover {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-edit-avatar:hover,
.btn-edit-cover:hover {
    background: #4a90e2;
    border-color: #4a90e2;
    color: white;
}

.btn-edit-avatar i,
.btn-edit-cover i {
    font-size: 14px;
}

/* プロフィールアバターコンテナ */
.profile-avatar {
    position: relative;
    display: inline-block;
}

.profile-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* カバー画像コンテナ */
.profile-cover {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.profile-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-edit-cover {
    bottom: 16px;
    right: 16px;
}

/* モーダルサイズ */
.modal-small .modal-content {
    max-width: 400px;
}

/* プレビュー画像 */
#avatar-preview {
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#cover-preview {
    border-radius: 8px;
}

/* ローディング */
.upload-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.loading-content {
    background: white;
    padding: 24px 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.loading-content i {
    font-size: 24px;
    color: #4a90e2;
}

.loading-content span {
    font-size: 16px;
    color: #212529;
}

/* トースト通知 */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 10000;
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    border-left: 4px solid #28a745;
}

.toast-success i {
    color: #28a745;
}

.toast-error {
    border-left: 4px solid #dc3545;
}

.toast-error i {
    color: #dc3545;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .upload-placeholder {
        padding: 30px;
    }

    .upload-placeholder i {
        font-size: 36px;
    }

    .profile-avatar img {
        width: 100px;
        height: 100px;
    }

    .profile-cover {
        height: 200px;
    }

    .toast {
        left: 20px;
        right: 20px;
        transform: translateY(100px);
    }

    .toast.show {
        transform: translateY(0);
    }
}