/*
 * Do Progetto / 料金・規約 page (ID 83): responsive preview only.
 *
 * Loaded through doprogetto-price-preview.php and NOT shown to visitors.
 * Existing desktop rules are unchanged; these adjustments apply at <=600px.
 */
@media screen and (max-width: 600px) {

    /* Price block: remove legacy fixed widths and horizontal indentation. */
    #price_up_left,
    #price_up_right {
        float: none;
        width: 100%;
        max-width: 100%;
        margin: 14px 0;
        box-sizing: border-box;
    }

    #price_up_left table {
        width: 100% !important;  /* Overrides legacy HTML width=320/420. */
        max-width: 100%;
        margin: 10px 0 16px !important;
        table-layout: auto;
        border-collapse: collapse;
        box-sizing: border-box;
    }

    #price_up_left table td {
        padding: 4px 5px 6px 0;
        vertical-align: top;
        white-space: normal;
        overflow-wrap: anywhere;
        line-height: 1.65;
        font-size: 14px;
    }

    /* Two pricing rows: bullet / time is narrower than descriptive text. */
    #price_up_left table.left_margin td:first-child {
        width: 60px !important;
        min-width: 0;
    }

    /* Business hours and closing days: retain readable label widths. */
    #price_up_left table.up_margin td:first-child {
        width: 108px !important;
        min-width: 0;
    }

    #price_up_left .left_margin,
    #price_up_left .up_margin {
        margin-left: 0;
    }

    #price_up_left p,
    #price_up_left .pw,
    #price_up_right p {
        line-height: 1.7;
        font-size: 14px;
        overflow-wrap: anywhere;
    }

    #price_up_left .price_title,
    #price_up_left .price_title_nomarg {
        line-height: 1.55;
    }

    #price_up_right img {
        max-width: 100%;
        height: auto;
    }

    /* Terms of use: readable text without old large indents. */
    #map_down,
    #rules {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        box-sizing: border-box;
    }

    .rule_title {
        width: 100%;
        max-width: 100%;
        margin: 20px 0 10px;
        padding: 10px 12px;
        box-sizing: border-box;
        line-height: 1.6;
        font-size: 14px;
    }

    .rule1,
    .rule2 {
        width: 100%;
        max-width: 100%;
        margin: 8px 0 16px;
        box-sizing: border-box;
        font-size: 14px;
        line-height: 1.8;
        overflow-wrap: anywhere;
    }

    .rule1 p,
    .rule2 p,
    #rules > p {
        font-size: 14px;
        line-height: 1.8;
        margin: 8px 0;
        overflow-wrap: anywhere;
    }

    .rule1 ul,
    .rule2 ul,
    #rules > ul {
        margin: 8px 0 14px;
        padding-left: 20px;
    }

    .rule1 li,
    .rule2 li,
    #rules > ul > li {
        font-size: 14px;
        line-height: 1.8;
        margin: 0 0 5px;
        overflow-wrap: anywhere;
    }
}

/*
 * Do Progetto - Price page whitespace fix (Step 102)
 * For administrator-only responsive price preview.
 *
 * The current page (ID 83) contains 21 paragraphs in the
 * #price_up_right section: 20 <p>&nbsp;</p> spacers and
 * one meaningful <p class="pw">PDF size</p> label.
 * Keep the .pw text and suppress legacy spacer paragraphs.
 *
 * This file is appended to the existing dp-price-preview.css.
 */
@media screen and (max-width: 859px) {
    #price_up_right p:not(.pw) {
        display: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}
