751 lines
15 KiB
CSS
751 lines
15 KiB
CSS
/**
|
|
* ShopDrawer + CartToast — visually aligned with Landing/Product surfaces.
|
|
*
|
|
* Buttons inside the drawer use the global `.atmos-btn` system. This file
|
|
* only owns layout, the form-field skin, and the surface look of inner
|
|
* cards (cart item, payment card, requirements, orders, etc.).
|
|
*/
|
|
|
|
/* ----- Backdrop & shell -------------------------------------------------- */
|
|
|
|
.drawer-backdrop {
|
|
position: fixed;
|
|
inset: 0;
|
|
z-index: var(--z-drawer-backdrop);
|
|
background: rgba(0, 0, 0, 0.58);
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
transition: opacity var(--duration-med) var(--ease-out);
|
|
}
|
|
|
|
.drawer-backdrop.is-open {
|
|
opacity: 1;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
.shop-drawer {
|
|
position: fixed;
|
|
top: 0;
|
|
right: 0;
|
|
z-index: var(--z-drawer);
|
|
width: min(560px, 100%);
|
|
height: 100vh;
|
|
height: 100dvh;
|
|
padding: clamp(1rem, 3vw, 1.4rem);
|
|
overflow-y: auto;
|
|
background: var(--theme-surface);
|
|
border-left: 1px solid var(--theme-border);
|
|
color: var(--theme-text);
|
|
box-shadow: var(--theme-shadow);
|
|
transform: translateX(100%);
|
|
transition: transform var(--duration-med) var(--ease-out);
|
|
}
|
|
|
|
.shop-drawer.is-open {
|
|
transform: translateX(0);
|
|
}
|
|
|
|
/* ----- Top bar ----------------------------------------------------------- */
|
|
|
|
.drawer-top {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: var(--gap-sm);
|
|
padding-bottom: var(--gap-sm);
|
|
margin-bottom: var(--gap-md);
|
|
border-bottom: 1px solid var(--theme-border);
|
|
}
|
|
|
|
.drawer-top .atmos-btn--icon {
|
|
font-size: 1.1rem;
|
|
line-height: 1;
|
|
}
|
|
|
|
/* ----- Sections ---------------------------------------------------------- */
|
|
|
|
.drawer-stack {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--gap-sm);
|
|
}
|
|
|
|
.drawer-section {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--gap-xs);
|
|
padding: clamp(1rem, 2.4vw, 1.4rem);
|
|
border: 1px solid var(--theme-border);
|
|
background:
|
|
linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008)),
|
|
var(--theme-surface-soft);
|
|
}
|
|
|
|
.drawer-section-head {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: var(--gap-sm);
|
|
}
|
|
|
|
.drawer-eyebrow {
|
|
display: block;
|
|
margin: 0;
|
|
color: var(--theme-text-muted);
|
|
font-size: var(--text-xs);
|
|
letter-spacing: 0.22em;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.drawer-heading {
|
|
margin: 0;
|
|
color: var(--theme-text);
|
|
font-size: clamp(1.4rem, 3vw, 1.8rem);
|
|
font-weight: 300;
|
|
line-height: 1.05;
|
|
letter-spacing: 0;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.drawer-muted {
|
|
margin: 0;
|
|
color: var(--theme-text-muted);
|
|
font-size: var(--text-sm);
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.drawer-form {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--gap-xs);
|
|
}
|
|
|
|
/* ----- Form fields ------------------------------------------------------- */
|
|
|
|
.drawer-grid {
|
|
display: grid;
|
|
gap: var(--gap-xs);
|
|
}
|
|
|
|
.drawer-grid--two {
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
}
|
|
|
|
.drawer-field {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.4rem;
|
|
}
|
|
|
|
.drawer-field > span {
|
|
color: var(--theme-text-muted);
|
|
font-size: var(--text-xs);
|
|
letter-spacing: 0.18em;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.drawer-field input {
|
|
width: 100%;
|
|
min-height: 44px;
|
|
padding: 0 0.75rem;
|
|
border: 1px solid var(--theme-control-border);
|
|
background: var(--theme-control-bg);
|
|
color: var(--theme-text);
|
|
font: inherit;
|
|
letter-spacing: 0;
|
|
text-transform: none;
|
|
transition:
|
|
border-color var(--duration-med) var(--ease-out),
|
|
background-color var(--duration-med) var(--ease-out);
|
|
}
|
|
|
|
.drawer-field input:hover {
|
|
border-color: var(--theme-control-border-hover);
|
|
}
|
|
|
|
.drawer-field input:focus {
|
|
border-color: var(--theme-control-border-focus);
|
|
outline: 2px solid var(--theme-focus-ring);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
/* ----- Cart -------------------------------------------------------------- */
|
|
|
|
.cart-items {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--gap-xs);
|
|
margin-top: var(--gap-2xs);
|
|
}
|
|
|
|
.cart-item {
|
|
display: grid;
|
|
grid-template-columns: minmax(0, 1fr) auto auto;
|
|
align-items: center;
|
|
gap: var(--gap-sm);
|
|
padding: clamp(0.85rem, 2vw, 1.1rem);
|
|
border: 1px solid var(--theme-border);
|
|
background: var(--theme-paper);
|
|
}
|
|
|
|
.cart-item-info h3 {
|
|
margin: 0 0 0.25rem;
|
|
color: var(--theme-text);
|
|
font-size: var(--text-base);
|
|
font-weight: 400;
|
|
line-height: 1.2;
|
|
letter-spacing: 0;
|
|
text-transform: none;
|
|
}
|
|
|
|
.cart-item-info p {
|
|
margin: 0;
|
|
color: var(--theme-text-muted);
|
|
font-size: var(--text-sm);
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.cart-controls {
|
|
display: grid;
|
|
grid-template-columns: 36px 36px 36px;
|
|
align-items: center;
|
|
border: 1px solid var(--theme-border);
|
|
background: var(--theme-surface);
|
|
}
|
|
|
|
.cart-controls button {
|
|
width: 36px;
|
|
height: 36px;
|
|
border: 0;
|
|
background: transparent;
|
|
color: var(--theme-text);
|
|
font-size: var(--text-base);
|
|
cursor: pointer;
|
|
transition:
|
|
background-color var(--duration-med) var(--ease-out),
|
|
color var(--duration-med) var(--ease-out);
|
|
}
|
|
|
|
.cart-controls button:hover {
|
|
background: rgba(var(--theme-accent-rgb) / 0.12);
|
|
color: var(--theme-accent);
|
|
}
|
|
|
|
.cart-controls span {
|
|
text-align: center;
|
|
font-size: var(--text-sm);
|
|
}
|
|
|
|
/* ----- Payment ----------------------------------------------------------- */
|
|
|
|
.payment-fieldset {
|
|
min-width: 0;
|
|
margin: 0;
|
|
padding: 0;
|
|
border: 0;
|
|
}
|
|
|
|
.payment-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
gap: var(--gap-xs);
|
|
margin-top: var(--gap-2xs);
|
|
}
|
|
|
|
.payment-card {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--gap-xs);
|
|
min-height: 60px;
|
|
padding: var(--gap-xs);
|
|
border: 1px solid var(--theme-border);
|
|
background: var(--theme-paper);
|
|
color: var(--theme-text);
|
|
cursor: pointer;
|
|
isolation: isolate;
|
|
transition:
|
|
border-color var(--duration-med) var(--ease-out),
|
|
background-color var(--duration-med) var(--ease-out);
|
|
}
|
|
|
|
.payment-card__input {
|
|
position: absolute;
|
|
width: 1px;
|
|
height: 1px;
|
|
padding: 0;
|
|
margin: -1px;
|
|
overflow: hidden;
|
|
clip: rect(0, 0, 0, 0);
|
|
white-space: nowrap;
|
|
border: 0;
|
|
}
|
|
|
|
.payment-card::before {
|
|
content: "";
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 2px;
|
|
background: var(--theme-accent);
|
|
transform: scaleX(0);
|
|
transform-origin: left center;
|
|
transition: transform var(--duration-med) var(--ease-out);
|
|
}
|
|
|
|
.payment-card:hover {
|
|
border-color: rgba(var(--theme-accent-rgb) / 0.55);
|
|
}
|
|
|
|
.payment-card:focus-within {
|
|
border-color: var(--theme-control-border-focus);
|
|
outline: 2px solid var(--theme-focus-ring);
|
|
outline-offset: 3px;
|
|
}
|
|
|
|
.payment-card.is-active {
|
|
border-color: var(--theme-accent);
|
|
background: rgba(var(--theme-accent-rgb) / 0.08);
|
|
}
|
|
|
|
.payment-card.is-active::before {
|
|
transform: scaleX(1);
|
|
}
|
|
|
|
.payment-card__badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-width: 44px;
|
|
height: 28px;
|
|
background: var(--theme-text);
|
|
color: var(--theme-bg);
|
|
font-size: var(--text-xs);
|
|
letter-spacing: 0.12em;
|
|
}
|
|
|
|
.payment-card strong {
|
|
color: var(--theme-text);
|
|
font-size: var(--text-sm);
|
|
font-weight: 400;
|
|
}
|
|
|
|
/* ----- Totals ------------------------------------------------------------ */
|
|
|
|
.drawer-totals {
|
|
gap: var(--gap-xs);
|
|
}
|
|
|
|
.drawer-totals__row {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
gap: var(--gap-sm);
|
|
font-size: var(--text-sm);
|
|
color: var(--theme-text);
|
|
}
|
|
|
|
.drawer-totals__row span {
|
|
color: var(--theme-text-muted);
|
|
font-size: var(--text-xs);
|
|
letter-spacing: 0.16em;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.drawer-totals__row--total {
|
|
margin-top: var(--gap-xs);
|
|
padding-top: var(--gap-xs);
|
|
border-top: 1px solid var(--theme-border);
|
|
font-size: var(--text-lg);
|
|
}
|
|
|
|
.drawer-totals__row--total span {
|
|
color: var(--theme-text);
|
|
font-size: var(--text-xs);
|
|
}
|
|
|
|
.drawer-totals__explainer {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.5rem;
|
|
padding: var(--gap-xs);
|
|
border: 1px solid var(--theme-border);
|
|
background: var(--theme-paper);
|
|
}
|
|
|
|
.drawer-totals__explainer p {
|
|
margin: 0;
|
|
color: var(--theme-text);
|
|
font-size: var(--text-sm);
|
|
line-height: 1.45;
|
|
}
|
|
|
|
.drawer-totals__explainer strong {
|
|
color: var(--theme-accent);
|
|
font-weight: 400;
|
|
}
|
|
|
|
/* ----- Error ------------------------------------------------------------- */
|
|
|
|
.drawer-error {
|
|
margin: 0;
|
|
padding: var(--gap-xs);
|
|
border: 1px solid var(--theme-accent);
|
|
background: rgba(var(--theme-accent-rgb) / 0.08);
|
|
color: var(--theme-text);
|
|
font-size: var(--text-sm);
|
|
line-height: 1.5;
|
|
}
|
|
|
|
/* ----- Profile ----------------------------------------------------------- */
|
|
|
|
.drawer-profile-head {
|
|
flex-direction: row;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: var(--gap-sm);
|
|
}
|
|
|
|
.drawer-profile-head > div {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.35rem;
|
|
}
|
|
|
|
.profile-read-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
gap: var(--gap-xs);
|
|
margin-top: var(--gap-2xs);
|
|
}
|
|
|
|
.drawer-read-block {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.4rem;
|
|
padding: var(--gap-xs);
|
|
border: 1px solid var(--theme-border);
|
|
background: var(--theme-paper);
|
|
}
|
|
|
|
.drawer-read-block span {
|
|
color: var(--theme-text-muted);
|
|
font-size: var(--text-xs);
|
|
letter-spacing: 0.16em;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.drawer-read-block strong {
|
|
color: var(--theme-text);
|
|
font-size: var(--text-sm);
|
|
font-weight: 400;
|
|
line-height: 1.4;
|
|
word-break: break-word;
|
|
}
|
|
|
|
/* ----- Status box -------------------------------------------------------- */
|
|
|
|
.drawer-status-box {
|
|
padding: var(--gap-xs);
|
|
border: 1px solid var(--theme-border);
|
|
background: var(--theme-paper);
|
|
color: var(--theme-text);
|
|
font-size: var(--text-base);
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.drawer-credit-list {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 0.5rem;
|
|
margin-top: var(--gap-2xs);
|
|
}
|
|
|
|
.drawer-credit-list span {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
padding: 0.4rem 0.7rem;
|
|
border: 1px solid var(--theme-border);
|
|
background: var(--theme-paper);
|
|
color: var(--theme-text);
|
|
font-size: var(--text-xs);
|
|
letter-spacing: 0.05em;
|
|
}
|
|
|
|
/* ----- Toggles ----------------------------------------------------------- */
|
|
|
|
.drawer-toggle-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
gap: var(--gap-xs);
|
|
}
|
|
|
|
.drawer-toggle {
|
|
position: relative;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
gap: 0.35rem;
|
|
min-height: 64px;
|
|
padding: var(--gap-xs);
|
|
border: 1px solid var(--theme-border);
|
|
background: var(--theme-paper);
|
|
color: var(--theme-text);
|
|
cursor: pointer;
|
|
isolation: isolate;
|
|
transition:
|
|
border-color var(--duration-med) var(--ease-out),
|
|
background-color var(--duration-med) var(--ease-out);
|
|
}
|
|
|
|
.drawer-toggle::before {
|
|
content: "";
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 2px;
|
|
background: var(--theme-accent);
|
|
transform: scaleX(0);
|
|
transform-origin: left center;
|
|
transition: transform var(--duration-med) var(--ease-out);
|
|
}
|
|
|
|
.drawer-toggle:hover {
|
|
border-color: rgba(var(--theme-accent-rgb) / 0.55);
|
|
}
|
|
|
|
.drawer-toggle.is-active {
|
|
border-color: var(--theme-accent);
|
|
background: rgba(var(--theme-accent-rgb) / 0.08);
|
|
}
|
|
|
|
.drawer-toggle.is-active::before {
|
|
transform: scaleX(1);
|
|
}
|
|
|
|
.drawer-toggle span {
|
|
color: var(--theme-text-muted);
|
|
font-size: var(--text-xs);
|
|
letter-spacing: 0.16em;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.drawer-toggle strong {
|
|
color: var(--theme-text);
|
|
font-size: var(--text-sm);
|
|
font-weight: 400;
|
|
}
|
|
|
|
.drawer-toggle.is-active strong {
|
|
color: var(--theme-accent);
|
|
}
|
|
|
|
/* ----- Subscriptions ----------------------------------------------------- */
|
|
|
|
.drawer-subscription-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--gap-xs);
|
|
margin-top: var(--gap-sm);
|
|
padding-top: var(--gap-sm);
|
|
border-top: 1px solid var(--theme-border);
|
|
}
|
|
|
|
.drawer-subscription-row {
|
|
display: grid;
|
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
align-items: center;
|
|
gap: var(--gap-sm);
|
|
padding: var(--gap-xs);
|
|
border: 1px solid var(--theme-border);
|
|
background: var(--theme-paper);
|
|
}
|
|
|
|
.drawer-subscription-row > div {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.2rem;
|
|
min-width: 0;
|
|
}
|
|
|
|
.drawer-subscription-row strong {
|
|
color: var(--theme-text);
|
|
font-size: var(--text-sm);
|
|
font-weight: 400;
|
|
}
|
|
|
|
.drawer-subscription-row span {
|
|
color: var(--theme-text-muted);
|
|
font-size: var(--text-xs);
|
|
}
|
|
|
|
/* ----- Requirements ------------------------------------------------------ */
|
|
|
|
.drawer-requirements {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.4rem;
|
|
margin-top: var(--gap-2xs);
|
|
}
|
|
|
|
.drawer-requirement {
|
|
position: relative;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
gap: var(--gap-sm);
|
|
padding: var(--gap-xs);
|
|
border: 1px solid var(--theme-border);
|
|
background: var(--theme-paper);
|
|
isolation: isolate;
|
|
}
|
|
|
|
.drawer-requirement::before {
|
|
content: "";
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 2px;
|
|
background: var(--theme-accent);
|
|
transform: scaleX(0);
|
|
transform-origin: left center;
|
|
transition: transform var(--duration-med) var(--ease-out);
|
|
}
|
|
|
|
.drawer-requirement.is-met::before {
|
|
transform: scaleX(1);
|
|
}
|
|
|
|
.drawer-requirement span {
|
|
color: var(--theme-text-muted);
|
|
font-size: var(--text-xs);
|
|
letter-spacing: 0.16em;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.drawer-requirement strong {
|
|
color: var(--theme-text);
|
|
font-size: var(--text-sm);
|
|
font-weight: 400;
|
|
}
|
|
|
|
.drawer-requirement.is-met strong {
|
|
color: var(--theme-accent);
|
|
}
|
|
|
|
/* ----- Orders ------------------------------------------------------------ */
|
|
|
|
.drawer-order-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--gap-xs);
|
|
margin-top: var(--gap-2xs);
|
|
}
|
|
|
|
.drawer-order-card {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.4rem;
|
|
padding: var(--gap-xs);
|
|
border: 1px solid var(--theme-border);
|
|
background: var(--theme-paper);
|
|
}
|
|
|
|
.drawer-order-card header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
gap: var(--gap-sm);
|
|
}
|
|
|
|
.drawer-order-card header span {
|
|
color: var(--theme-text-muted);
|
|
font-size: var(--text-xs);
|
|
}
|
|
|
|
.drawer-order-card p {
|
|
margin: 0;
|
|
color: var(--theme-text-muted);
|
|
font-size: var(--text-sm);
|
|
line-height: 1.45;
|
|
}
|
|
|
|
.drawer-order-card__total {
|
|
align-self: flex-end;
|
|
color: var(--theme-text);
|
|
font-size: var(--text-base);
|
|
font-weight: 400;
|
|
}
|
|
|
|
/* ----- Cart Toast -------------------------------------------------------- */
|
|
|
|
.cart-toast {
|
|
position: fixed;
|
|
right: var(--page-x);
|
|
bottom: var(--page-x);
|
|
z-index: var(--z-toast);
|
|
width: min(360px, calc(100vw - (var(--page-x) * 2)));
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--gap-xs);
|
|
padding: clamp(1rem, 2.4vw, 1.25rem);
|
|
border: 1px solid var(--theme-border);
|
|
background: var(--theme-surface);
|
|
color: var(--theme-text);
|
|
box-shadow: var(--theme-shadow);
|
|
}
|
|
|
|
.cart-toast strong {
|
|
color: var(--theme-text);
|
|
font-size: var(--text-base);
|
|
font-weight: 400;
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.cart-toast p {
|
|
margin: 0 var(--gap-md) 0 0;
|
|
color: var(--theme-text-muted);
|
|
font-size: var(--text-sm);
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.cart-toast-close {
|
|
position: absolute;
|
|
top: 0.55rem;
|
|
right: 0.55rem;
|
|
}
|
|
|
|
/* ----- Responsive -------------------------------------------------------- */
|
|
|
|
@media (max-width: 640px) {
|
|
.shop-drawer {
|
|
width: 100%;
|
|
}
|
|
|
|
.drawer-grid--two,
|
|
.profile-read-grid,
|
|
.drawer-toggle-grid,
|
|
.payment-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.cart-item {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.drawer-profile-head {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
}
|
|
}
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.shop-drawer,
|
|
.drawer-backdrop,
|
|
.payment-card::before,
|
|
.drawer-toggle::before,
|
|
.drawer-requirement::before {
|
|
transition: none;
|
|
}
|
|
}
|