/* assets/pdf-builder.css */

/* --- 共通コンテナとカード --- */
.apb-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
}
.apb-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
    margin-top: 20px;
    padding: 20px;
    border-radius: 4px;
}
.apb-sec-title {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

/* --- ボタンとフォーム要素 --- */
.apb-btn {
    display: inline-block;
    padding: 5px 10px;
    text-decoration: none;
    border: 1px solid #ccc;
    background: #f7f7f7;
    color: #0073aa;
    cursor: pointer;
    border-radius: 3px;
    font-size: 13px;
    line-height: 1.5;
    transition: background-color 0.2s;
}
.apb-btn:hover { opacity: 0.8; }
.apb-btn.-primary { background: #007cba; border-color: #007cba; color: #fff; }
.apb-btn.-ghost { background: transparent; color: #555; border-color: #ccc; }
.apb-btn.-sm { padding: 3px 8px; font-size: 12px; }

.apb-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #c3c4c7;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .07);
    border-radius: 4px;
    box-sizing: border-box;
}

/* --- リストツールバー --- */
.apb-list-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
}

/* --- テーブル（フロントエンド用） --- */
.apb-front-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0;
}
.apb-w64 { width: 64px; }
.apb-w80 { width: 80px; }
.apb-w120 { width: 120px; }

/* --- その他UI --- */
.apb-breadcrumbs { font-size: 14px; margin-bottom: 15px; color: #555; }
.apb-breadcrumbs .sep { margin: 0 5px; color: #ccc; }
.apb-error { padding: 10px; border: 1px solid #dc3232; background-color: #fbeaea; color: #dc3232; border-radius: 4px; }


/* ==============================================
 * レスポンシブ対応 (モバイル優先)
 * ============================================== */
@media (max-width: 782px) {
    .apb-container {
        padding: 0 10px;
    }

    /* フォームボタンを幅いっぱいに */
    .apb-btn.-primary, 
    .apb-upload-form-wrapper input[type="submit"] {
        width: 100%;
        box-sizing: border-box;
    }

    /* ツールバーの調整 */
    .apb-list-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    /* テーブルの調整 (apb-front-table) */
    .apb-front-table thead { display: none; }
    .apb-front-table tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #ccc;
        border-radius: 4px;
    }
    .apb-front-table tbody td {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
        border-bottom: 1px dotted #eee;
        padding: 8px 10px;
        text-align: right;
    }
    .apb-front-table tbody td:last-child { border-bottom: none; }
    
    /* data-label属性を利用してラベルを表示 */
    .apb-front-table tbody td::before {
        content: attr(data-label) ": "; 
        font-weight: 600;
        display: inline-block;
        float: left;
        min-width: 100px;
    }
    
    /* ページネーションの調整 */
    .apb-pagination {
        justify-content: space-between;
    }
    .apb-pagination .apb-page-info {
        order: -1;
    }
}