/*
 * Do Progetto - English Prices / Terms of Service (page 446).
 *
 * Loaded by the MU plugin only on the administrator's responsive preview.
 * No modifications to post content, public page styles or desktop layout.
 *
 * Scope: narrow-screen layout, preserving the existing visual identity.
 */
@media screen and (max-width: 600px) {

    /* Remove the legacy float layout and fixed widths. */
    #price_up_left,
    #price_up_right {
        float: none;
        width: 100%;
        max-width: 100%;
        margin: 14px 0;
        box-sizing: border-box;
    }

    /* Honor narrow viewports, including the legacy width=420 table. */
    #price_up_left table {
        width: 100% !important;
        max-width: 100%;
        margin: 12px 0 18px !important;
        border-collapse: collapse;
        table-layout: auto;
        box-sizing: border-box;
    }

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

    #price_up_left table td {
        padding: 5px 6px 7px 0;
        vertical-align: top;
        box-sizing: border-box;
        font-size: 14px;
        line-height: 1.65;
        white-space: normal;
        overflow-wrap: break-word;
    }

    /* Give English 'Rent by the hour/day' labels more room. */
    #price_up_left table.left_margin td:first-child {
        width: 90px !important;
        min-width: 0;
    }

    /* Longer English business-hours and closing-day labels. */
    #price_up_left table.up_margin td:first-child {
        width: 115px !important;
        min-width: 0;
    }

    /* Avoid overlapping text caused by the legacy p line-height. */
    #price_up_left p,
    #price_up_left .pw {
        font-size: 14px;
        line-height: 1.7;
        margin: 4px 0;
        overflow-wrap: break-word;
    }

    #price_up_left table td div[style*="font-size"] {
        line-height: 1.3;
    }

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

    /* Retain the facility drawing and the PDF download control. */
    #price_up_right img {
        max-width: 100%;
        height: auto;
    }

    #price_up_right p.pw {
        font-size: 13px;
        line-height: 1.6;
    }

    /* Terms of Service: remove wide desktop indentation. */
    #map_down,
    #rules {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        box-sizing: border-box;
    }

    #map_down .price_title_nomarg {
        margin-left: 0;
        line-height: 1.6;
    }

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

    .rule1,
    .rule2 {
        width: 100%;
        max-width: 100%;
        margin: 10px 0 16px;
        box-sizing: border-box;
        font-size: 15px;
        line-height: 1.75;
        overflow-wrap: break-word;
    }

    .rule1 p,
    .rule2 p,
    #rules > p {
        margin: 8px 0;
        font-size: 15px;
        line-height: 1.75;
        overflow-wrap: break-word;
    }

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

    .rule1 li,
    .rule2 li,
    #rules > ul > li {
        margin: 0 0 6px;
        font-size: 15px;
        line-height: 1.75;
        overflow-wrap: break-word;
    }
}
