/* Basic styling for EKM DXF Kalkylator */
/* Container occupies full width and uses flexbox for left/right panels */
#ekm-dxf-calc {
    max-width: 100%;
    margin: 20px auto;
    background: #ffffff;
    padding: 15px;
    /* Needed for absolute positioning of popup */
    position: relative;
}
#ekm-dxf-calc form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
/* Left and right panels */
#ekm-left {
    flex: 2;
    min-width: 60%;
    box-sizing: border-box;
}
#ekm-right {
    flex: 1;
    min-width: 35%;
    box-sizing: border-box;
}
/* File block styling */
.ekm-file-block {
    border: 1px solid #ddd;
    padding: 10px;
    margin-bottom: 12px;
    background: #f9f9f9;
}
.ekm-file-block .ekm-row {
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
}
.ekm-file-block label {
    font-weight: 600;
    margin-bottom: 4px;
}
.ekm-file-block input[type="file"] {
    padding: 4px;
}
.ekm-file-block input[type="text"],
.ekm-file-block input[type="number"],
.ekm-file-block select {
    width: 100%;
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.ekm-file-preview {
    margin-top: 8px;
    position: relative;
}
.ekm-file-preview canvas {
    width: 100%;
    height: 200px;
    border: 1px solid #ccc;
    display: none;
}
.ekm-file-preview .ekm-preview-placeholder {
    display: block;
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 40px 0;
}
.ekm-file-preview .ekm-dimensions {
    margin-top: 4px;
    text-align: right;
    font-size: 12px;
    color: #333;
}

/* Per‑design price display */
.ekm-file-preview .ekm-part-price {
    margin-top: 2px;
    text-align: right;
    font-size: 12px;
    color: #333;
    font-weight: 600;
}
/* Right panel form fields */
#ekm-right .ekm-row {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
}
#ekm-right label {
    font-weight: 600;
    margin-bottom: 4px;
}
#ekm-right input[type="text"],
#ekm-right input[type="email"],
#ekm-right input[type="tel"],
#ekm-right input[type="number"],
#ekm-right textarea,
#ekm-right select {
    width: 100%;
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
#ekm-right textarea {
    resize: vertical;
}
.ekm-consent-row {
    display: flex;
    align-items: center;
}
.ekm-consent-row input[type="checkbox"] {
    margin-right: 8px;
}
/* Price display styling */
#ekm-price-display {
    font-size: 1.2em;
    margin-top: 20px;
}
#ekm-price-display strong {
    margin-right: 4px;
}
/* Buttons */
.button,
#ekm-submit {
    background-color: #0066cc;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
}
.button:hover,
#ekm-submit:hover {
    background-color: #0052a3;
}
/* Messages area */
#ekm-messages {
    margin-top: 12px;
    font-weight: 600;
}

/* toppbanner över båda kolumnerna */
/* Order popup banner spanning the top of the calculator.  When an order
   is submitted, the JS will insert a div with this class.  Center it
   horizontally, let it span nearly the full width, and ensure a
   visually prominent success background. */
.ekm-order-popup {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    /* Take almost the entire width of the calculator, minus a small margin */
    width: calc(100% - 30px);
    /* Allow the banner to grow up to the full width of the site container */
    max-width: 1140px;
    background: #003358; /* deep green to indicate success */
    color: #FF8D18;
    padding: 18px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
}

/* Additional popup shown beneath the primary success banner to remind users to
   check their spam folder.  It shares a similar width and position but
   appears lower on the page. */
.ekm-spam-popup {
    position: absolute;
    /* Place below the primary banner; this value may be adjusted if the banner height changes */
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: calc(100% - 30px);
    max-width: 1140px;
    background: #FF8D18; /* orange colour to draw attention */
    color: #003358;
    padding: 12px 18px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
}

/* skjut ner resten så bannern inte överlappar */
#ekm-dxf-calc form {
    padding-top: 72px;
}