/* Google Drive 統合用スタイル */

.google-drive-section {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.google-drive-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.google-drive-header h3 {
    margin: 0;
    color: #495057;
    font-size: 18px;
    font-weight: 600;
}

.google-auth-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Google サインインボタン */
.btn-google-signin {
    background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(66, 133, 244, 0.3);
}

.btn-google-signin:hover {
    background: linear-gradient(135deg, #3367d6 0%, #2d8f47 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.4);
}

/* サインアウトボタン */
.btn-signout {
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s ease;
}

.btn-signout:hover {
    background: #5a6268;
}

/* ユーザー情報 */
#google-user-info {
    margin: 15px 0;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-image {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #e9ecef;
}

.user-name {
    font-weight: 500;
    color: #495057;
}

/* Google Drive アクション */
.google-drive-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn-save-drive {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-save-drive:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea885 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-refresh {
    background: #17a2b8;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-refresh:hover {
    background: #138496;
    transform: translateY(-1px);
}

/* ファイル一覧 */
.drive-files-list {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 8px;
    background: white;
    border: 1px solid #e9ecef;
}

.drive-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.2s ease;
}

.drive-file-item:hover {
    background: #f8f9fa;
}

.drive-file-item:last-child {
    border-bottom: none;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: #495057;
    margin-bottom: 4px;
}

.file-meta {
    font-size: 12px;
    color: #6c757d;
}

.file-actions {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-load {
    background: #007bff;
    color: white;
}

.btn-load:hover {
    background: #0056b3;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
}

/* ローディング・エラー状態 */
.loading, .no-files, .error {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-style: italic;
}

.error {
    color: #dc3545;
    background: #f8d7da;
    border-radius: 4px;
    margin: 10px 0;
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
    .google-drive-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .google-auth-controls {
        justify-content: center;
    }
    
    .google-drive-actions {
        flex-direction: column;
    }
    
    .drive-file-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .file-actions {
        justify-content: stretch;
    }
    
    .btn-sm {
        flex: 1;
    }
}

/* アニメーション */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.drive-file-item {
    animation: fadeIn 0.3s ease-out;
}

/* アイコンアニメーション */
.btn-icon {
    transition: transform 0.2s ease;
}

.btn:hover .btn-icon {
    transform: scale(1.1);
}

/* フォーカス状態 */
.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.3);
}

/* Google Drive セクションの表示/非表示 */
.google-drive-section.hidden {
    display: none;
}