/* Lane information/account: OpenCart form states + stock account pages in the static look (theme.css stays 1:1 with static) */

/* ---------- form states (common.js: .is-invalid / .invalid-feedback.d-block) ---------- */
.mk-form .invalid-feedback, .mk-acc-page .invalid-feedback { display: none; color: var(--mk-red, #CF2B1F); font-size: 12px; margin-top: 4px; }
.mk-form .invalid-feedback.d-block, .mk-acc-page .invalid-feedback.d-block, .mk-form .invalid-feedback:not(:empty).d-block { display: block; }
.mk-form .is-invalid .input, .mk-form .is-invalid .textarea, .mk-form .input.is-invalid,
.mk-acc-page .form-control.is-invalid, .mk-acc-page .form-select.is-invalid { border-color: var(--mk-red, #CF2B1F); }
.mk-form .input, .mk-form .textarea, .mk-form .select { background: #fff; }
.mk-form-alert { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-radius: 8px; background: #FDECEA; color: var(--mk-red, #CF2B1F); margin-bottom: 14px; font-size: 14px; }
.mk-form-alert-ok { background: #E8F5E9; color: #2E7D32; }

/* consent: checkbox and text on one line, the box is clickable */
.mk-consent { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.mk-consent .checkbox { flex: 0 0 auto; background: #fff; }
.mk-consent a { color: var(--mk-red, #CF2B1F); }

.mk-empty > p { margin: 0; }
.mk-empty .mk-btn-row { margin-top: 6px; }

/* ---------- stock account pages (edit, address, order, password, ...) ---------- */
.mk-acc-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.mk-acc-single { grid-template-columns: minmax(0, 760px); justify-content: center; }
.mk-acc-menu { padding: 12px; }
.mk-acc-menu .menu { padding: 0; width: 100%; }
.mk-acc-menu .menu a { border-radius: 8px; font-size: 14px; color: var(--mk-brown, #3C1400); }
.mk-acc-menu .menu a.active { background: var(--mk-orange, #FF503C); color: #fff; font-weight: 600; }
/* hover/focus/press: DaisyUI paints a black neutral bg under brown text - use the soft brand tint instead */
.mk-acc-menu .menu a:not(.active):hover,
.mk-acc-menu .menu a:not(.active):focus,
.mk-acc-menu .menu a:not(.active):active { background: #FFF1EF; color: var(--mk-red, #CF2B1F); outline: none; box-shadow: none; }
.mk-acc-menu .menu a:not(.active):focus-visible { box-shadow: inset 0 0 0 2px var(--mk-orange, #FF503C); }
.mk-acc-menu .menu a.active:hover,
.mk-acc-menu .menu a.active:focus,
.mk-acc-menu .menu a.active:active { background: var(--mk-orange, #FF503C); color: #fff; outline: none; }
.mk-acc-page { min-width: 0; }
.mk-acc-page h2, .mk-acc-page h3, .mk-acc-page legend { font-size: 18px; font-weight: 600; margin: 20px 0 12px; }
.mk-acc-page fieldset { border: 0; padding: 0; margin: 0; }
.mk-acc-page .row { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; margin: 0 0 12px; }
.mk-acc-page .row > .col, .mk-acc-page .row > [class*="col-"] { flex: 1 1 0; min-width: 0; padding: 0; }
.mk-acc-page .mb-3 { margin-bottom: 12px; }
.mk-acc-page fieldset .row.mb-3 { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 4px 16px; }
.mk-acc-page fieldset .row.mb-3 > * { padding: 0; }
.mk-acc-page .form-label, .mk-acc-page .col-form-label, .mk-acc-page label.col-sm-2 { display: block; font-weight: 500; margin-bottom: 4px; font-size: 14px; }
.mk-acc-page .required > .col-form-label::after, .mk-acc-page .required > .form-label::after { content: ' *'; color: var(--mk-red, #CF2B1F); }
.mk-acc-page .form-control, .mk-acc-page .form-select { width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--mk-line, #D9D9D9); border-radius: 8px; background: #fff; font: inherit; font-size: 14px; }
.mk-acc-page textarea.form-control { height: auto; padding: 10px 14px; }
.mk-acc-page .form-check { display: inline-flex; align-items: center; gap: 8px; margin-right: 16px; }
.mk-acc-page .form-check-input { width: 18px; height: 18px; accent-color: var(--mk-orange, #FF503C); }
.mk-acc-page .form-switch .form-check-input { width: 36px; }
/* toggle switch (newsletter etc.): real switch instead of bare checkbox */
.mk-acc-page .form-switch { margin: 0; }
.mk-acc-page .form-switch .form-check-input { -webkit-appearance: none; appearance: none; position: relative; flex: 0 0 auto; width: 44px; height: 24px; margin: 0; border-radius: 999px; background: var(--mk-line, #D9D9D9); cursor: pointer; transition: background .2s; }
.mk-acc-page .form-switch .form-check-input::before { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.mk-acc-page .form-switch .form-check-input:checked { background: var(--mk-orange, #FF503C); }
.mk-acc-page .form-switch .form-check-input:checked::before { transform: translateX(20px); }
.mk-acc-page .form-switch .form-check-input:focus-visible { outline: 2px solid var(--mk-orange, #FF503C); outline-offset: 2px; }
/* newsletter: one bordered option row, buttons below a divider */
.mk-acc-page #form-newsletter fieldset .row.mb-3 { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; margin: 4px 0 20px; padding: 16px 18px; border: 1px solid var(--mk-line, #D9D9D9); border-radius: 12px; background: #FAFAFA; }
.mk-acc-page #form-newsletter fieldset .row.mb-3 > * { flex: 0 1 auto; width: auto; max-width: none; }
.mk-acc-page #form-newsletter .col-form-label { margin: 0; font-size: 15px; }
.mk-acc-page #form-newsletter > .row:last-child { padding-top: 16px; border-top: 1px solid var(--mk-line, #D9D9D9); margin-bottom: 0; }
.mk-acc-page .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 18px; border-radius: 8px; font-weight: 600; font-size: 14px; border: 1px solid transparent; text-decoration: none; white-space: nowrap; }
.mk-acc-page .btn-primary { background: var(--mk-orange, #FF503C); border-color: var(--mk-orange, #FF503C); color: #fff; }
.mk-acc-page .btn-light, .mk-acc-page .btn-secondary, .mk-acc-page .btn-outline-secondary { background: #fff; border-color: var(--mk-line, #D9D9D9); color: var(--mk-brown, #3C1400); }
.mk-acc-page .btn-info, .mk-acc-page .btn-danger { min-height: 34px; padding: 0 10px; background: var(--mk-bg, #F2F2F2); border-color: var(--mk-line, #D9D9D9); color: var(--mk-brown, #3C1400); }
.mk-acc-page .btn i, .mk-acc-page .btn .fa-solid { line-height: 1; }
.mk-acc-page .text-end { text-align: right; }
.mk-acc-page .text-start { text-align: left; }
.mk-acc-page .text-center { text-align: center; }
.mk-acc-page .float-end { float: right; }
.mk-acc-page .d-inline-block { display: inline-block; }
.mk-acc-page .table-responsive { overflow-x: auto; max-width: 100%; }
.mk-acc-page table.table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0 0 16px; }
.mk-acc-page table.table th, .mk-acc-page table.table td { padding: 10px 12px; border-bottom: 1px solid var(--mk-line, #D9D9D9); vertical-align: middle; }
.mk-acc-page table.table thead td, .mk-acc-page table.table thead th { font-weight: 600; background: var(--mk-bg, #F2F2F2); }
.mk-acc-page .list-group { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.mk-acc-page .list-group-item { display: block; padding: 12px 14px; border-radius: 8px; background: var(--mk-bg, #F2F2F2); }
.mk-acc-page .pagination { display: flex; gap: 6px; list-style: none; padding: 0; }
.mk-acc-page .pagination a, .mk-acc-page .pagination span { display: inline-flex; min-width: 36px; height: 36px; align-items: center; justify-content: center; border: 1px solid var(--mk-line, #D9D9D9); border-radius: 8px; }
.mk-acc-page .alert { padding: 10px 14px; border-radius: 8px; background: var(--mk-bg, #F2F2F2); margin-bottom: 12px; }
.mk-acc-page .breadcrumb { display: none; }
.mk-acc-page p { margin: 0 0 10px; }
.mk-acc-page a:not(.btn) { color: var(--mk-red, #CF2B1F); }
.mk-acc-page .card { background: #fff; border: 1px solid var(--mk-line, #D9D9D9); border-radius: 8px; margin-bottom: 12px; }
.mk-acc-page .card-header { padding: 10px 14px; font-weight: 600; border-bottom: 1px solid var(--mk-line, #D9D9D9); }
.mk-acc-page .card-body { padding: 14px; }
.mk-acc-page .input-group { display: flex; }
.mk-acc-page .fa-solid, .mk-acc-page .fa-regular { font-style: normal; }
.mk-acc-page .fa-pencil::before { content: '\270E'; }
.mk-acc-page .fa-trash-can::before, .mk-acc-page .fa-trash::before { content: '\2715'; }
.mk-acc-page .fa-eye::before { content: ''; display: block; width: 16px; height: 16px; background-color: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8h10M9 4l4 4-4 4'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8h10M9 4l4 4-4 4'/%3E%3C/svg%3E") center / contain no-repeat; }
.mk-acc-page table.table .btn-info, .mk-acc-page table.table .btn-danger { width: 36px; height: 36px; min-height: 36px; padding: 0; flex: 0 0 auto; }
.mk-acc-page table.table .btn-info .fa-eye { display: block; width: 16px; height: 16px; }
.mk-acc-page table.table .btn-primary { width: 36px; height: 36px; min-height: 36px; padding: 0; flex: 0 0 auto; }
.mk-acc-page table.table .fa-cart-shopping, .mk-acc-page table.table .fa-reply { display: block; width: 16px; height: 16px; }
.mk-acc-page .fa-cart-shopping::before, .mk-acc-page .fa-reply::before { content: ''; display: block; width: 16px; height: 16px; background-color: currentColor; -webkit-mask: var(--mk-ico) center / contain no-repeat; mask: var(--mk-ico) center / contain no-repeat; }
.mk-acc-page .fa-cart-shopping::before { --mk-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5h2.2l1.6 8.2h7.6l1.6-5.7H4'/%3E%3Ccircle cx='6' cy='13.5' r='1.2'/%3E%3Ccircle cx='11.5' cy='13.5' r='1.2'/%3E%3C/svg%3E"); }
.mk-acc-page .fa-reply::before { --mk-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3L2 7l4 4'/%3E%3Cpath d='M2 7h7a5 5 0 0 1 5 5v1'/%3E%3C/svg%3E"); }
.mk-acc-page .fa-circle-exclamation::before { content: '!'; }

@media (max-width: 767px) {
  .mk-acc-layout { grid-template-columns: minmax(0, 1fr); }
  .mk-acc-menu { padding: 8px; order: 2; }
  .mk-acc-menu .menu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; overflow: visible; }
  .mk-acc-menu .menu li { min-width: 0; }
  .mk-acc-menu .menu a { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 40px; padding: 6px 8px; font-size: 13px; line-height: 1.25; text-align: center; white-space: normal; overflow-wrap: anywhere; background: var(--mk-bg, #F2F2F2); }
  .mk-acc-menu .menu a.active { background: var(--mk-orange, #FF503C); }
  .mk-acc-page .row { flex-direction: column; align-items: stretch; }
  .mk-acc-page fieldset .row.mb-3 { grid-template-columns: minmax(0, 1fr); }
  .mk-acc-page .text-end { text-align: left; }
  /* button rows (Wstecz + Wyślij/Dalej): stay in one line, back left, submit right */
  .mk-acc-page .row.mk-btn-line { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .mk-acc-page .row.mk-btn-line > [class*="col"] { flex: 0 1 auto; width: auto; max-width: 100%; }
  .mk-acc-page .row.mk-btn-line > .text-end { margin-left: auto; text-align: right; }
  /* tables -> cards: no horizontal scroll (labels: data-label from pages.js) */
  .mk-acc-page .table-responsive { overflow: visible; }
  .mk-acc-page table.table, .mk-acc-page table.table tbody, .mk-acc-page table.table tfoot, .mk-acc-page table.table tr, .mk-acc-page table.table td { display: block; width: 100%; }
  .mk-acc-page table.table thead { display: none; }
  .mk-acc-page table.table tbody tr { margin-bottom: 10px; padding: 2px 12px; border: 1px solid var(--mk-line, #D9D9D9); border-radius: 8px; }
  .mk-acc-page table.table td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; text-align: right; overflow-wrap: anywhere; }
  .mk-acc-page table.table tbody tr td:last-child { border-bottom: 0; }
  .mk-acc-page table.table td::before { content: attr(data-label); flex: 0 0 auto; max-width: 45%; font-weight: 600; text-align: left; }
  .mk-acc-page table.table td:not([data-label])::before, .mk-acc-page table.table td[data-label=""]::before { content: none; }
  .mk-acc-page table.table td:not([data-label]), .mk-acc-page table.table td[data-label=""] { justify-content: flex-end; }
  .mk-acc-page table.table td[colspan]:only-child { justify-content: center; text-align: center; }
  .mk-acc-page table.table tfoot tr { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--mk-line, #D9D9D9); }
  .mk-acc-page table.table tfoot td { width: auto; border: 0; }
  /* order info (marks from pages.js): one card per key/value table, label left + value right; long text stacked, left-aligned */
  .mk-order-info table.table.mk-kv { margin-bottom: 10px; padding: 2px 12px; border: 1px solid var(--mk-line, #D9D9D9); border-radius: 8px; }
  .mk-order-info table.table.mk-kv tbody tr { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0; padding: 0; border: 0; border-radius: 0; border-bottom: 1px solid var(--mk-line, #D9D9D9); }
  .mk-order-info table.table.mk-kv tbody tr:last-child { border-bottom: 0; }
  .mk-order-info table.table.mk-kv td { display: block; width: auto; padding: 10px 0; border: 0; }
  .mk-order-info table.table.mk-kv td:first-child { flex: 0 0 auto; max-width: 50%; text-align: left; }
  .mk-order-info table.table.mk-kv td:last-child { flex: 1 1 auto; min-width: 0; text-align: right; }
  .mk-order-info table.table td.mk-stack { display: block; text-align: left; }
  .mk-order-info table.table td.mk-stack::before { display: block; max-width: none; margin-bottom: 4px; }
  .mk-order-info table.table td.text-nowrap { justify-content: flex-end; gap: 8px; }
  .mk-order-info table.table td.text-nowrap::before { margin-right: auto; }
  .mk-order-info table.table tfoot td:empty { display: none; }
  /* detail table (one colspan header, e.g. return info): titled card, cells as plain left-aligned lines */
  .mk-acc-page table.table.mk-detail { border: 1px solid var(--mk-line, #D9D9D9); border-radius: 8px; overflow: hidden; }
  .mk-acc-page table.table.mk-detail thead, .mk-acc-page table.table.mk-detail thead tr { display: block; }
  .mk-acc-page table.table.mk-detail thead td { display: block; width: auto !important; padding: 10px 12px; text-align: left; }
  .mk-acc-page table.table.mk-detail tbody tr { margin: 0; padding: 0 12px; border: 0; border-radius: 0; }
  .mk-acc-page table.table.mk-detail td { display: block; width: auto !important; padding: 10px 0; text-align: left; line-height: 1.6; }
  .mk-acc-page table.table.mk-detail td::before { content: none; }
  .mk-acc-page .row > [class*="col"] { width: 100%; max-width: 100%; }
  .mk-acc-page .pagination { flex-wrap: wrap; }
}
