/* page header,body,footer height */
/* (レイアウトが崩れるので) */
div.page_header {
    height: auto;
}
div.page_body {
    overflow: scroll;
}
div.page_footer {
    height: auto;
    overflow: auto;
}

/* search box width */
/* サーチボックスの幅が広すぎ */
input {
    max-width: 30%;
}

/* table vertical align */
/* (狭い画面幅だと文字の折り返しでセルの高さが高くなりがち。
   ファイル名やプロジェクト名部分など、中央に合わせた方が見た目が良い) */
td {
    vertical-align: middle;
}
table.object_header > tr > td {
    vertical-align: top;
}

/* narrow screen device */
/* (幅か狭いデバイス用の設定) */
@media screen and (max-width:480px){
    body { margin: 0; }
    td { word-wrap: break-word; }
    table { padding-left: 1px; padding-right: 1px;}
    /* source code */
    /* (ソースの文字を小さくする) */
    td.pre, div.pre, div.diff {
        font-size: 8px;
    }
    /* file list */
    /* (ファイル一覧のモード列とサイズ列を消す) */
    td.mode { display: none; font-size: 0; width: 0; padding: 0;}
    td.size { display: none; font-size: 0; width: 0; padding: 0;}
    /* project list */
    /* (プロジェクトリストの幅を画面に合わせ、description列を消し、
        その他の列の幅を指定する) */
    table.project_list {
        display: fixed;
        width: 100%;
    }
    table.project_list > tr {
        width: 100%;
    }
    table.project_list > tr > td:nth-child(1) {
        max-width: 150px;
    }
    table.project_list > tr > th:nth-child(2){display:none; width:0; padding:0;}
    table.project_list > tr > td:nth-child(2){display:none; width:0; padding:0;}
    table.project_list > tr > td:nth-child(3) { width: 4em;}
    table.project_list > tr > td:nth-child(4) { width: 6.5em;}
    /* shortlog */
    /* (shortlogのレイアウトを横に幅を取らないように) */
    div.title_text {
        padding: 4px;
    }
    div.log_link {
        float: none;
    }
    div.log_body {
        padding: 4px;
    }
    /* (shortlogテーブルの幅を画面に合わせて列の幅を調整) */
    table.shortlog {
        table-layout: fixed;
        width: 100%;
    }
    table.shortlog > tr{
        width: 100%;
    }
    table.shortlog > tr > td:nth-child(1) {width: 4em;}
    table.shortlog > tr > td:nth-child(2) {width: 20%;}
    table.shortlog > tr > td:nth-child(4) {width: 6.5em;}
    /* log */
    /* (logのコミット経過時間とコミットログとの間に改行を挟む。
        横に長くならないように) */
    div.header > a.title > span.age {
        width: 100%;
    }
    /* tags */
    /* (タグ一覧のテーブル幅を画面に合わせ、列の幅を調整) */
    table.tags {
        table-layout: fixed;
        width: 100%;
    }
    table.tags > tr{
        width: 100%;
    }
    table.tags > tr > td:nth-child(1) {width: 4em;}
    table.tags > tr > td:nth-child(4) {width: 2.5em;}
    table.tags > tr > td:nth-child(5) {width: 5em;}
    /* object header */
    /* (gitオブジェクトヘッダーテーブルの幅を画面に合わせ、列の幅を調整)*/
    table.object_header {
        table-layout: fixed;
        width: 100%;
    }
    table.object_header > tr {
        width: 100%;
    }
    table.object_header > tr > td:nth-child(1) {width: 4em;}
    table.object_header > tr > td:nth-child(3) {width: 5em;}
    /* history */
    /* (履歴一覧テーブルの幅を画面に合わせ、列の幅を調整)*/
    table.history {
        table-layout: fixed;
        width: 100%;
    }
    table.history > tr {
        width: 100%;
    }
    table.history > tr > td:nth-child(1) {width: 4em;}
    table.history > tr > td:nth-child(2) {width: 4em;}
    table.history > tr > td:nth-child(4) {width: 6.5em;}
}

/* link buttons */
/* (リンクの見た目をボタンにする) */
td.link > a,
div.page_nav > a,
div.log_link > a,
td.selflink > a {
    display: inline-block;
    background: #ffffff;
    padding: 2px;
    margin: 1px 1px;
    font-weight: bold;
    font-size: 11px;
    color: black;
    text-decoration: none;
    border-radius: 3px;
    border: 1px solid #e0e0e0;
}
td.link > a:visited,
div.page_nav > a:visited,
div.log_link > a:visited,
td.selflink > a:visited {
    color: black;
}

/* small buttons */
div.log_link > a {
    font-size: 70%;
}

/* log */
/* (ログのボタンの位置を調整) */
div.log_link {
    margin-top: -6px;
    padding: 0 0 4px 0;
    width: 150px;
}

/* expand anchor clickable area */
/* (ファイル名やプロジェクト名のリンクを押しやすくする) */
table.tree > tr > td.list
{
    padding: 0;
}
table.tree > tr > td.list > a,
table.project_list > tr > td > a.list
{
    display: block;
    padding: 0.4em 1em;
}
