/**
 * DRM-DB更新機能のスタイル
 */

/* ========================================
   メインコンテナ
   ======================================== */

.drm-db-update-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 20px 20px;
}

/* ========================================
   ツールバー
   ======================================== */

.drm-db-update-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.drm-db-update-status {
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
    line-height: 1.4;
}

.drm-db-update-buttons {
    display: flex;
    gap: 10px;
}

.drm-db-update-buttons .btn {
    padding: 8px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
    min-width: 80px;
}

/* ========================================
   コンテンツコンテナ
   ======================================== */

.drm-db-update-content {
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

/* ========================================
   説明書き
   ======================================== */

.drm-db-update-description {
    background-color: #e7f3ff;
    border: 1px solid #b3d7ff;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.drm-db-update-description p {
    margin: 8px 0;
    line-height: 1.6;
    color: #495057;
    font-size: 14px;
}

.drm-db-update-description p:first-child {
    margin-top: 0;
}

.drm-db-update-description p:last-child {
    margin-bottom: 0;
}

/* ========================================
   バージョンオプション
   ======================================== */

.drm-version-options {
    margin-bottom: 25px;
}

.drm-version-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    margin-bottom: 15px;
    border: 2px solid #ddd;
    border-radius: 4px;
    background-color: #fafafa;
    transition: all 0.3s ease;
}

.drm-version-option:hover {
    background-color: #f0f0f0;
}

.drm-version-option.selected {
    border-color: #2196F3;
    background-color: #e3f2fd;
}

.drm-radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    flex: 0 0 auto;
    min-width: 300px;
}

.drm-radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.drm-version-label {
    font-weight: 500;
    color: #333;
}

.drm-version-value {
    color: #2196F3;
    font-weight: bold;
}

.drm-version-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.drm-version-input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.drm-version-input:focus {
    outline: 0;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* ========================================
   ファイルアップロードセクション
   ======================================== */

.drm-file-upload-section {
    margin-bottom: 25px;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.drm-file-label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
}

.drm-file-label .required {
    color: #dc3545;
    margin-left: 4px;
}

.drm-file-upload-section input[type="file"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.drm-file-upload-section input[type="file"]:focus {
    outline: 0;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.drm-file-info {
    margin-top: 8px;
}

.drm-file-info small {
    color: #6c757d;
    font-size: 12px;
}

/* ========================================
   更新アクション
   ======================================== */

.drm-update-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.drm-update-actions .btn {
    min-width: 150px;
    padding: 10px 24px;
    font-size: 16px;
    font-weight: 500;
}

/* ========================================
   ボタンスタイル
   ======================================== */

.btn {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 2px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-primary:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #1e7e34;
}

/* ========================================
   フォームコントロール
   ======================================== */

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    outline: 0;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* ========================================
   レスポンシブ対応
   ======================================== */

/* タブレット向け（768px以下） */
@media (max-width: 768px) {
    .drm-db-update-container {
        padding: 10px;
    }
    
    .drm-db-update-toolbar {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
        padding: 15px;
    }
    
    .drm-db-update-status {
        text-align: center;
        font-size: 0.85rem;
    }
    
    .drm-db-update-buttons {
        justify-content: center;
    }
    
    .drm-db-update-buttons .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        min-width: 100px;
    }
    
    .drm-version-option {
        flex-direction: column;
        align-items: stretch;
    }

    .drm-radio-label {
        min-width: auto;
        width: 100%;
    }

    .drm-version-input {
        width: 100%;
    }

    .drm-update-actions {
        flex-direction: column;
    }

    .drm-update-actions .btn {
        width: 100%;
    }
}

/* スマートフォン向け（480px以下） */
@media (max-width: 480px) {
    .drm-db-update-toolbar {
        padding: 12px;
        gap: 12px;
    }
    
    .drm-db-update-status {
        font-size: 0.8rem;
    }
    
    .drm-db-update-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .drm-db-update-buttons .btn {
        padding: 8px 16px;
        font-size: 0.85rem;
        min-width: auto;
        width: 100%;
    }
}

/* ========================================
   アップロードプログレスオーバーレイ
   ======================================== */

.drm-upload-progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.drm-upload-progress-box {
    background: white;
    border-radius: 8px;
    padding: 30px 40px;
    min-width: 320px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.drm-upload-progress-title {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
}

.drm-upload-progress-bar-container {
    width: 100%;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.drm-upload-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.drm-upload-progress-percent {
    margin: 10px 0 0 0;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
}

/* ========================================
   選択ファイル一覧
   ======================================== */

.drm-file-list {
    margin-top: 8px;
}

.drm-file-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    margin-bottom: 4px;
    font-size: 13px;
}

.drm-file-list-name {
    color: #495057;
}

.drm-file-list-size {
    color: #6c757d;
    font-size: 12px;
    white-space: nowrap;
    margin-left: 10px;
}
