/* ============================================================
   MC Login / Register Widget
   ============================================================ */

/* ── Elementor wrapper reset ──────────────────────────────── */
.elementor-widget-mc-login-register,
.elementor-widget-mc-login-register .elementor-widget-container {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.elementor-widget-mc-login-register .mc-lr-wrapper {
    padding: 0 !important;
}

/* ── Button reset (global theme overrides) ────────────────── */
.mc-lr-wrapper button,
.mc-lr-wrapper input[type="submit"] {
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
    text-transform: none;
    letter-spacing: normal;
    box-sizing: border-box;
}

/* ── Wrapper ──────────────────────────────────────────────── */
.mc-lr-wrapper {
    width: 100%;
    box-sizing: border-box;
}

/* ── Two-column grid ──────────────────────────────────────── */
.mc-lr-grid {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 48px;
    width: 100%;
    box-sizing: border-box;
}

.mc-lr-col {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* ── Divider ──────────────────────────────────────────────── */
.mc-lr-divider {
    width: 1px;
    background-color: #e8e8e8;
    flex-shrink: 0;
    align-self: stretch;
}

/* ── Heading block ────────────────────────────────────────── */
.mc-lr-heading-wrap {
    margin-bottom: 24px;
}

.mc-lr-heading {
    font-size: 22px;
    font-weight: 700;
    color: #252525;
    margin: 0 0 10px;
    line-height: 1.3;
}

.mc-lr-subheading {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

/* ── Form ─────────────────────────────────────────────────── */
.mc-lr-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

/* ── Field ────────────────────────────────────────────────── */
.mc-lr-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mc-lr-label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: block;
}

.mc-lr-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e5e5e5;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #252525;
    background-color: #fafafa;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    outline: none;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.mc-lr-input:focus {
    border-color: #4C6C56;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(76, 108, 86, 0.15);
}

/* ── Password wrap ────────────────────────────────────────── */
.mc-lr-pass-wrap {
    position: relative;
}

.mc-lr-pass-wrap .mc-lr-input {
    padding-right: 46px;
}

.mc-lr-pass-toggle {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    color: #aaa;
    transition: color 0.2s ease;
    line-height: 0;
    width: auto !important;
    height: auto !important;
    min-height: unset !important;
    font-size: 0;
}

.mc-lr-pass-toggle svg {
    width: 17px;
    height: 17px;
    stroke: currentColor;
    display: block;
}

.mc-lr-pass-toggle:hover {
    color: #555;
}

/* ── Extras row (remember me) ─────────────────────────────── */
.mc-lr-extras {
    display: flex;
    align-items: flex-start;
}

.mc-lr-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.mc-lr-checkbox-input {
    width: 16px;
    height: 16px;
    accent-color: #4C6C56;
    cursor: pointer;
    flex-shrink: 0;
}

.mc-lr-checkbox-label {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* ── Form footer ──────────────────────────────────────────── */
.mc-lr-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 4px;
}

.mc-lr-form-footer--end {
    justify-content: flex-end;
}

/* ── Link ─────────────────────────────────────────────────── */
.mc-lr-link {
    font-size: 13px;
    color: #888;
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.mc-lr-link:hover {
    color: #4C6C56;
    text-decoration: underline;
}

/* ── Buttons ──────────────────────────────────────────────── */
.mc-lr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.22s ease, color 0.22s ease, opacity 0.22s ease;
    white-space: nowrap;
    line-height: 1.2;
    box-sizing: border-box;
    width: auto !important;
    height: auto !important;
    min-height: unset !important;
    background-image: none !important;
    box-shadow: none;
}

.mc-lr-btn:active {
    opacity: 0.82;
}

.mc-lr-btn--login {
    background-color: #252525;
    color: #fff;
}

.mc-lr-btn--login:hover {
    background-color: #4C6C56;
    color: #fff;
}

.mc-lr-btn--register {
    background-color: #4C6C56;
    color: #fff;
}

.mc-lr-btn--register:hover {
    background-color: #252525;
    color: #fff;
}

/* ============================================================
   CUSTOMER PANEL (logged in) — sidebar layout
   ============================================================ */

.mc-lr-panel {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0;
    width: 100%;
    box-sizing: border-box;
}

/* ── Sidebar (left) ───────────────────────────────────────── */
.mc-lr-panel-sidebar {
    width: 260px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
}

.mc-lr-panel-sidebar-header {
    padding: 16px 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    background-color: #252525;
    box-sizing: border-box;
}

/* ── Sidebar nav list ─────────────────────────────────────── */
.mc-lr-panel-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mc-lr-panel-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.18s ease, color 0.18s ease;
    box-sizing: border-box;
}

.mc-lr-panel-nav-item:hover,
.mc-lr-panel-nav-item:focus {
    background-color: #f5f5f5;
    color: #4C6C56;
    text-decoration: none;
    outline: none;
}

.mc-lr-panel-nav-item--active {
    background-color: #fef3e8;
    color: #4C6C56;
    font-weight: 600;
}

.mc-lr-panel-nav-item--active .mc-lr-panel-nav-marker {
    background-color: #4C6C56;
}

.mc-lr-panel-nav-item--logout {
    color: #999;
    margin-top: 8px;
}

.mc-lr-panel-nav-item--logout:hover {
    background-color: #fef5f7;
    color: #e94560;
}

/* ── Square marker ────────────────────────────────────────── */
.mc-lr-panel-nav-marker {
    display: inline-block;
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    background-color: #d0d0d0;
    border-radius: 2px;
    transition: background-color 0.18s ease;
}

.mc-lr-panel-nav-item:hover .mc-lr-panel-nav-marker {
    background-color: #4C6C56;
}

.mc-lr-panel-nav-item--logout:hover .mc-lr-panel-nav-marker {
    background-color: #e94560;
}

.mc-lr-panel-nav-label {
    line-height: 1.4;
}

/* ── Right content area ───────────────────────────────────── */
.mc-lr-panel-content {
    flex: 1 1 0;
    min-width: 0;
    padding: 32px;
    box-sizing: border-box;
}

/* WooCommerce content inside panel resets */
.mc-lr-panel-content .woocommerce-MyAccount-content {
    width: 100%;
}

/* ── WC page headings ─────────────────────────────────────── */
.mc-lr-panel-content h2,
.mc-lr-panel-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: #252525;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

/* ── Orders table ─────────────────────────────────────────── */
.mc-lr-panel-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.mc-lr-panel-content thead th {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #888;
    padding: 10px 14px;
    border-bottom: 2px solid #eee;
    background-color: #fafafa;
    white-space: nowrap;
}

.mc-lr-panel-content tbody tr {
    border-bottom: 1px solid #f3f3f3;
    transition: background-color 0.15s ease;
}

.mc-lr-panel-content tbody tr:hover {
    background-color: #f9f9f9;
}

.mc-lr-panel-content tbody td {
    padding: 12px 14px;
    font-size: 14px;
    color: #333;
    vertical-align: middle;
}

.mc-lr-panel-content tfoot td {
    padding: 12px 14px;
    font-size: 14px;
    border-top: 2px solid #eee;
}

/* ── Orders list — action column ─────────────────────────── */
.mc-lr-panel-content .woocommerce-orders-table__cell-order-actions {
    white-space: nowrap;
}

.mc-lr-panel-content .woocommerce-orders-table__cell-order-number a {
    font-weight: 700;
    color: #252525;
    text-decoration: none;
}

.mc-lr-panel-content .woocommerce-orders-table__cell-order-number a:hover {
    color: #4C6C56;
}

/* ── Single order — overview bar ─────────────────────────── */
.mc-lr-panel-content ul.woocommerce-order-overview {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
    border: 1.5px solid #eee;
    border-radius: 10px;
    overflow: hidden;
}

.mc-lr-panel-content ul.woocommerce-order-overview li {
    flex: 1 1 160px;
    padding: 14px 18px;
    border-right: 1px solid #eee;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    color: #888;
    line-height: 1.5;
    margin: 0;
}

.mc-lr-panel-content ul.woocommerce-order-overview li:last-child {
    border-right: none;
}

.mc-lr-panel-content ul.woocommerce-order-overview li strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #252525;
    margin-top: 2px;
}

.mc-lr-panel-content ul.woocommerce-order-overview li.woocommerce-order-overview__status strong {
    color: #4C6C56;
}

/* ── Single order — items table ──────────────────────────── */
.mc-lr-panel-content .woocommerce-table--order-details {
    border-radius: 10px;
    overflow: hidden;
    border: 1.5px solid #eee;
    margin-bottom: 28px;
}

.mc-lr-panel-content .woocommerce-table--order-details thead th {
    background-color: #f7f7f7;
    padding: 12px 18px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
}

.mc-lr-panel-content .woocommerce-table--order-details thead .product-total {
    text-align: right;
}

.mc-lr-panel-content .woocommerce-table--order-details tbody td {
    padding: 14px 18px;
    border-bottom: 1px solid #f5f5f5;
}

.mc-lr-panel-content .woocommerce-table--order-details .product-name {
    font-weight: 600;
    color: #252525;
    width: 100%;
}

.mc-lr-panel-content .woocommerce-table--order-details .product-name a {
    color: #252525;
    text-decoration: none;
}

.mc-lr-panel-content .woocommerce-table--order-details .product-name a:hover {
    color: #4C6C56;
}

.mc-lr-panel-content .woocommerce-table--order-details .product-total {
    text-align: right;
    white-space: nowrap;
    font-weight: 600;
    color: #252525;
}

/* ── Tfoot totals ─────────────────────────────────────────── */
.mc-lr-panel-content .woocommerce-table--order-details tfoot {
    border-top: 2px solid #eee;
}

.mc-lr-panel-content .woocommerce-table--order-details tfoot tr th,
.mc-lr-panel-content .woocommerce-table--order-details tfoot tr td {
    padding: 9px 18px;
    border-bottom: none;
    background: transparent;
    font-size: 14px;
}

.mc-lr-panel-content .woocommerce-table--order-details tfoot tr th {
    text-align: left;
    font-weight: 500;
    color: #666;
}

.mc-lr-panel-content .woocommerce-table--order-details tfoot tr td {
    text-align: right;
    font-weight: 600;
    color: #252525;
}

.mc-lr-panel-content .woocommerce-table--order-details tfoot tr:last-child th,
.mc-lr-panel-content .woocommerce-table--order-details tfoot tr:last-child td {
    padding-top: 14px;
    padding-bottom: 14px;
    font-size: 16px;
    font-weight: 700;
    color: #252525;
    border-top: 2px solid #eee;
}

/* actions row */
.mc-lr-panel-content .woocommerce-table--order-details tfoot .order-actions--heading {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #aaa;
    font-weight: 600;
    padding-bottom: 8px;
}

/* address styles handled by mc-order.css */
.mc-lr-panel-content address {
    font-style: normal;
}

/* ── Order status badges ──────────────────────────────────── */
.mc-lr-panel-content .wc-item-meta,
.mc-lr-panel-content mark.order-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #f0f0f0;
    color: #555;
}

.mc-lr-panel-content mark.order-status.status-completed  { background: #e6f4ea; color: #2e7d32; }
.mc-lr-panel-content mark.order-status.status-processing { background: #e8f0fe; color: #1a56c4; }
.mc-lr-panel-content mark.order-status.status-on-hold    { background: #fef9e7; color: #b7791f; }
.mc-lr-panel-content mark.order-status.status-pending    { background: #f3e8ff; color: #6b21a8; }
.mc-lr-panel-content mark.order-status.status-cancelled  { background: #fee2e2; color: #b91c1c; }
.mc-lr-panel-content mark.order-status.status-refunded   { background: #e5e7eb; color: #374151; }

/* ── Buttons in panel ─────────────────────────────────────── */
.mc-lr-panel-content .button,
.mc-lr-panel-content button[type="submit"],
.mc-lr-panel-content input[type="submit"] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 9px 20px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    border: none !important;
    cursor: pointer;
    background-color: #252525 !important;
    color: #fff !important;
    text-decoration: none !important;
    transition: background-color 0.2s ease !important;
    line-height: 1.4 !important;
    white-space: nowrap;
}

.mc-lr-panel-content .button:hover,
.mc-lr-panel-content button[type="submit"]:hover,
.mc-lr-panel-content input[type="submit"]:hover {
    background-color: #4C6C56 !important;
    color: #fff !important;
}

.mc-lr-panel-content .button.alt {
    background-color: #4C6C56 !important;
}

.mc-lr-panel-content .button.alt:hover {
    background-color: #3a5543 !important;
}

/* ── Forms (edit account / addresses) ────────────────────── */
.mc-lr-panel-content .woocommerce-form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.mc-lr-panel-content .woocommerce-form-row label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    line-height: 1.4;
}

.mc-lr-panel-content .woocommerce-form-row .required {
    color: #e94560;
}

.mc-lr-panel-content input.input-text,
.mc-lr-panel-content input[type="text"],
.mc-lr-panel-content input[type="email"],
.mc-lr-panel-content input[type="password"],
.mc-lr-panel-content input[type="tel"],
.mc-lr-panel-content textarea,
.mc-lr-panel-content select {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    color: #252525;
    background-color: #fafafa;
    border: 1.5px solid #e5e5e5;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
}

.mc-lr-panel-content input.input-text:focus,
.mc-lr-panel-content input[type="text"]:focus,
.mc-lr-panel-content input[type="email"]:focus,
.mc-lr-panel-content input[type="password"]:focus,
.mc-lr-panel-content input[type="tel"]:focus,
.mc-lr-panel-content textarea:focus,
.mc-lr-panel-content select:focus {
    border-color: #4C6C56;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(76, 108, 86, 0.15);
}

.mc-lr-panel-content .woocommerce-address-fields__field-wrapper,
.mc-lr-panel-content .woocommerce-billing-fields__field-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
}

.mc-lr-panel-content .woocommerce-form-row--wide,
.mc-lr-panel-content .form-row-wide {
    grid-column: 1 / -1;
}

/* ── Address form — fix WC layout width (47%) override ───── */
.mc-lr-panel-content .form-row-first,
.mc-lr-panel-content .form-row-last {
    width: 100% !important;
    float: none !important;
}

/* ── WC notices inside panel ──────────────────────────────── */
.mc-lr-panel-content .woocommerce-message,
.mc-lr-panel-content .woocommerce-error,
.mc-lr-panel-content .woocommerce-info {
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 14px;
    list-style: none;
}

.mc-lr-panel-content .woocommerce-message {
    background: #e6f4ea;
    border-left: 4px solid #4C6C56;
    color: #2e7d32;
}

.mc-lr-panel-content .woocommerce-error {
    background: #fee2e2;
    border-left: 4px solid #e94560;
    color: #b91c1c;
}

.mc-lr-panel-content .woocommerce-info {
    background: #e8f0fe;
    border-left: 4px solid #1a56c4;
    color: #1a56c4;
}

/* ============================================================
   RESPONSIVE — tablet ≤ 900px
   ============================================================ */

@media (max-width: 900px) {
    .mc-lr-grid {
        gap: 32px;
    }

    .mc-lr-heading {
        font-size: 19px;
    }

    .mc-lr-panel-sidebar {
        width: 220px;
    }
}

/* ── Tablet — panel stacks ≤ 768px ───────────────────────── */
@media (max-width: 768px) {
    .mc-lr-panel-content ul.woocommerce-order-overview li {
        flex: 1 1 140px;
    }

    .mc-lr-panel-content .woocommerce-address-fields__field-wrapper,
    .mc-lr-panel-content .woocommerce-billing-fields__field-wrapper {
        grid-template-columns: 1fr;
    }

    .mc-lr-panel-content .woocommerce-form-row--wide {
        grid-column: auto;
    }
}

@media (max-width: 768px) {
    .mc-lr-panel {
        flex-direction: column;
    }

    .mc-lr-panel-sidebar {
        width: 100% !important;
        flex-shrink: 1;
    }

    .mc-lr-panel-nav {
        flex-direction: column;
        gap: 0;
        padding: 0;
    }

    .mc-lr-panel-nav-item {
        border-radius: 0;
        border: none;
        background-color: transparent;
        border-bottom: 1px solid #f0f0f0;
    }

    .mc-lr-panel-nav-item:last-child {
        border-bottom: none;
    }

    .mc-lr-panel-nav-item--active {
        border-color: transparent;
    }

    .mc-lr-panel-nav-item--logout {
        margin-top: 0;
    }

    .mc-lr-panel-content {
        padding: 20px 0;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        flex: 1 1 100% !important;
    }

}

/* ── Mobile — stacked ≤ 640px ─────────────────────────────── */
@media (max-width: 640px) {
    .mc-lr-grid {
        flex-direction: column;
        gap: 32px;
    }

    .mc-lr-col {
        width: 100% !important;
        flex: 1 1 100%;
        min-width: 0;
    }

    .mc-lr-divider {
        width: 100%;
        height: 1px;
    }

    .mc-lr-input,
    .mc-lr-pass-wrap {
        width: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
    }

    .mc-lr-form,
    .mc-lr-field {
        width: 100%;
        box-sizing: border-box;
    }

    .mc-lr-form-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .mc-lr-form-footer--end {
        align-items: stretch;
    }

    .mc-lr-btn {
        width: 100% !important;
        justify-content: center;
    }

    .mc-lr-input {
        font-size: 16px;
    }

    .mc-lr-heading {
        font-size: 18px;
    }

    .mc-lr-panel-content {
        padding: 16px 0;
    }
}
