/*
 * Customer area (Figma 33:2): summary band, tabs, licence cards, login card.
 * Colours and fonts are the theme's design tokens (theme assets/css/mas.css),
 * with fallbacks. Selectors start with a wrapper class so they outrank the
 * Elementor kit's element rules.
 */

/* Summary band ([mas_account_summary], on the navy band) ----------------- */
.mas-account-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 40px; }
.mas-account-head .mas-account-title { margin: 0 0 12px; color: var(--mas-on-dark, #fff); font-size: 44px; font-weight: 600; line-height: 1.1; letter-spacing: -.03em; }
.mas-account-head .mas-account-who { margin: 0; color: var(--mas-muted, #6b7080); font-size: 15px; }
.mas-account-head .mas-account-who strong { color: var(--mas-on-dark-soft, #b4b4cc); font-weight: 500; margin-left: 6px; }
.mas-account-head .mas-account-signout { padding: 11px 20px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px; background: rgba(255, 255, 255, .04); color: var(--mas-on-dark, #fff); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.mas-account-head .mas-account-signout:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.mas-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.mas-tile { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 24px 24px 22px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 14px; background: rgba(255, 255, 255, .03); }
.mas-tile span { flex-basis: 100%; color: var(--mas-on-dark-soft, #b4b4cc); font-size: 13px; }
.mas-tile strong { color: var(--mas-on-dark, #fff); font-size: 28px; font-weight: 600; }
.mas-tile small { color: var(--mas-on-dark-soft, #b4b4cc); font-size: 12px; }

/* Tabs: WooCommerce's account menu as pills, content full width ---------- */
.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation { float: none; width: 100%; margin: 0 0 24px; }
.woocommerce-account .woocommerce-MyAccount-navigation ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.woocommerce-account .woocommerce-MyAccount-navigation li { margin: 0; }
.woocommerce-account .woocommerce-MyAccount-navigation li a { display: block; padding: 11px 20px; border-radius: 999px; color: var(--mas-muted, #6b7080); font-size: 15px; font-weight: 500; text-decoration: none; }
.woocommerce-account .woocommerce-MyAccount-navigation li a:hover { color: var(--mas-title, #0f1020); }
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a { background: #fff; color: var(--mas-title, #0f1020); font-weight: 600; box-shadow: 0 4px 14px -6px rgba(15, 16, 32, .18); }
.woocommerce-account .woocommerce .woocommerce-MyAccount-content { float: none; width: 100%; }

/* Chips and buttons ------------------------------------------------------ */
.mas-licences .mas-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 500; line-height: 1.4; vertical-align: middle; }
.mas-licences .mas-chip-version { padding: 2px 8px; border: 1px solid var(--mas-border, #e4e7ee); background: var(--mas-surface, #f6f7fa); color: var(--mas-muted, #6b7080); font-family: var(--mas-font-mono, monospace); font-size: 11px; font-weight: 400; }
.mas-licences .mas-chip-accent, .mas-licences .mas-chip-status { background: var(--mas-accent-soft, #fff3ea); color: var(--mas-accent-on-soft, #a84a08); }
.mas-licences .mas-chip-accent::before, .mas-licences .mas-chip-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.mas-licences .mas-chip-status.is-active { background: var(--mas-good-soft, #e8f7f1); color: var(--mas-good-text, #087a55); }
.mas-licences .mas-chip-status.is-lapsed, .mas-licences .mas-chip-status.is-revoked, .mas-licences .mas-chip-status.is-expired { background: var(--mas-bad-soft, #fdecec); color: var(--mas-bad-text, #b42318); }
.mas-licences .mas-btn { display: inline-flex; align-items: center; justify-content: center; padding: 13px 22px; border: 1.4px solid var(--mas-border, #e4e7ee); border-radius: 999px; background: #fff; color: var(--mas-title, #0f1020); font-size: 15px; font-weight: 500; line-height: 1.2; text-decoration: none; white-space: nowrap; }
.mas-licences .mas-btn-primary { border-color: transparent; background: var(--mas-accent, linear-gradient(90deg, #ff9a3d, #ff5c00)); color: #1a0e03; font-weight: 600; box-shadow: 0 10px 22px -10px rgba(255, 92, 0, .55); }
.mas-licences .mas-btn:focus-visible, .mas-licences .mas-copy:focus-visible { outline: 2px solid var(--mas-accent-solid, #c2560a); outline-offset: 3px; }
.mas-licences .mas-eyebrow { display: block; margin-bottom: 10px; color: var(--mas-muted, #6b7080); font-family: var(--mas-font-mono, monospace); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }

/* Licence card ----------------------------------------------------------- */
.mas-licences { display: grid; gap: 18px; }
.mas-licence { padding: 26px 30px 22px; border: 1px solid var(--mas-border, #e4e7ee); border-radius: 18px; background: #fff; }
.mas-licence.has-update { border-color: #f6c49b; box-shadow: 0 0 0 1px #fde3cc; }
.mas-licence-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.mas-licence .mas-licence-name { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--mas-title, #0f1020); font-size: 20px; font-weight: 600; }
.mas-licence-chips { display: flex; gap: 8px; }
.mas-licence-body { display: grid; grid-template-columns: minmax(240px, 1.1fr) minmax(200px, 1fr) auto; gap: 24px 36px; align-items: center; padding-bottom: 20px; border-bottom: 1px solid var(--mas-border, #e4e7ee); }
.mas-licence-key code { margin-right: 10px; padding: 0; background: none; color: var(--mas-title, #0f1020); font-family: var(--mas-font-mono, monospace); font-size: 14px; }
.mas-licences .mas-copy { padding: 6px 12px; border: 1px solid var(--mas-border, #e4e7ee); border-radius: 7px; background: var(--mas-surface, #f6f7fa); color: var(--mas-title, #0f1020); font-size: 13px; cursor: pointer; }
.mas-licence-sites strong { display: block; margin-bottom: 10px; color: var(--mas-title, #0f1020); font-size: 15px; font-weight: 500; }
.mas-licence-sites small { display: block; margin-top: 8px; color: var(--mas-muted, #6b7080); font-size: 12px; }
.mas-bar { display: block; max-width: 230px; height: 5px; border-radius: 999px; background: var(--mas-surface, #f0f2f6); overflow: hidden; }
.mas-bar span { display: block; height: 100%; border-radius: 999px; background: var(--mas-good, #0e9f6e); }
.mas-bar.is-full span { background: var(--mas-accent-bright, #ff5c00); }
.mas-bar.is-unlimited { background: repeating-linear-gradient(90deg, var(--mas-good, #0e9f6e) 0 4px, transparent 4px 9px); opacity: .5; }
.mas-licence-actions { display: flex; gap: 10px; justify-content: flex-end; }
.mas-licence-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 16px; font-size: 13px; color: var(--mas-muted, #6b7080); }
.mas-licence-on { margin-right: 4px; }
.mas-site-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; background: var(--mas-surface, #f6f7fa); color: var(--mas-title, #0f1020); }
.mas-site-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--mas-good, #0e9f6e); }
.mas-licence-expiry { margin-left: auto; }
.mas-licence-manage { margin-top: 16px; }
.mas-sites-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mas-sites-table th { padding: 8px 10px; border-bottom: 1px solid var(--mas-border, #e4e7ee); color: var(--mas-muted, #6b7080); font-size: 12px; font-weight: 500; text-align: left; }
.mas-sites-table td { padding: 10px; border-bottom: 1px solid var(--mas-border, #e4e7ee); }
.mas-sites-table .button { padding: 6px 14px; border: 1px solid var(--mas-border, #e4e7ee); border-radius: 999px; background: #fff; color: var(--mas-title, #0f1020); font-size: 13px; font-weight: 500; cursor: pointer; }
.mas-sites-table .button:hover { border-color: var(--mas-bad, #d92d20); color: var(--mas-bad, #d92d20); }
/* Upgrade row under the card footer: text left, tier select and button right. */
.mas-licence .mas-upgrade { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-top: 18px; padding: 16px 20px; border-radius: 14px; background: var(--mas-surface, #f6f7fa); }
.mas-upgrade-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mas-licence .mas-upgrade-title { margin: 0; color: var(--mas-title, #0f1020); font-size: 15px; font-weight: 600; cursor: pointer; }
.mas-upgrade-hint { color: var(--mas-muted, #6b7080); font-size: 13px; line-height: 1.5; }
.mas-upgrade-controls { display: flex; align-items: center; gap: 10px; }
.mas-licence .mas-upgrade-select { width: auto; min-width: 280px; max-width: 100%; height: 44px; margin: 0; padding: 0 40px 0 16px; border: 1px solid var(--mas-border, #e4e7ee); border-radius: 999px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236b7080' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center; color: var(--mas-title, #0f1020); font-family: inherit; font-size: 14px; line-height: 42px; -webkit-appearance: none; appearance: none; cursor: pointer; }
.mas-licence .mas-upgrade-select:focus { border-color: var(--mas-accent-solid, #c2560a); outline: none; box-shadow: 0 0 0 3px rgba(255, 114, 4, .2); }
.mas-licences .mas-upgrade-button { height: 44px; padding: 0 22px; font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.mas-licences .mas-upgrade-button:hover { border-color: var(--mas-title, #0f1020); }
@media (max-width: 640px) {
	.mas-licence .mas-upgrade { padding: 16px; }
	.mas-upgrade-controls { flex-direction: column; align-items: stretch; width: 100%; }
	.mas-licence .mas-upgrade-select { min-width: 0; width: 100%; }
}
.mas-empty, .mas-hint { color: var(--mas-muted, #6b7080); font-size: 14px; }
.mas-hint { margin-top: 22px; }

/* Invoices tab (mas-paddle) --------------------------------------------- */
.mas-invoices-table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--mas-border, #e4e7ee); border-radius: 18px; background: #fff; overflow: hidden; font-size: 14px; }
.mas-invoices-table th { padding: 14px 20px; border-bottom: 1px solid var(--mas-border, #e4e7ee); color: var(--mas-muted, #6b7080); font-size: 12px; font-weight: 500; text-align: left; }
.mas-invoices-table td { padding: 16px 20px; border-bottom: 1px solid var(--mas-border, #e4e7ee); color: var(--mas-title, #0f1020); }
.mas-invoices-table tr:last-child td { border-bottom: 0; }
/* Hello's table rules add cell borders and striped rows. */
.mas-invoices .mas-invoices-table th, .mas-invoices .mas-invoices-table td { border-top: 0 !important; border-left: 0 !important; border-right: 0 !important; background: #fff !important; vertical-align: middle; }
.mas-invoices-table td:last-child { text-align: right; }
.mas-invoices-table small { color: var(--mas-muted, #6b7080); }
.mas-invoices .mas-btn { display: inline-flex; padding: 9px 16px; border: 1.4px solid var(--mas-border, #e4e7ee); border-radius: 999px; background: #fff; color: var(--mas-title, #0f1020); font-size: 14px; font-weight: 500; text-decoration: none; }
.mas-invoices .mas-chip { padding: 2px 8px; border-radius: 999px; background: var(--mas-bad-soft, #fdecec); color: var(--mas-bad-text, #b42318); font-size: 11px; }

/* Logged out: the login form as a card ----------------------------------- */
.woocommerce-account:not(.logged-in) .woocommerce form.login,
.woocommerce-account:not(.logged-in) .mas-portal-link { max-width: 520px; margin: 0 auto 24px; padding: 32px 36px; border: 1px solid var(--mas-border, #e4e7ee); border-radius: 18px; background: #fff; }
.woocommerce-account:not(.logged-in) .woocommerce > h2 { max-width: 520px; margin: 0 auto 16px; }
/* !important: the kit's input rule (.elementor-kit-N input:not(...)) outranks any class chain. */
.woocommerce-account .woocommerce form .input-text { border: 1px solid var(--mas-border, #e4e7ee) !important; border-radius: var(--mas-radius-input, 10px) !important; padding: 13px 14px; background: #fff; }
.woocommerce-account .woocommerce form .input-text:focus { border-color: var(--mas-accent-solid, #c2560a) !important; outline: 1px solid var(--mas-accent-solid, #c2560a); }
.woocommerce-account .woocommerce > h2 { font-size: 28px; }
.woocommerce-account .woocommerce .mas-portal-link h2 { margin: 0 0 18px; font-size: 22px; line-height: 1.3; }
.woocommerce-account .woocommerce form.login .button,
.woocommerce-account .woocommerce .mas-portal-link .button,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Button,
.woocommerce-account .woocommerce-MyAccount-content button.button { padding: 13px 24px; border: 0; border-radius: 999px; background: var(--mas-accent, linear-gradient(90deg, #ff9a3d, #ff5c00)); color: #1a0e03; font-weight: 600; box-shadow: 0 10px 22px -10px rgba(255, 92, 0, .55); }
.mas-lost-key { margin: 14px 0 0; font-size: 14px; }

@media (max-width: 900px) {
	.mas-licence-body { grid-template-columns: 1fr; }
	.mas-licence-actions { justify-content: flex-start; }
	.mas-licence-expiry { margin-left: 0; flex-basis: 100%; }
	.mas-account-head .mas-account-title { font-size: 34px; }
}
@media (max-width: 600px) {
	.mas-licence { padding: 22px 18px 18px; }
	.mas-account-head { flex-direction: column; }
	.mas-sites-table th:nth-child(2), .mas-sites-table td:nth-child(2) { display: none; }
}
