/* ========================================
   Decometal B2B — Mi Cuenta Styles
   Colors: #FF6600 (primary), #0F0F0F (dark), #333 (text)
   ======================================== */

/* ----------------------------------------
   UM Login & Register Forms
   ---------------------------------------- */

.um-login .um-form,
.um-register .um-form {
    max-width: 440px;
    margin: 40px auto;
    padding: 40px 36px;
    background: #fff;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.um .um-form .um-header {
    text-align: center;
    margin-bottom: 24px;
}

/* Input styles inherit from decometal-frontend.css shared input */

/* "Olvidé mi contraseña" and "Registrarse" links */
.um .um-col-alt {
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e8e8e8;
}

.um .um-col-alt a,
.um .um-link-alt a {
    color: #FF6600;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
}

.um .um-col-alt a:hover,
.um .um-link-alt a:hover {
    text-decoration: underline;
}

.um .um-field-checkbox {
    margin-top: 12px;
}

.um .um-field-checkbox label {
    font-size: 0.85em;
    color: #666;
    text-transform: none !important;
}

/* Error messages */
.um .um-field-error,
.um .um-notice-error {
    color: #d32f2f;
    font-size: 0.85em;
    margin-top: 4px;
}

.um .um-notice {
    padding: 12px 16px;
    font-size: 0.9em;
    margin-bottom: 16px;
}

.um .um-notice.success {
    background: #e8f5e9;
    border: 1px solid #66bb6a;
    color: #2e7d32;
}

.um .um-notice.err {
    background: #ffebee;
    border: 1px solid #ef5350;
    color: #c62828;
}

/* ----------------------------------------
   WooCommerce My Account (logged-in)
   ---------------------------------------- */

.woocommerce-account .woocommerce-MyAccount-navigation,
.woocommerce-account .woocommerce-MyAccount-content {
    box-sizing: border-box;
}

/* Navigation sidebar */
.woocommerce-MyAccount-navigation {
    background: #0F0F0F;
    padding: 8px 0;
    overflow: hidden;
}

.woocommerce-MyAccount-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.woocommerce-MyAccount-navigation ul li {
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.woocommerce-MyAccount-navigation ul li:last-child {
    border-bottom: none;
}

.woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 14px 24px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    text-transform: none;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
}

.woocommerce-MyAccount-navigation ul li a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.woocommerce-MyAccount-navigation ul li.is-active a {
    color: #FF6600;
    border-left-color: #FF6600;
    background: rgba(255, 102, 0, 0.08);
    font-weight: 700;
}

/* Logout link */
.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--customer-logout a {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85em;
}

.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--customer-logout a:hover {
    color: #ef5350;
}

/* Content area */
.woocommerce-MyAccount-content {
    padding: 0 0 0 30px;
}

.woocommerce-MyAccount-content h2,
.woocommerce-MyAccount-content h3 {
    font-size: 1.3em;
    color: #0F0F0F;
    margin-bottom: 16px;
    font-weight: 700;
    text-transform: none;
}

.woocommerce-MyAccount-content > p:first-child {
    font-size: 0.95em;
    color: #666;
    line-height: 1.6;
}

.woocommerce-MyAccount-content > p a {
    color: #FF6600;
    font-weight: 600;
    text-decoration: none;
}

.woocommerce-MyAccount-content > p a:hover {
    text-decoration: underline;
}

/* ----------------------------------------
   WooCommerce Tables (quotes, etc.)
   ---------------------------------------- */

.woocommerce-MyAccount-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.woocommerce-MyAccount-content table thead th {
    background: #f5f5f5;
    padding: 12px 16px;
    text-align: left;
    font-size: 0.85em;
    font-weight: 700;
    text-transform: none;
    color: #333;
    border-bottom: 2px solid #e8e8e8;
}

.woocommerce-MyAccount-content table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    vertical-align: middle;
}

.woocommerce-MyAccount-content table tbody tr:hover {
    background: rgba(255, 102, 0, 0.02);
}

/* ----------------------------------------
   WooCommerce Forms (edit account, address)
   ---------------------------------------- */

.woocommerce-MyAccount-content .woocommerce-EditAccountForm label,
.woocommerce-MyAccount-content .woocommerce-address-fields label {
    font-size: 0.85em;
    font-weight: 600;
    text-transform: none;
    color: #333;
    margin-bottom: 6px;
    display: block;
}

/* Input/textarea/select styles inherit from decometal-frontend.css */

/* Select2 fix (WooCommerce + Divi conflict) */
.woocommerce-MyAccount-content .select2-container .select2-selection--single {
    border: none !important;
    border-bottom: 1px solid #aaa !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    height: auto !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.woocommerce-MyAccount-content .select2-container .select2-selection--single .select2-selection__rendered {
    padding: 9px 24px 9px 0 !important;
    line-height: 1.4 !important;
    color: #333 !important;
    font-size: 0.95em;
}

.woocommerce-MyAccount-content .select2-container .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    top: 0 !important;
    right: 0 !important;
}

.woocommerce-MyAccount-content .select2-container--focus .select2-selection--single,
.woocommerce-MyAccount-content .select2-container--open .select2-selection--single {
    border-bottom-color: #FF6600 !important;
}

/* Select2 dropdown */
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #FF6600 !important;
    color: #0F0F0F !important;
}

.select2-dropdown {
    border: 1px solid #aaa !important;
    border-radius: 0 !important;
}

/* Also fix native select */
.woocommerce-MyAccount-content select {
    border: none !important;
    border-bottom: 1px solid #aaa !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    padding: 9px 0 !important;
    height: auto !important;
    -webkit-appearance: none;
    appearance: none;
}

/* Submit buttons — margin only, style inherits */
.woocommerce-MyAccount-content .woocommerce-Button,
.woocommerce-MyAccount-content button[type="submit"],
.woocommerce-MyAccount-content input[type="submit"] {
    margin-top: 16px;
}

/* ----------------------------------------
   WooCommerce Notices
   ---------------------------------------- */

.woocommerce-message {
    background: #e8f5e9;
    border-left: 4px solid #66bb6a;
    color: #2e7d32;
    padding: 14px 20px;
    margin-bottom: 20px;
    font-size: 0.9em;
}

.woocommerce-error {
    background: #ffebee;
    border-left: 4px solid #ef5350;
    color: #c62828;
    padding: 14px 20px;
    margin-bottom: 20px;
    font-size: 0.9em;
}

.woocommerce-info {
    background: #e3f2fd;
    border-left: 4px solid #42a5f5;
    color: #1565c0;
    padding: 14px 20px;
    margin-bottom: 20px;
    font-size: 0.9em;
}

/* ----------------------------------------
   YITH Request a Quote — My Quotes list
   ---------------------------------------- */

.woocommerce-MyAccount-content .shop_table.my_quote_list {
    border: 1px solid #e8e8e8;
    overflow: hidden;
}

/* ----------------------------------------
   Custom Dashboard
   ---------------------------------------- */

.dcmb2b-dashboard-welcome h2 {
    font-size: 1.5em;
    color: #0F0F0F;
    margin: 0 0 6px;
    font-weight: 700;
    text-transform: none;
}

.dcmb2b-dashboard-welcome p {
    color: #666;
    font-size: 0.95em;
    margin: 0 0 28px;
}

.dcmb2b-dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.dcmb2b-dashboard-card {
    background: #f5f5f5;
    padding: 12px 19px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: fit-content;
}

.dcmb2b-card-label {
    font-size: 0.75em;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.02em;
    color: #666;
}

.dcmb2b-card-value {
    font-size: 1.6em;
    font-weight: 700;
    color: #0F0F0F;
}

.dcmb2b-card-note {
    font-size: 0.85em;
    color: #666;
    margin: 4px 0 0;
    line-height: 1.5;
}

.dcmb2b-card-pending {
    background: #fff3e0;
    border-left: 3px solid #ff9800;
}

.dcmb2b-card-pending .dcmb2b-card-value {
    font-size: 1em;
    color: #e65100;
}

.dcmb2b-card-action {
    background: #FF6600;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s ease;
}

.dcmb2b-card-action:hover {
    background: #0F0F0F;
}

.dcmb2b-dashboard-link {
    color: #0F0F0F !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px !important;
    transition: color 0.2s ease;
    display: block;
}

.dcmb2b-card-action:hover .dcmb2b-dashboard-link {
    color: #fff !important;
}

/* ----------------------------------------
   Responsive
   ---------------------------------------- */

@media (max-width: 768px) {
    .um-login .um-form,
    .um-register .um-form {
        margin: 20px 16px;
        padding: 28px 20px;
    }

    .woocommerce-MyAccount-navigation {
        margin-bottom: 24px;
    }

    .woocommerce-MyAccount-content {
        padding: 0;
    }

    .woocommerce-MyAccount-content table {
        font-size: 0.85em;
    }

    .woocommerce-MyAccount-content table thead {
        display: none;
    }

    .woocommerce-MyAccount-content table tbody td {
        display: block;
        padding: 8px 16px;
        border-bottom: none;
    }

    .woocommerce-MyAccount-content table tbody td::before {
        content: attr(data-title) ": ";
        font-weight: 700;
        font-size: 0.8em;
        color: #666;
        text-transform: none;
    }

    .woocommerce-MyAccount-content table tbody tr {
        border-bottom: 1px solid #e8e8e8;
        padding: 10px 0;
        display: block;
    }

    .dcmb2b-dashboard-cards {
        grid-template-columns: 1fr;
    }
}

/* ----------------------------------------
   My Account → Mis Pedidos (list + detail)
   ---------------------------------------- */

.dcmb2b-account-orders__title {
    font-size: 1.4em;
    font-weight: 700;
    color: #0F0F0F;
    margin: 0 0 20px;
}

.dcmb2b-account-orders__empty {
    padding: 18px 20px;
    background: #fafafa;
    border: 1px solid #eee;
    color: #666;
    border-radius: 8px;
}

.dcmb2b-account-orders__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92em;
    border: 1px solid #e8e8e8;
    background: #fff;
}

.dcmb2b-account-orders__table thead th {
    background: #f8f8f8;
    padding: 10px 14px;
    text-align: left;
    font-size: 0.78em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    border-bottom: 1px solid #e8e8e8;
}

.dcmb2b-account-orders__table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f1f1;
    color: #333;
    vertical-align: middle;
}

.dcmb2b-account-orders__table tbody tr:last-child td {
    border-bottom: none;
}

.dcmb2b-account-orders__items {
    font-size: 0.85em;
    color: #888;
    margin-top: 2px;
}

.dcmb2b-account-orders__status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    line-height: 1.2;
}

.dcmb2b-account-orders__status--new       { background: #e3f2fd; color: #1565c0; }
.dcmb2b-account-orders__status--pending   { background: #fff8e1; color: #b26a00; }
.dcmb2b-account-orders__status--accepted  { background: #e8f7ee; color: #0f8a3d; }
.dcmb2b-account-orders__status--enviado   { background: #e8f7ee; color: #0f8a3d; }
.dcmb2b-account-orders__status--rejected  { background: #fdecea; color: #b3261e; }
.dcmb2b-account-orders__status--cancelado { background: #fdecea; color: #b3261e; }
.dcmb2b-account-orders__status--expired   { background: #f0f0f0; color: #666; }
.dcmb2b-account-orders__status--default   { background: #f0f0f0; color: #666; }

.dcmb2b-account-orders__view {
    display: inline-block;
    padding: 7px 14px;
    background: #0F0F0F;
    color: #fff !important;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.15s;
}
.dcmb2b-account-orders__view:hover {
    background: #FF6600;
}

/* Detail view */
.dcmb2b-account-order-detail__back a {
    color: #FF6600;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
}
.dcmb2b-account-order-detail__back a:hover { text-decoration: underline; }

.dcmb2b-account-order-detail__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 12px 0 16px;
    flex-wrap: wrap;
}
.dcmb2b-account-order-detail__header h2 {
    margin: 0;
    font-size: 1.4em;
    color: #0F0F0F;
    font-weight: 700;
}

.dcmb2b-account-order-detail__meta {
    background: #fafafa;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.9em;
    color: #555;
    margin-bottom: 16px;
}
.dcmb2b-account-order-detail__label {
    color: #888;
    font-weight: 600;
    margin-right: 6px;
}

.dcmb2b-account-order-detail__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
    border: 1px solid #e8e8e8;
    background: #fff;
}

.dcmb2b-account-order-detail__table thead th {
    background: #f8f8f8;
    padding: 10px 12px;
    text-align: left;
    font-size: 0.72em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    border-bottom: 1px solid #e8e8e8;
}

.dcmb2b-account-order-detail__table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f1f1;
    color: #333;
    vertical-align: middle;
}

.dcmb2b-account-order-detail__disc {
    display: inline-block;
    background: #e8f7ee;
    color: #0f8a3d;
    border: 1px solid #c7ecd5;
    border-radius: 999px;
    padding: 2px 8px;
    font-weight: 700;
    font-size: 11px;
    line-height: 1;
}

.dcmb2b-account-order-detail__table tfoot th {
    padding: 10px 12px;
    text-align: right;
    font-size: 0.85em;
    font-weight: 600;
    color: #555;
    border-top: 1px solid #e8e8e8;
}

.dcmb2b-account-order-detail__table tfoot td {
    padding: 10px 12px;
    text-align: right;
    font-weight: 600;
    color: #333;
    border-top: 1px solid #e8e8e8;
}

.dcmb2b-account-order-detail__total-row th,
.dcmb2b-account-order-detail__total-row td {
    border-top: 2px solid #0F0F0F !important;
    padding-top: 12px !important;
}

.dcmb2b-account-order-detail__total {
    font-size: 1.1em !important;
    font-weight: 800 !important;
    color: #0F0F0F !important;
}

@media (max-width: 768px) {
    .dcmb2b-account-orders__table thead,
    .dcmb2b-account-order-detail__table thead {
        display: none;
    }
    .dcmb2b-account-orders__table tr,
    .dcmb2b-account-order-detail__table tr {
        display: block;
        border-bottom: 1px solid #eee;
        padding: 10px 0;
    }
    .dcmb2b-account-orders__table td,
    .dcmb2b-account-order-detail__table td {
        display: block;
        text-align: right;
        padding: 6px 12px;
        border: none;
    }
    .dcmb2b-account-orders__table td::before,
    .dcmb2b-account-order-detail__table td::before {
        content: attr(data-title);
        float: left;
        font-weight: 700;
        color: #666;
        font-size: 0.78em;
        text-transform: uppercase;
        letter-spacing: 0.4px;
    }
}
