/* =========================================================================
   Cadware MiniCRM Inline — layout for structures the site CSS doesn't cover.

   Deliberately minimal: colours, fonts, paddings and field styling all stay
   in the existing WPCode stylesheet. This file only handles the pieces that
   stylesheet has no rules for — multi-option checkbox groups and the
   select placeholder state — so nothing here fights your design.
   ========================================================================= */

/* --- checkbox groups (e.g. "Produs" with one box per product) ------------ */

/* The group block itself spans the row, but the options inside flow
   side by side and wrap, instead of stacking one per line. */
body .cadware-minicrm .InputBlock.minicrm-checkbox-group {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    gap: 12px 28px !important;
}

body .cadware-minicrm .InputBlock.minicrm-checkbox-group > div {
    display: contents !important;
}

body .cadware-minicrm .minicrm-checkbox-group .SetLabel {
    display: inline-flex !important;
    align-items: center !important;
    width: auto !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    gap: 10px !important;
    white-space: nowrap !important;
}

body .cadware-minicrm .minicrm-checkbox-group .SetLabel input[type="checkbox"] {
    margin: 0 !important;
}

body .cadware-minicrm .minicrm-checkbox-group .CheckBoxLabel {
    white-space: nowrap !important;
}

/* Narrow screens: let long option names wrap rather than overflow. */
@media (max-width: 767px) {
    body .cadware-minicrm .InputBlock.minicrm-checkbox-group {
        gap: 12px 18px !important;
    }

    body .cadware-minicrm .minicrm-checkbox-group .SetLabel,
    body .cadware-minicrm .minicrm-checkbox-group .CheckBoxLabel {
        white-space: normal !important;
    }
}

/* --- select placeholder state -------------------------------------------- */

/* Greyed out until a real option is chosen, matching input placeholders. */
body .cadware-minicrm select.is-placeholder {
    color: #888 !important;
}

body .cadware-minicrm select.has-value {
    color: #666 !important;
}

/* --- consent rows and field descriptions --------------------------------- */

/* Checkbox blocks span the row and start at the left edge, so every consent
   row lines up with the fields above it rather than drifting to the middle. */
body .cadware-minicrm .InputBlock.minicrm-checkbox,
body .cadware-minicrm .InputBlock.minicrm-gdpr,
body .cadware-minicrm .InputBlock.minicrm-newsletter {
    display: block !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    text-align: left !important;
}

body .cadware-minicrm .InputBlock.minicrm-checkbox > div,
body .cadware-minicrm .InputBlock.minicrm-gdpr > div,
body .cadware-minicrm .InputBlock.minicrm-newsletter > div {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
}

/* MiniCRM's "Descriere" text: same colour and typography as the consent
   wording next to the checkbox, indented to line up with that text rather
   than sitting under the box. */
body .cadware-minicrm .minicrm-description {
    display: block !important;
    width: 100% !important;
    /* Lines up with the text inside the field above it (the input's own
       left padding), so a hint sits under the words it refers to. */
    margin: 8px 0 0 0 !important;
    padding-left: 26px !important;
    padding: 0 !important;
    text-align: left !important;
    font-size: 16px !important;
    line-height: 1.7 !important;
    font-weight: 400 !important;
    color: #666 !important;
    opacity: 1 !important;
    font-style: normal !important;
}

body .cadware-minicrm .minicrm-description p {
    margin: 0 !important;
    color: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
}

body .cadware-minicrm .minicrm-description a {
    color: #4a76a8 !important;
    text-decoration: underline !important;
}

@media (max-width: 767px) {
    body .cadware-minicrm .minicrm-description {
        margin-left: 0 !important;
        font-size: 15px !important;
    }
}

/* Inside a consent row the description lines up with the wording beside the
   checkbox instead, which sits further right than a field's text. */
body .cadware-minicrm .InputBlock.minicrm-checkbox .minicrm-description,
body .cadware-minicrm .InputBlock.minicrm-gdpr .minicrm-description,
body .cadware-minicrm .InputBlock.minicrm-newsletter .minicrm-description {
    padding-left: 32px !important;
}

@media (max-width: 767px) {
    body .cadware-minicrm .minicrm-description,
    body .cadware-minicrm .InputBlock.minicrm-checkbox .minicrm-description,
    body .cadware-minicrm .InputBlock.minicrm-gdpr .minicrm-description,
    body .cadware-minicrm .InputBlock.minicrm-newsletter .minicrm-description {
        padding-left: 20px !important;
    }
}
