/* Rafia Regalia — My Account area (logged in). */

/* Layout: sidebar card | content card */
.rr-wc .woocommerce:has(> .rr-acc-side) { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 40px; align-items: start; }
.rr-wc .woocommerce:has(> .rr-acc-side)::before,
.rr-wc .woocommerce:has(> .rr-acc-side)::after { display: none !important; }

/* Sidebar */
.rr-acc-side { border: 1px solid var(--wp--preset--color--stone); background: var(--wp--preset--color--white); position: sticky; top: 150px; }
.rr-acc-user { display: flex; align-items: center; gap: 14px; padding: 22px 20px; background: var(--wp--preset--color--navy); color: var(--wp--preset--color--white); }
.rr-acc-avatar { width: 56px !important; height: 56px !important; border-radius: 50%; border: 2px solid var(--wp--preset--color--gold); flex: 0 0 56px; }
.rr-acc-user p { margin: 0 !important; line-height: 1.35; }
.rr-acc-hello { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--wp--preset--color--gold-light); }
.rr-acc-name { font-family: var(--wp--preset--font-family--cinzel); font-size: 18px; margin-top: 2px !important; }
.rr-acc-email { font-size: 13px; opacity: .75; word-break: break-all; }

.rr-wc .rr-acc-side .woocommerce-MyAccount-navigation { width: auto !important; float: none !important; margin: 0 !important; }
.rr-wc .rr-acc-side .woocommerce-MyAccount-navigation ul { list-style: none; margin: 0 !important; padding: 8px 0 !important; border: 0 !important; display: block; }
.rr-wc .rr-acc-side .woocommerce-MyAccount-navigation li { margin: 0 !important; padding: 0 !important; border: 0 !important; list-style: none; }
.rr-wc .rr-acc-side .woocommerce-MyAccount-navigation li + li { margin-top: 0 !important; }
.rr-wc .rr-acc-side .woocommerce-MyAccount-navigation li a {
	position: relative; display: flex; align-items: center; gap: 14px; padding: 13px 22px !important; margin: 0;
	border: 0 !important; border-left: 3px solid transparent !important; color: var(--wp--preset--color--ink); font-size: 15px; line-height: 1.3;
	transition: background-color .2s, color .2s;
}
.rr-wc .rr-acc-side .woocommerce-MyAccount-navigation li a::before {
	content: ""; width: 20px; height: 20px; flex: 0 0 20px; background: currentColor; opacity: .85;
	-webkit-mask: var(--rr-acc-icon) center / contain no-repeat; mask: var(--rr-acc-icon) center / contain no-repeat;
}
.rr-wc .rr-acc-side .woocommerce-MyAccount-navigation li a:hover { background: var(--wp--preset--color--ivory); color: var(--wp--preset--color--navy); }
.rr-wc .rr-acc-side .woocommerce-MyAccount-navigation li.is-active a { background: var(--wp--preset--color--ivory); color: var(--wp--preset--color--navy); font-weight: 600; border-left-color: var(--wp--preset--color--gold) !important; }
.rr-wc .rr-acc-side .woocommerce-MyAccount-navigation-link--customer-logout { border-top: 1px solid var(--wp--preset--color--stone) !important; margin-top: 8px !important; padding-top: 8px !important; }
.rr-wc .rr-acc-side .woocommerce-MyAccount-navigation-link--customer-logout a:hover { color: #A23B3B; }

.woocommerce-MyAccount-navigation-link--dashboard { --rr-acc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Crect x='3' y='3' width='7' height='9'/%3E%3Crect x='14' y='3' width='7' height='5'/%3E%3Crect x='14' y='12' width='7' height='9'/%3E%3Crect x='3' y='16' width='7' height='5'/%3E%3C/svg%3E"); }
.woocommerce-MyAccount-navigation-link--orders { --rr-acc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Cpath d='M6 3h12l1 18H5z'/%3E%3Cpath d='M9 7a3 3 0 006 0'/%3E%3C/svg%3E"); }
.woocommerce-MyAccount-navigation-link--downloads { --rr-acc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Cpath d='M12 3v12M7 10l5 5 5-5'/%3E%3Cpath d='M4 17v4h16v-4'/%3E%3C/svg%3E"); }
.woocommerce-MyAccount-navigation-link--edit-address { --rr-acc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Cpath d='M12 21s-7-6.2-7-12a7 7 0 0114 0c0 5.8-7 12-7 12z'/%3E%3Ccircle cx='12' cy='9' r='2.5'/%3E%3C/svg%3E"); }
.woocommerce-MyAccount-navigation-link--payment-methods { --rr-acc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Crect x='3' y='6' width='18' height='13'/%3E%3Cpath d='M3 10h18'/%3E%3C/svg%3E"); }
.woocommerce-MyAccount-navigation-link--edit-account { --rr-acc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0116 0'/%3E%3C/svg%3E"); }
.woocommerce-MyAccount-navigation-link--customer-logout { --rr-acc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Cpath d='M15 4h4v16h-4'/%3E%3Cpath d='M10 8l-4 4 4 4M6 12h10'/%3E%3C/svg%3E"); }

/* Content card */
.rr-wc .woocommerce-MyAccount-content { width: auto !important; float: none !important; border: 1px solid var(--wp--preset--color--stone); padding: clamp(24px, 3vw, 40px); background: var(--wp--preset--color--white); min-height: 100%; box-sizing: border-box; }
.rr-wc .woocommerce-MyAccount-content > p:first-of-type { font-size: 17px; color: var(--wp--preset--color--navy); }
.rr-wc .woocommerce-MyAccount-content > p { color: var(--wp--preset--color--ink); }
.rr-wc .woocommerce-MyAccount-content a:not(.button):not(.rr-acc-tile):not(.wc-block-components-button) { color: var(--wp--preset--color--gold-dark); }
.rr-wc .woocommerce-MyAccount-content h2, .rr-wc .woocommerce-MyAccount-content h3 { font-size: 20px; letter-spacing: .06em; margin: 0 0 16px; }
.rr-wc .woocommerce-MyAccount-content .wc-block-components-notice-banner { margin-bottom: 0 !important; }

/* Dashboard tiles */
.rr-acc-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.rr-acc-tile { display: grid; grid-template-columns: 52px 1fr; grid-template-rows: auto auto; column-gap: 16px; align-items: center; padding: 20px; border: 1px solid var(--wp--preset--color--stone); background: var(--wp--preset--color--ivory); color: var(--wp--preset--color--navy) !important; transition: border-color .2s, transform .2s; }
.rr-acc-tile:hover { border-color: var(--wp--preset--color--gold); transform: translateY(-2px); }
.rr-acc-tile-icon { grid-row: 1 / 3; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; background: var(--wp--preset--color--navy); color: var(--wp--preset--color--gold-light); }
.rr-acc-tile-title { font-weight: 600; font-size: 16px; }
.rr-acc-tile-text { font-size: 13px; color: var(--wp--preset--color--ink); }

/* Tables (orders, downloads) */
.rr-wc .woocommerce-MyAccount-content table.shop_table { width: 100%; border: 1px solid var(--wp--preset--color--stone) !important; border-collapse: collapse; border-radius: 0 !important; margin: 0 0 20px; font-size: 14px; }
.rr-wc .woocommerce-MyAccount-content table.shop_table th { background: var(--wp--preset--color--ivory); color: var(--wp--preset--color--navy); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; }
.rr-wc .woocommerce-MyAccount-content table.shop_table th, .rr-wc .woocommerce-MyAccount-content table.shop_table td { padding: 14px 16px !important; border: 0 !important; border-bottom: 1px solid var(--wp--preset--color--stone) !important; text-align: left; }
.rr-wc .woocommerce-MyAccount-content table.shop_table .button { padding: 8px 14px; font-size: 11px; margin: 2px 4px 2px 0; }

/* Addresses */
.rr-wc .woocommerce-Addresses { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.rr-wc .woocommerce-Addresses::before, .rr-wc .woocommerce-Addresses::after { display: none !important; }
.rr-wc .woocommerce-Addresses .woocommerce-Address { width: auto !important; float: none !important; border: 1px solid var(--wp--preset--color--stone); padding: 22px; background: var(--wp--preset--color--ivory); }
.rr-wc .woocommerce-Address-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--wp--preset--color--stone); }
.rr-wc .woocommerce-Address-title::before, .rr-wc .woocommerce-Address-title::after { display: none !important; }
.rr-wc .woocommerce-Address-title h2 { margin: 0 !important; font-size: 17px !important; }
.rr-wc .woocommerce-Address-title .edit { float: none !important; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.rr-wc .woocommerce-Address address { font-style: normal; line-height: 1.7; color: var(--wp--preset--color--ink); }

/* Account / address forms */
.rr-wc .woocommerce-MyAccount-content form .form-row { margin: 0 0 18px !important; padding: 0 !important; }
.rr-wc .woocommerce-MyAccount-content form .input-text, .rr-wc .woocommerce-MyAccount-content form select { width: 100%; padding: 13px 16px !important; box-sizing: border-box; }
.rr-wc .woocommerce-MyAccount-content fieldset { border: 1px solid var(--wp--preset--color--stone); padding: 20px 22px; margin: 24px 0; }
.rr-wc .woocommerce-MyAccount-content legend { padding: 0 8px; font-family: var(--wp--preset--font-family--cinzel); color: var(--wp--preset--color--navy); }
.rr-wc .woocommerce-MyAccount-content .woocommerce-address-fields__field-wrapper { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
.rr-wc .woocommerce-MyAccount-content .form-row-wide, .rr-wc .woocommerce-MyAccount-content .woocommerce-address-fields__field-wrapper .form-row-wide { grid-column: 1 / -1; }
.rr-wc .woocommerce-MyAccount-content .form-row-first, .rr-wc .woocommerce-MyAccount-content .form-row-last { width: auto !important; float: none !important; }
.rr-wc .woocommerce-EditAccountForm { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
.rr-wc .woocommerce-EditAccountForm > *:not(.form-row-first):not(.form-row-last) { grid-column: 1 / -1; }
.rr-wc .woocommerce-EditAccountForm .clear { display: none; }

@media (max-width: 900px) {
	.rr-wc .woocommerce:has(> .rr-acc-side) { grid-template-columns: minmax(0, 1fr); gap: 24px; }
	.rr-acc-side { position: static; }
	.rr-wc .rr-acc-side .woocommerce-MyAccount-navigation ul { display: flex; overflow-x: auto; padding: 0 !important; }
	.rr-wc .rr-acc-side .woocommerce-MyAccount-navigation li a { border-left: 0 !important; border-bottom: 3px solid transparent !important; white-space: nowrap; padding: 14px 16px !important; }
	.rr-wc .rr-acc-side .woocommerce-MyAccount-navigation li.is-active a { border-bottom-color: var(--wp--preset--color--gold) !important; }
	.rr-wc .rr-acc-side .woocommerce-MyAccount-navigation-link--customer-logout { border-top: 0 !important; margin-top: 0 !important; padding-top: 0 !important; }
}
@media (max-width: 600px) {
	.rr-acc-tiles, .rr-wc .woocommerce-Addresses, .rr-wc .woocommerce-EditAccountForm, .rr-wc .woocommerce-MyAccount-content .woocommerce-address-fields__field-wrapper { grid-template-columns: minmax(0, 1fr); }
}

/* Long names and emails wrap inside the sidebar card instead of running past its edge. */
.rr-acc-user > div { flex: 1 1 auto; min-width: 0; }
.rr-acc-name { font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; word-break: break-word; }
.rr-acc-email { overflow-wrap: anywhere; word-break: break-all; }
.woocommerce-MyAccount-content > p:first-of-type strong { overflow-wrap: anywhere; }
