/* Account extras scoped to WooCommerce My Account. Native orders/downloads remain untouched. */
.woocommerce-account .tdm-cycle-panel {margin:0 0 28px;padding:23px 25px;border:1px solid #e5e7eb;border-radius:19px;background:#fff;box-shadow:0 8px 22px rgba(0,0,0,.035)}
.woocommerce-account .tdm-cycle-panel h2 {font-size:1.5rem;margin:0 0 9px}
.woocommerce-account .tdm-cycle-panel h3 {font-size:1.12rem;margin:24px 0 12px}
.woocommerce-account .tdm-cycle-panel p {color:#5f6470;line-height:1.55;font-size:.94rem}
.tdm-cycle-status{padding:15px 17px;border:1px solid #e2e4e8;background:#f8f9fb;border-radius:12px;margin:14px 0;font-size:.95rem}
.tdm-cycle-status strong {color:#131313}
.tdm-request-details summary{display:inline-block;list-style:none;cursor:pointer}
.tdm-red-button{border:none!important;border-radius:10px!important;background:#ff0032!important;color:white!important;font-weight:700;padding:11px 16px;cursor:pointer}
.tdm-request-form {margin:18px 0;padding:18px;border-radius:13px;border:1px solid #edf0f1;display:grid;gap:16px}
.tdm-request-form label{display:block;font-weight:600;font-size:.91rem}
.tdm-request-form input[type=text],.tdm-request-form textarea,.tdm-request-form input[type=file]{box-sizing:border-box;width:100%;display:block;margin-top:6px;padding:10px;border:1px solid #d7d9de;border-radius:8px;background:#fff;color:#171717}
.tdm-request-alert {border-left:3px solid #ff0032;padding:12px 14px;background:#fff6f7;color:#343434}
.tdm-request-alert.is-ok{border-color:#198754;background:#f1faf4}
.tdm-scroll{max-width:100%;overflow-x:auto}
.tdm-account-table{width:100%;border-collapse:collapse;font-size:.91rem}
.tdm-account-table th,.tdm-account-table td{text-align:left;padding:12px 9px;border-bottom:1px solid #eaebed}
.tdm-account-table thead{background:#f7f7f8;color:#252525}
/* Group existing native WooCommerce account fields — preserve their validation and password form. */
.woocommerce-account .tdm-edit-panel {padding:20px 22px;margin:0 0 18px;border:1px solid #e5e7eb;border-radius:17px;background:#fff}
.woocommerce-account .tdm-edit-panel h2{font-size:1.3rem;margin:0 0 10px;color:#111}
.woocommerce-account .tdm-edit-panel .tdm-edit-help{font-size:.87rem;color:#666;line-height:1.5;margin:5px 0 15px}
.woocommerce-account .tdm-edit-panel .tdm-fiscal-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.woocommerce-account .tdm-edit-panel .tdm-fiscal-grid label{font-weight:600;font-size:.88rem;min-width:0}
.woocommerce-account .tdm-edit-panel .tdm-fiscal-grid input,.woocommerce-account .tdm-edit-panel .tdm-fiscal-grid select{display:block;width:100%;max-width:100%;margin-top:6px;border:1px solid #d6d9de;border-radius:8px;padding:11px;background:white;box-sizing:border-box}
.woocommerce-account .tdm-edit-panel .tdm-fiscal-legal,.woocommerce-account .tdm-edit-panel .tdm-fiscal-address{grid-column:span 2}
.woocommerce-account .tdm-edit-panel.tdm-consumer-final .tdm-fiscal-identity,.woocommerce-account .tdm-edit-panel.tdm-consumer-final .tdm-fiscal-legal,.woocommerce-account .tdm-edit-panel.tdm-consumer-final .tdm-fiscal-address{display:none}
/* Display name continues to submit to WooCommerce; hide the optional duplicate visually. */
.woocommerce-account .tdm-edit-panel p:has(> #account_display_name){display:none}
@media(max-width:620px){.woocommerce-account .tdm-edit-panel{padding:17px}.woocommerce-account .tdm-edit-panel .tdm-fiscal-grid{grid-template-columns:1fr}.woocommerce-account .tdm-edit-panel .tdm-fiscal-legal,.woocommerce-account .tdm-edit-panel .tdm-fiscal-address{grid-column:span 1}}

/* Place the three account panels in the requested order without overriding Woo templates. */
.woocommerce-account .woocommerce-EditAccountForm.edit-account{display:flex;flex-direction:column;gap:0}
.woocommerce-account .woocommerce-EditAccountForm .tdm-edit-user{order:1}
.woocommerce-account .woocommerce-EditAccountForm .tdm-edit-fiscal{order:2}
.woocommerce-account .woocommerce-EditAccountForm .tdm-edit-password{order:3}
.woocommerce-account .woocommerce-EditAccountForm > p{order:4}
.woocommerce-account .woocommerce-EditAccountForm .tdm-edit-password fieldset{border:0;padding:0;margin:0}
.woocommerce-account .woocommerce-EditAccountForm .tdm-edit-password fieldset legend{display:none}

/* 0.1.13: One polished downloads panel; WooCommerce continues to own signed download URLs. */
.woocommerce-account .tdm-download-history{padding:28px 30px;overflow:hidden}
.tdm-download-history .tdm-history-heading{padding-bottom:20px;border-bottom:1px solid #eceef1}
.tdm-download-history .tdm-history-kicker{display:block;color:#ec0031;font-size:.72rem;letter-spacing:.12em;font-weight:800;margin-bottom:9px}
.tdm-download-history .tdm-history-heading h2{font-size:clamp(1.45rem,2.6vw,2rem);letter-spacing:-.025em;line-height:1.22;margin:0 0 8px;color:#101114}
.tdm-download-history .tdm-history-heading p{font-size:.95rem;color:#656c76;margin:0}
.tdm-download-history .tdm-history-group{padding:24px 0 0}
.tdm-download-history .tdm-history-section-title{display:flex;align-items:baseline;justify-content:space-between;gap:7px 14px;flex-wrap:wrap;margin:0 0 14px}
.tdm-download-history .tdm-history-section-title h3{font-size:1.12rem;font-weight:800;line-height:1.3;color:#151515;margin:0}
.tdm-download-history .tdm-history-section-note{color:#747983;font-size:.82rem}
.tdm-download-history .tdm-history-list{list-style:none!important;padding:0!important;margin:0!important;display:grid;gap:11px}
.tdm-download-history .tdm-history-item{display:flex;align-items:center;gap:14px;min-width:0;background:#fafafb;border:1px solid #e9e9ee;border-radius:14px;padding:13px 14px;transition:border-color .2s ease,background .2s ease}
.tdm-download-history .tdm-history-item:hover{background:#fff;border-color:#d9dce1}
.tdm-download-history .tdm-history-art{width:70px;height:65px;flex:0 0 70px;border:1px solid #eee;border-radius:10px;display:grid;place-items:center;overflow:hidden;background:#fff}
.tdm-download-history .tdm-history-thumb{width:100%;height:100%;object-fit:cover;margin:0!important;display:block}
.tdm-download-history .tdm-history-placeholder{font-size:1.35rem;font-weight:900;color:#e60031}
.tdm-download-history .tdm-history-info{flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:3px}
.tdm-download-history .tdm-history-info strong{font-weight:750;color:#161616;line-height:1.35;font-size:.96rem;overflow-wrap:anywhere}
.tdm-download-history .tdm-history-info > span{font-size:.82rem;color:#747984;overflow-wrap:anywhere}
.tdm-download-history .tdm-history-tag{display:inline-flex;margin-top:3px;border-radius:99px;padding:4px 10px;background:#fff0f3;color:#c5002e;font-size:.72rem;font-weight:750}
.tdm-download-history .tdm-history-link{flex:0 0 auto;text-decoration:none!important;display:inline-flex;align-items:center;justify-content:center;border:1px solid #ff0032;border-radius:10px;background:#fff;color:#e00030!important;font-size:.84rem;font-weight:750;min-height:37px;padding:8px 14px;line-height:1.2;white-space:nowrap}
.tdm-download-history .tdm-history-link:hover,.tdm-download-history .tdm-history-link:focus{background:#ff0032;color:#fff!important}
.tdm-download-history .tdm-history-empty{background:#fafafb;border:1px dashed #dadde3;border-radius:12px;padding:17px;margin:0;color:#737782;font-size:.9rem}
/* The optional billing identifiers also exist in other Woo / theme integrations.
 * Hide those ONLY when duplicated in the top account box. Do not disable their inputs
 * or affect WooCommerce's save and validation actions. JS covers unknown custom IDs. */
.woocommerce-account .tdm-edit-user .form-row:has(input[name="billing_cedula"]),
.woocommerce-account .tdm-edit-user .form-row:has(input[name="billing_ruc"]),
.woocommerce-account .tdm-edit-user .form-row:has(input[name="billing_razon_social"]),
.woocommerce-account .tdm-edit-user .form-row:has(input[id*="billing_cedula" i]),
.woocommerce-account .tdm-edit-user .form-row:has(input[id*="billing_razon" i]){display:none!important}
@media(max-width:700px){
 .woocommerce-account .tdm-download-history{padding:19px 16px}
 .tdm-download-history .tdm-history-item{gap:10px;padding:11px;flex-wrap:wrap}
 .tdm-download-history .tdm-history-art{flex:0 0 58px;width:58px;height:58px}
 .tdm-download-history .tdm-history-info{flex:1 1 calc(100% - 70px)}
 .tdm-download-history .tdm-history-link{width:100%;margin-top:2px;box-sizing:border-box}
}
.woocommerce-account .tdm-edit-user .tdm-duplicate-fiscal-field{display:none!important}
