/*
Theme Name:  Sales Plan Map
Theme URI:   https://www.salesplanmap.com
Author:      SalesPlanMap
Author URI:  https://www.salesplanmap.com
Description: Minimal theme bundled with the Sales Plan Map System plugin. Provides a clean full-page layout for the map and rep portal pages — no navigation, no theme padding, no interference.
Version:     1.0.0
License:     GNU General Public License v2 or later
Text Domain: spms-theme
*/

/* Global box-sizing reset — standard practice.
   Google Maps containers are explicitly reset back to content-box below. */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Google Maps MUST use content-box — its internal tile grid breaks with border-box.
   Reset all map containers back to default. */
#spms-map *,
#spms-pin-map * {
    box-sizing: content-box !important;
    max-width: none !important;
}

/* All styling is handled by the SPMS plugin inline CSS and Theme Manager. */
html, body {
    margin: 0;
    padding: 0;
    background: #f5f7fa;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
}

/* ── SPMS Popup — mobile overflow fix ──────────────────────────────────────
   The popup overlay has padding:20px on all sides. On small screens the
   modal body's 24px horizontal padding causes inputs to overflow. We reduce
   inner padding on narrow viewports and ensure nothing escapes the modal.   */
@media (max-width: 480px) {
    /* Tighten overlay padding so modal has more room */
    .spms-location-modal-overlay {
        padding: 8px !important;
    }
    /* Tighten modal body padding */
    .spms-modal-body {
        padding: 14px 14px !important;
    }
    /* Prevent any child element overflowing the modal width */
    .spms-location-modal,
    .spms-modal-body {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    /* Inputs, selects, textareas — full width, no overflow */
    .spms-modal-body input,
    .spms-modal-body select,
    .spms-modal-body textarea {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
    /* Mini-map inside popup — exclude Google Maps internals from wildcard rules */
    #spms-pin-map {
        width: 100% !important;
        box-sizing: border-box !important;
    }
    /* Google Maps internal elements must not be constrained */
    #spms-pin-map * {
        max-width: none !important;
        box-sizing: content-box !important;
    }
}
