from pathlib import Path
css = r'''/*!
Theme Name: RX Theme
File: assets/css/rx-components.css
Author: RxHarun
Description: Advanced reusable component layer for RX Theme.
Version: 1.0.0
*/
/* ==========================================================================
RX THEME COMPONENT CSS
--------------------------------------------------------------------------
This file is for reusable UI components only.
Keep global reset/base styles in rx-base.css.
Keep layout styles in rx-layout.css.
Keep dynamic PHP generated CSS in dynamic/rx-dynamic.css or inline safely.
========================================================================== */
/* ==========================================================================
01. COMPONENT DESIGN TOKENS
========================================================================== */
:root {
--rx-component-radius-xs: 4px;
--rx-component-radius-sm: 6px;
--rx-component-radius-md: 10px;
--rx-component-radius-lg: 16px;
--rx-component-radius-xl: 24px;
--rx-component-radius-pill: 999px;
--rx-component-border: 1px solid var(--rx-border-color, #e5e7eb);
--rx-component-border-strong: 1px solid var(--rx-border-strong, #cbd5e1);
--rx-component-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.06);
--rx-component-shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.08);
--rx-component-shadow-md: 0 10px 25px rgba(15, 23, 42, 0.10);
--rx-component-shadow-lg: 0 18px 45px rgba(15, 23, 42, 0.14);
--rx-component-transition-fast: 150ms ease;
--rx-component-transition: 220ms ease;
--rx-component-transition-slow: 350ms ease;
--rx-component-gap-xs: 0.35rem;
--rx-component-gap-sm: 0.5rem;
--rx-component-gap-md: 1rem;
--rx-component-gap-lg: 1.5rem;
--rx-component-gap-xl: 2rem;
--rx-component-bg: var(--rx-surface, #ffffff);
--rx-component-bg-soft: var(--rx-surface-soft, #f8fafc);
--rx-component-text: var(--rx-text, #0f172a);
--rx-component-muted: var(--rx-muted, #64748b);
--rx-component-primary: var(--rx-primary, #0f766e);
--rx-component-primary-dark: var(--rx-primary-dark, #115e59);
--rx-component-primary-soft: var(--rx-primary-soft, #ccfbf1);
--rx-component-accent: var(--rx-accent, #2563eb);
--rx-component-danger: var(--rx-danger, #dc2626);
--rx-component-warning: var(--rx-warning, #d97706);
--rx-component-success: var(--rx-success, #16a34a);
--rx-component-info: var(--rx-info, #0284c7);
}
/* ==========================================================================
02. ACCESSIBILITY HELPERS
========================================================================== */
.rx-skip-link {
position: absolute;
top: -100px;
left: 1rem;
z-index: 99999;
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.75rem 1rem;
color: #ffffff;
background: var(--rx-component-primary);
border-radius: var(--rx-component-radius-md);
box-shadow: var(--rx-component-shadow-md);
text-decoration: none;
transition: top var(--rx-component-transition-fast);
}
.rx-skip-link:focus {
top: 1rem;
outline: 3px solid rgba(15, 118, 110, 0.3);
outline-offset: 3px;
}
.rx-focus-ring:focus-visible,
.rx-btn:focus-visible,
.rx-card:focus-within,
.rx-input:focus,
.rx-select:focus,
.rx-textarea:focus {
outline: 3px solid color-mix(in srgb, var(--rx-component-primary) 30%, transparent);
outline-offset: 3px;
}
.rx-visually-hidden,
.screen-reader-text {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0 !important;
margin: -1px !important;
overflow: hidden;
clip: rect(0 0 0 0);
white-space: nowrap !important;
border: 0 !important;
}
.rx-visually-hidden-focusable:focus,
.screen-reader-text:focus {
position: static !important;
width: auto;
height: auto;
padding: 0.75rem 1rem !important;
margin: 0 !important;
overflow: visible;
clip: auto;
white-space: normal !important;
background: #ffffff;
color: var(--rx-component-text);
border-radius: var(--rx-component-radius-sm);
box-shadow: var(--rx-component-shadow-md);
}
/* ==========================================================================
03. BUTTONS
========================================================================== */
.rx-btn,
.wp-block-button__link,
button.rx-btn,
input[type="submit"].rx-btn,
input[type="button"].rx-btn {
--rx-btn-bg: var(--rx-component-primary);
--rx-btn-color: #ffffff;
--rx-btn-border: var(--rx-component-primary);
--rx-btn-hover-bg: var(--rx-component-primary-dark);
--rx-btn-hover-color: #ffffff;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.45rem;
min-height: 2.75rem;
padding: 0.72rem 1.1rem;
font: inherit;
font-weight: 700;
line-height: 1.2;
color: var(--rx-btn-color);
background: var(--rx-btn-bg);
border: 1px solid var(--rx-btn-border);
border-radius: var(--rx-component-radius-md);
box-shadow: var(--rx-component-shadow-xs);
text-decoration: none;
cursor: pointer;
user-select: none;
transition:
transform var(--rx-component-transition-fast),
box-shadow var(--rx-component-transition-fast),
background-color var(--rx-component-transition-fast),
color var(--rx-component-transition-fast),
border-color var(--rx-component-transition-fast);
}
.rx-btn:hover,
.wp-block-button__link:hover {
color: var(--rx-btn-hover-color);
background: var(--rx-btn-hover-bg);
border-color: var(--rx-btn-hover-bg);
box-shadow: var(--rx-component-shadow-sm);
transform: translateY(-1px);
text-decoration: none;
}
.rx-btn:active {
transform: translateY(0);
box-shadow: var(--rx-component-shadow-xs);
}
.rx-btn:disabled,
.rx-btn.is-disabled,
.rx-btn[aria-disabled="true"] {
opacity: 0.55;
pointer-events: none;
cursor: not-allowed;
}
.rx-btn--secondary {
--rx-btn-bg: var(--rx-component-accent);
--rx-btn-border: var(--rx-component-accent);
--rx-btn-hover-bg: #1d4ed8;
}
.rx-btn--outline {
--rx-btn-bg: transparent;
--rx-btn-color: var(--rx-component-primary);
--rx-btn-border: var(--rx-component-primary);
--rx-btn-hover-bg: var(--rx-component-primary);
--rx-btn-hover-color: #ffffff;
}
.rx-btn--ghost {
--rx-btn-bg: transparent;
--rx-btn-color: var(--rx-component-primary);
--rx-btn-border: transparent;
--rx-btn-hover-bg: var(--rx-component-primary-soft);
--rx-btn-hover-color: var(--rx-component-primary-dark);
box-shadow: none;
}
.rx-btn--light {
--rx-btn-bg: #ffffff;
--rx-btn-color: var(--rx-component-text);
--rx-btn-border: var(--rx-border-color, #e5e7eb);
--rx-btn-hover-bg: var(--rx-component-bg-soft);
--rx-btn-hover-color: var(--rx-component-text);
}
.rx-btn--danger {
--rx-btn-bg: var(--rx-component-danger);
--rx-btn-border: var(--rx-component-danger);
--rx-btn-hover-bg: #b91c1c;
}
.rx-btn--success {
--rx-btn-bg: var(--rx-component-success);
--rx-btn-border: var(--rx-component-success);
--rx-btn-hover-bg: #15803d;
}
.rx-btn--sm {
min-height: 2.25rem;
padding: 0.5rem 0.8rem;
font-size: 0.875rem;
border-radius: var(--rx-component-radius-sm);
}
.rx-btn--lg {
min-height: 3.25rem;
padding: 0.9rem 1.35rem;
font-size: 1.05rem;
border-radius: var(--rx-component-radius-lg);
}
.rx-btn--block {
display: flex;
width: 100%;
}
.rx-btn__icon {
display: inline-flex;
width: 1.1em;
height: 1.1em;
flex: 0 0 auto;
}
.rx-btn-group {
display: inline-flex;
flex-wrap: wrap;
gap: 0.5rem;
}
.rx-btn-group--connected {
gap: 0;
}
.rx-btn-group--connected .rx-btn {
border-radius: 0;
}
.rx-btn-group--connected .rx-btn:first-child {
border-start-start-radius: var(--rx-component-radius-md);
border-end-start-radius: var(--rx-component-radius-md);
}
.rx-btn-group--connected .rx-btn:last-child {
border-start-end-radius: var(--rx-component-radius-md);
border-end-end-radius: var(--rx-component-radius-md);
}
/* ==========================================================================
04. BADGES, PILLS, TAGS
========================================================================== */
.rx-badge,
.rx-pill,
.rx-tag {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.35rem;
width: fit-content;
max-width: 100%;
padding: 0.25rem 0.6rem;
font-size: 0.78rem;
font-weight: 700;
line-height: 1.2;
color: var(--rx-component-primary-dark);
background: var(--rx-component-primary-soft);
border: 1px solid color-mix(in srgb, var(--rx-component-primary) 18%, transparent);
border-radius: var(--rx-component-radius-pill);
text-decoration: none;
vertical-align: middle;
}
.rx-badge--outline,
.rx-pill--outline,
.rx-tag--outline {
color: var(--rx-component-primary);
background: transparent;
border-color: currentColor;
}
.rx-badge--danger {
color: #991b1b;
background: #fee2e2;
border-color: #fecaca;
}
.rx-badge--warning {
color: #92400e;
background: #fef3c7;
border-color: #fde68a;
}
.rx-badge--success {
color: #166534;
background: #dcfce7;
border-color: #bbf7d0;
}
.rx-badge--info {
color: #075985;
background: #e0f2fe;
border-color: #bae6fd;
}
.rx-tag-list,
.rx-pill-list,
.rx-badge-list {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
padding: 0;
margin: 0;
list-style: none;
}
/* ==========================================================================
05. CARDS
========================================================================== */
.rx-card {
position: relative;
display: flex;
flex-direction: column;
gap: var(--rx-component-gap-md);
min-width: 0;
color: var(--rx-component-text);
background: var(--rx-component-bg);
border: var(--rx-component-border);
border-radius: var(--rx-component-radius-lg);
box-shadow: var(--rx-component-shadow-xs);
overflow: hidden;
transition:
transform var(--rx-component-transition),
box-shadow var(--rx-component-transition),
border-color var(--rx-component-transition);
}
.rx-card:hover {
border-color: color-mix(in srgb, var(--rx-component-primary) 30%, var(--rx-border-color, #e5e7eb));
box-shadow: var(--rx-component-shadow-md);
transform: translateY(-2px);
}
.rx-card--static:hover {
transform: none;
box-shadow: var(--rx-component-shadow-xs);
}
.rx-card--flat {
box-shadow: none;
}
.rx-card--soft {
background: var(--rx-component-bg-soft);
}
.rx-card--borderless {
border: 0;
}
.rx-card__media {
position: relative;
overflow: hidden;
background: var(--rx-component-bg-soft);
}
.rx-card__media img {
display: block;
width: 100%;
height: auto;
object-fit: cover;
transition: transform var(--rx-component-transition-slow);
}
.rx-card:hover .rx-card__media img {
transform: scale(1.035);
}
.rx-card__body,
.rx-card__header,
.rx-card__footer {
padding-inline: clamp(1rem, 2vw, 1.35rem);
}
.rx-card__header {
padding-top: clamp(1rem, 2vw, 1.35rem);
}
.rx-card__body {
padding-block: clamp(1rem, 2vw, 1.35rem);
}
.rx-card__footer {
padding-bottom: clamp(1rem, 2vw, 1.35rem);
}
.rx-card__title {
margin: 0;
font-size: clamp(1.05rem, 1.6vw, 1.35rem);
line-height: 1.25;
}
.rx-card__title a {
color: inherit;
text-decoration: none;
}
.rx-card__title a:hover {
color: var(--rx-component-primary);
text-decoration: underline;
text-underline-offset: 0.18em;
}
.rx-card__meta {
display: flex;
flex-wrap: wrap;
gap: 0.35rem 0.75rem;
color: var(--rx-component-muted);
font-size: 0.9rem;
}
.rx-card__excerpt {
color: var(--rx-component-muted);
}
.rx-card__actions {
display: flex;
flex-wrap: wrap;
gap: 0.6rem;
align-items: center;
margin-top: auto;
}
.rx-card--featured {
border-color: color-mix(in srgb, var(--rx-component-primary) 35%, var(--rx-border-color, #e5e7eb));
box-shadow: var(--rx-component-shadow-sm);
}
.rx-card--featured::before {
content: "";
position: absolute;
inset-block: 0;
inset-inline-start: 0;
width: 4px;
background: linear-gradient(180deg, var(--rx-component-primary), var(--rx-component-accent));
}
.rx-card-grid {
display: grid;
grid-template-columns: repeat(var(--rx-card-grid-columns, auto-fit), minmax(min(100%, var(--rx-card-min, 260px)), 1fr));
gap: clamp(1rem, 2vw, 1.5rem);
}
.rx-card-grid--2 {
--rx-card-grid-columns: 2;
}
.rx-card-grid--3 {
--rx-card-grid-columns: 3;
}
.rx-card-grid--4 {
--rx-card-grid-columns: 4;
}
/* ==========================================================================
06. POST COMPONENTS
========================================================================== */
.rx-post-card {
display: grid;
grid-template-rows: auto 1fr;
height: 100%;
}
.rx-post-card__thumbnail {
aspect-ratio: 16 / 9;
}
.rx-post-card__thumbnail img {
width: 100%;
height: 100%;
object-fit: cover;
}
.rx-post-card__category {
position: absolute;
inset-block-start: 0.85rem;
inset-inline-start: 0.85rem;
z-index: 2;
}
.rx-post-card__content {
display: flex;
flex-direction: column;
gap: 0.7rem;
padding: clamp(1rem, 2vw, 1.25rem);
}
.rx-post-card__title {
margin: 0;
font-size: clamp(1.05rem, 1.8vw, 1.35rem);
line-height: 1.28;
}
.rx-post-card__title a {
color: inherit;
text-decoration: none;
}
.rx-post-card__title a:hover {
color: var(--rx-component-primary);
}
.rx-post-card__excerpt {
margin: 0;
color: var(--rx-component-muted);
}
.rx-post-card__meta {
display: flex;
flex-wrap: wrap;
gap: 0.4rem 0.8rem;
align-items: center;
color: var(--rx-component-muted);
font-size: 0.875rem;
}
.rx-post-card__read-more {
margin-top: auto;
}
.rx-post-list {
display: grid;
gap: 1rem;
}
.rx-post-list-item {
display: grid;
grid-template-columns: minmax(96px, 160px) 1fr;
gap: 1rem;
align-items: start;
padding: 1rem;
background: var(--rx-component-bg);
border: var(--rx-component-border);
border-radius: var(--rx-component-radius-lg);
box-shadow: var(--rx-component-shadow-xs);
}
.rx-post-list-item__image {
aspect-ratio: 4 / 3;
overflow: hidden;
border-radius: var(--rx-component-radius-md);
background: var(--rx-component-bg-soft);
}
.rx-post-list-item__image img {
width: 100%;
height: 100%;
object-fit: cover;
}
.rx-post-list-item__title {
margin: 0 0 0.4rem;
font-size: clamp(1rem, 1.4vw, 1.25rem);
}
.rx-post-list-item__title a {
color: inherit;
text-decoration: none;
}
.rx-post-list-item__title a:hover {
color: var(--rx-component-primary);
}
.rx-related-posts {
margin-block: clamp(2rem, 5vw, 4rem);
}
.rx-related-posts__title {
margin-block-end: 1rem;
font-size: clamp(1.35rem, 3vw, 2rem);
}
/* ==========================================================================
07. MEDICAL ARTICLE COMPONENTS
========================================================================== */
.rx-medical-summary {
padding: clamp(1rem, 2.5vw, 1.5rem);
background:
linear-gradient(135deg, color-mix(in srgb, var(--rx-component-primary) 9%, transparent), transparent 45%),
var(--rx-component-bg-soft);
border: var(--rx-component-border);
border-inline-start: 5px solid var(--rx-component-primary);
border-radius: var(--rx-component-radius-lg);
}
.rx-medical-summary__title {
margin-block: 0 0.7rem;
color: var(--rx-component-primary-dark);
}
.rx-medical-summary__text {
margin-block: 0;
color: var(--rx-component-text);
}
.rx-medical-disclaimer {
display: grid;
grid-template-columns: auto 1fr;
gap: 0.8rem;
padding: 1rem;
color: #7c2d12;
background: #fff7ed;
border: 1px solid #fed7aa;
border-radius: var(--rx-component-radius-lg);
}
.rx-medical-disclaimer::before {
content: "!";
display: inline-grid;
place-items: center;
width: 1.75rem;
height: 1.75rem;
color: #ffffff;
background: #ea580c;
border-radius: 50%;
font-weight: 800;
}
.rx-medical-fact-box,
.rx-key-point-box,
.rx-clinical-note {
padding: clamp(1rem, 2vw, 1.35rem);
background: var(--rx-component-bg);
border: var(--rx-component-border);
border-radius: var(--rx-component-radius-lg);
box-shadow: var(--rx-component-shadow-xs);
}
.rx-medical-fact-box {
border-top: 4px solid var(--rx-component-info);
}
.rx-key-point-box {
border-top: 4px solid var(--rx-component-success);
}
.rx-clinical-note {
border-top: 4px solid var(--rx-component-warning);
}
.rx-medical-fact-box > :first-child,
.rx-key-point-box > :first-child,
.rx-clinical-note > :first-child {
margin-top: 0;
}
.rx-medical-fact-box > :last-child,
.rx-key-point-box > :last-child,
.rx-clinical-note > :last-child {
margin-bottom: 0;
}
.rx-symptom-list,
.rx-cause-list,
.rx-test-list,
.rx-treatment-list {
display: grid;
gap: 0.75rem;
padding: 0;
list-style: none;
}
.rx-symptom-list li,
.rx-cause-list li,
.rx-test-list li,
.rx-treatment-list li {
position: relative;
padding: 0.85rem 1rem 0.85rem 2.75rem;
background: var(--rx-component-bg);
border: var(--rx-component-border);
border-radius: var(--rx-component-radius-md);
}
.rx-symptom-list li::before,
.rx-cause-list li::before,
.rx-test-list li::before,
.rx-treatment-list li::before {
content: "✓";
position: absolute;
inset-block-start: 0.85rem;
inset-inline-start: 1rem;
display: inline-grid;
place-items: center;
width: 1.25rem;
height: 1.25rem;
color: #ffffff;
background: var(--rx-component-primary);
border-radius: 50%;
font-size: 0.75rem;
font-weight: 800;
}
.rx-warning-list li::before {
content: "!";
background: var(--rx-component-warning);
}
.rx-danger-list li::before {
content: "!";
background: var(--rx-component-danger);
}
.rx-medical-term {
color: var(--rx-component-primary-dark);
font-weight: 800;
text-decoration: underline;
text-decoration-color: color-mix(in srgb, var(--rx-component-primary) 30%, transparent);
text-underline-offset: 0.18em;
}
.rx-reference-chip {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 1.35rem;
height: 1.35rem;
padding-inline: 0.35rem;
color: #ffffff;
background: var(--rx-component-accent);
border-radius: var(--rx-component-radius-pill);
font-size: 0.72rem;
font-weight: 800;
text-decoration: none;
vertical-align: super;
}
.rx-reference-chip:hover {
color: #ffffff;
background: #1d4ed8;
text-decoration: none;
}
/* ==========================================================================
08. ALERTS AND NOTICES
========================================================================== */
.rx-alert,
.rx-notice {
--rx-alert-color: var(--rx-component-info);
--rx-alert-bg: #e0f2fe;
--rx-alert-border: #bae6fd;
position: relative;
display: grid;
grid-template-columns: auto 1fr;
gap: 0.8rem;
padding: 1rem;
color: color-mix(in srgb, var(--rx-alert-color) 70%, #111827);
background: var(--rx-alert-bg);
border: 1px solid var(--rx-alert-border);
border-radius: var(--rx-component-radius-lg);
}
.rx-alert::before,
.rx-notice::before {
content: "i";
display: inline-grid;
place-items: center;
width: 1.65rem;
height: 1.65rem;
color: #ffffff;
background: var(--rx-alert-color);
border-radius: 50%;
font-weight: 800;
line-height: 1;
}
.rx-alert > :first-child,
.rx-notice > :first-child {
margin-top: 0;
}
.rx-alert > :last-child,
.rx-notice > :last-child {
margin-bottom: 0;
}
.rx-alert--success,
.rx-notice--success {
--rx-alert-color: var(--rx-component-success);
--rx-alert-bg: #dcfce7;
--rx-alert-border: #bbf7d0;
}
.rx-alert--warning,
.rx-notice--warning {
--rx-alert-color: var(--rx-component-warning);
--rx-alert-bg: #fef3c7;
--rx-alert-border: #fde68a;
}
.rx-alert--danger,
.rx-notice--danger {
--rx-alert-color: var(--rx-component-danger);
--rx-alert-bg: #fee2e2;
--rx-alert-border: #fecaca;
}
.rx-alert--plain {
display: block;
}
.rx-alert--plain::before {
display: none;
}
/* ==========================================================================
09. FORMS
========================================================================== */
.rx-form {
display: grid;
gap: 1rem;
}
.rx-form-row {
display: grid;
grid-template-columns: repeat(var(--rx-form-columns, 1), minmax(0, 1fr));
gap: 1rem;
}
.rx-form-row--2 {
--rx-form-columns: 2;
}
.rx-form-row--3 {
--rx-form-columns: 3;
}
.rx-field {
display: grid;
gap: 0.4rem;
}
.rx-label {
color: var(--rx-component-text);
font-weight: 700;
}
.rx-required {
color: var(--rx-component-danger);
}
.rx-help-text,
.rx-field-description {
color: var(--rx-component-muted);
font-size: 0.875rem;
}
.rx-input,
.rx-select,
.rx-textarea,
.rx-search-field,
input[type="text"].rx-input,
input[type="email"].rx-input,
input[type="url"].rx-input,
input[type="password"].rx-input,
input[type="number"].rx-input,
input[type="search"].rx-input,
textarea.rx-textarea,
select.rx-select {
width: 100%;
min-height: 2.75rem;
padding: 0.7rem 0.85rem;
color: var(--rx-component-text);
background: #ffffff;
border: var(--rx-component-border);
border-radius: var(--rx-component-radius-md);
box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
font: inherit;
line-height: 1.4;
transition:
border-color var(--rx-component-transition-fast),
box-shadow var(--rx-component-transition-fast),
background-color var(--rx-component-transition-fast);
}
.rx-textarea,
textarea.rx-textarea {
min-height: 8rem;
resize: vertical;
}
.rx-input:hover,
.rx-select:hover,
.rx-textarea:hover {
border-color: var(--rx-border-strong, #cbd5e1);
}
.rx-input:focus,
.rx-select:focus,
.rx-textarea:focus {
border-color: var(--rx-component-primary);
box-shadow:
inset 0 1px 2px rgba(15, 23, 42, 0.04),
0 0 0 4px color-mix(in srgb, var(--rx-component-primary) 16%, transparent);
}
.rx-input[aria-invalid="true"],
.rx-select[aria-invalid="true"],
.rx-textarea[aria-invalid="true"],
.rx-field--error .rx-input,
.rx-field--error .rx-select,
.rx-field--error .rx-textarea {
border-color: var(--rx-component-danger);
}
.rx-field--error .rx-help-text,
.rx-error-text {
color: var(--rx-component-danger);
}
.rx-field--success .rx-input,
.rx-field--success .rx-select,
.rx-field--success .rx-textarea {
border-color: var(--rx-component-success);
}
.rx-checkbox,
.rx-radio {
display: inline-flex;
align-items: flex-start;
gap: 0.55rem;
cursor: pointer;
}
.rx-checkbox input,
.rx-radio input {
width: 1.05rem;
height: 1.05rem;
margin-top: 0.15em;
accent-color: var(--rx-component-primary);
}
.rx-search-form {
display: flex;
gap: 0.5rem;
align-items: stretch;
}
.rx-search-form .rx-search-field {
flex: 1;
}
.rx-search-form .rx-btn {
flex: 0 0 auto;
}
.rx-form-card {
padding: clamp(1rem, 3vw, 2rem);
background: var(--rx-component-bg);
border: var(--rx-component-border);
border-radius: var(--rx-component-radius-xl);
box-shadow: var(--rx-component-shadow-sm);
}
/* ==========================================================================
10. TABLES
========================================================================== */
.rx-table-wrap {
width: 100%;
overflow-x: auto;
border: var(--rx-component-border);
border-radius: var(--rx-component-radius-lg);
background: var(--rx-component-bg);
box-shadow: var(--rx-component-shadow-xs);
}
.rx-table {
width: 100%;
border-collapse: collapse;
min-width: 640px;
font-size: 0.95rem;
}
.rx-table th,
.rx-table td {
padding: 0.85rem 1rem;
border-bottom: var(--rx-component-border);
text-align: start;
vertical-align: top;
}
.rx-table th {
color: var(--rx-component-text);
background: var(--rx-component-bg-soft);
font-weight: 800;
}
.rx-table tr:last-child td {
border-bottom: 0;
}
.rx-table tbody tr:hover {
background: color-mix(in srgb, var(--rx-component-primary) 4%, transparent);
}
.rx-table--compact th,
.rx-table--compact td {
padding: 0.55rem 0.75rem;
}
.rx-table--striped tbody tr:nth-child(even) {
background: var(--rx-component-bg-soft);
}
.rx-responsive-table {
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}
/* ==========================================================================
11. NAVIGATION COMPONENTS
========================================================================== */
.rx-nav {
display: flex;
align-items: center;
gap: 1rem;
}
.rx-nav ul,
.rx-menu,
.rx-submenu {
padding: 0;
margin: 0;
list-style: none;
}
.rx-menu {
display: flex;
flex-wrap: wrap;
gap: 0.2rem;
align-items: center;
}
.rx-menu a {
display: inline-flex;
align-items: center;
gap: 0.35rem;
min-height: 2.5rem;
padding: 0.55rem 0.75rem;
color: var(--rx-component-text);
border-radius: var(--rx-component-radius-md);
text-decoration: none;
transition:
background-color var(--rx-component-transition-fast),
color var(--rx-component-transition-fast);
}
.rx-menu a:hover,
.rx-menu .current-menu-item > a,
.rx-menu .current_page_item > a,
.rx-menu .current-menu-ancestor > a {
color: var(--rx-component-primary-dark);
background: var(--rx-component-primary-soft);
text-decoration: none;
}
.rx-menu .menu-item-has-children {
position: relative;
}
.rx-menu .sub-menu {
position: absolute;
inset-block-start: 100%;
inset-inline-start: 0;
z-index: 50;
min-width: 220px;
padding: 0.5rem;
background: var(--rx-component-bg);
border: var(--rx-component-border);
border-radius: var(--rx-component-radius-lg);
box-shadow: var(--rx-component-shadow-md);
opacity: 0;
visibility: hidden;
transform: translateY(8px);
transition:
opacity var(--rx-component-transition-fast),
visibility var(--rx-component-transition-fast),
transform var(--rx-component-transition-fast);
}
.rx-menu .menu-item-has-children:hover > .sub-menu,
.rx-menu .menu-item-has-children:focus-within > .sub-menu {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
.rx-menu .sub-menu a {
width: 100%;
justify-content: flex-start;
}
.rx-mobile-menu-toggle {
display: none;
align-items: center;
justify-content: center;
width: 2.75rem;
height: 2.75rem;
background: var(--rx-component-bg);
border: var(--rx-component-border);
border-radius: var(--rx-component-radius-md);
cursor: pointer;
}
.rx-breadcrumbs {
display: flex;
flex-wrap: wrap;
gap: 0.35rem;
align-items: center;
color: var(--rx-component-muted);
font-size: 0.9rem;
}
.rx-breadcrumbs a {
color: var(--rx-component-primary);
text-decoration: none;
}
.rx-breadcrumbs a:hover {
text-decoration: underline;
text-underline-offset: 0.18em;
}
.rx-breadcrumbs__separator {
color: var(--rx-component-muted);
}
.rx-pagination,
.pagination,
.nav-links {
display: flex;
flex-wrap: wrap;
gap: 0.45rem;
align-items: center;
justify-content: center;
margin-block: clamp(2rem, 4vw, 3rem);
}
.rx-pagination a,
.rx-pagination span,
.pagination .page-numbers,
.nav-links .page-numbers {
display: inline-grid;
place-items: center;
min-width: 2.5rem;
min-height: 2.5rem;
padding: 0.45rem 0.75rem;
color: var(--rx-component-text);
background: var(--rx-component-bg);
border: var(--rx-component-border);
border-radius: var(--rx-component-radius-md);
text-decoration: none;
font-weight: 700;
}
.rx-pagination a:hover,
.pagination .page-numbers:hover,
.nav-links .page-numbers:hover,
.rx-pagination .current,
.pagination .current,
.nav-links .current {
color: #ffffff;
background: var(--rx-component-primary);
border-color: var(--rx-component-primary);
text-decoration: none;
}
/* ==========================================================================
12. HERO AND SECTION COMPONENTS
========================================================================== */
.rx-hero {
position: relative;
display: grid;
align-items: center;
min-height: clamp(360px, 55vw, 680px);
padding-block: clamp(3rem, 8vw, 7rem);
color: var(--rx-hero-color, var(--rx-component-text));
background:
radial-gradient(circle at top left, color-mix(in srgb, var(--rx-component-primary) 18%, transparent), transparent 35%),
linear-gradient(135deg, var(--rx-component-bg), var(--rx-component-bg-soft));
overflow: hidden;
}
.rx-hero__inner {
position: relative;
z-index: 2;
width: min(100% - 2rem, var(--rx-container, 1180px));
margin-inline: auto;
}
.rx-hero__eyebrow {
display: inline-flex;
width: fit-content;
margin-block-end: 0.75rem;
}
.rx-hero__title {
max-width: 900px;
margin: 0;
font-size: clamp(2rem, 6vw, 4.8rem);
line-height: 1.05;
letter-spacing: -0.04em;
}
.rx-hero__subtitle {
max-width: 760px;
margin-block: 1rem 0;
color: var(--rx-component-muted);
font-size: clamp(1rem, 2vw, 1.3rem);
line-height: 1.65;
}
.rx-hero__actions {
display: flex;
flex-wrap: wrap;
gap: 0.75rem;
margin-block-start: 1.5rem;
}
.rx-section {
padding-block: clamp(2.5rem, 6vw, 5rem);
}
.rx-section--soft {
background: var(--rx-component-bg-soft);
}
.rx-section__header {
max-width: 780px;
margin-block-end: clamp(1.5rem, 4vw, 2.5rem);
}
.rx-section__eyebrow {
margin-block-end: 0.5rem;
}
.rx-section__title {
margin: 0;
font-size: clamp(1.7rem, 4vw, 3rem);
line-height: 1.15;
letter-spacing: -0.025em;
}
.rx-section__description {
margin-block: 0.8rem 0;
color: var(--rx-component-muted);
font-size: clamp(1rem, 1.6vw, 1.15rem);
line-height: 1.7;
}
/* ==========================================================================
13. SIDEBAR AND WIDGETS
========================================================================== */
.rx-sidebar {
display: grid;
gap: 1.25rem;
}
.rx-widget,
.widget {
padding: clamp(1rem, 2vw, 1.3rem);
background: var(--rx-component-bg);
border: var(--rx-component-border);
border-radius: var(--rx-component-radius-lg);
box-shadow: var(--rx-component-shadow-xs);
}
.rx-widget-title,
.widget-title,
.widget_block h2 {
margin-block: 0 1rem;
font-size: 1.15rem;
line-height: 1.3;
}
.rx-widget ul,
.widget ul {
padding-inline-start: 1.15rem;
margin-block: 0;
}
.rx-widget li,
.widget li {
margin-block: 0.45rem;
}
.rx-widget a,
.widget a {
color: var(--rx-component-text);
text-decoration: none;
}
.rx-widget a:hover,
.widget a:hover {
color: var(--rx-component-primary);
text-decoration: underline;
text-underline-offset: 0.18em;
}
.rx-author-box {
display: grid;
grid-template-columns: auto 1fr;
gap: 1rem;
padding: clamp(1rem, 3vw, 1.5rem);
background: var(--rx-component-bg);
border: var(--rx-component-border);
border-radius: var(--rx-component-radius-xl);
box-shadow: var(--rx-component-shadow-sm);
}
.rx-author-box__avatar {
width: 72px;
height: 72px;
overflow: hidden;
border-radius: 50%;
background: var(--rx-component-bg-soft);
}
.rx-author-box__avatar img {
width: 100%;
height: 100%;
object-fit: cover;
}
.rx-author-box__name {
margin: 0 0 0.35rem;
}
.rx-author-box__bio {
margin: 0;
color: var(--rx-component-muted);
}
/* ==========================================================================
14. COMMENTS
========================================================================== */
.rx-comments-area,
.comments-area {
margin-block: clamp(2rem, 5vw, 4rem);
}
.rx-comment-list,
.comment-list {
display: grid;
gap: 1rem;
padding: 0;
list-style: none;
}
.rx-comment,
.comment {
padding: 1rem;
background: var(--rx-component-bg);
border: var(--rx-component-border);
border-radius: var(--rx-component-radius-lg);
}
.comment-body {
display: grid;
gap: 0.75rem;
}
.comment-meta {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
color: var(--rx-component-muted);
font-size: 0.9rem;
}
.comment-author {
font-weight: 800;
color: var(--rx-component-text);
}
.reply a,
.comment-reply-link {
display: inline-flex;
width: fit-content;
padding: 0.4rem 0.7rem;
color: var(--rx-component-primary);
background: var(--rx-component-primary-soft);
border-radius: var(--rx-component-radius-pill);
font-size: 0.85rem;
font-weight: 700;
text-decoration: none;
}
.reply a:hover,
.comment-reply-link:hover {
color: #ffffff;
background: var(--rx-component-primary);
}
/* ==========================================================================
15. ACCORDION, TABS, FAQ
========================================================================== */
.rx-accordion {
display: grid;
gap: 0.75rem;
}
.rx-accordion__item {
background: var(--rx-component-bg);
border: var(--rx-component-border);
border-radius: var(--rx-component-radius-lg);
overflow: hidden;
}
.rx-accordion__trigger,
.rx-faq__question {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
padding: 1rem 1.15rem;
color: var(--rx-component-text);
background: transparent;
border: 0;
font: inherit;
font-weight: 800;
text-align: start;
cursor: pointer;
}
.rx-accordion__trigger::after,
.rx-faq__question::after {
content: "+";
flex: 0 0 auto;
display: inline-grid;
place-items: center;
width: 1.6rem;
height: 1.6rem;
color: var(--rx-component-primary);
background: var(--rx-component-primary-soft);
border-radius: 50%;
}
.rx-accordion__item[open] .rx-accordion__trigger::after,
.rx-faq__item[open] .rx-faq__question::after {
content: "−";
}
.rx-accordion__panel,
.rx-faq__answer {
padding: 0 1.15rem 1.15rem;
color: var(--rx-component-muted);
}
.rx-tabs {
display: grid;
gap: 1rem;
}
.rx-tabs__list {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
border-bottom: var(--rx-component-border);
}
.rx-tabs__button {
padding: 0.75rem 1rem;
color: var(--rx-component-muted);
background: transparent;
border: 0;
border-bottom: 3px solid transparent;
font: inherit;
font-weight: 800;
cursor: pointer;
}
.rx-tabs__button[aria-selected="true"],
.rx-tabs__button.is-active {
color: var(--rx-component-primary);
border-bottom-color: var(--rx-component-primary);
}
.rx-tabs__panel {
padding-block: 1rem;
}
.rx-faq {
display: grid;
gap: 0.85rem;
}
.rx-faq__item {
background: var(--rx-component-bg);
border: var(--rx-component-border);
border-radius: var(--rx-component-radius-lg);
box-shadow: var(--rx-component-shadow-xs);
}
/* ==========================================================================
16. MODAL, DRAWER, DROPDOWN
========================================================================== */
.rx-modal {
position: fixed;
inset: 0;
z-index: 9999;
display: none;
place-items: center;
padding: 1rem;
background: rgba(15, 23, 42, 0.6);
backdrop-filter: blur(6px);
}
.rx-modal.is-open {
display: grid;
}
.rx-modal__dialog {
width: min(100%, 680px);
max-height: min(90vh, 800px);
overflow: auto;
background: var(--rx-component-bg);
border-radius: var(--rx-component-radius-xl);
box-shadow: var(--rx-component-shadow-lg);
}
.rx-modal__header,
.rx-modal__body,
.rx-modal__footer {
padding: clamp(1rem, 2vw, 1.5rem);
}
.rx-modal__header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
border-bottom: var(--rx-component-border);
}
.rx-modal__footer {
display: flex;
justify-content: flex-end;
gap: 0.75rem;
border-top: var(--rx-component-border);
}
.rx-modal__close {
display: inline-grid;
place-items: center;
width: 2.25rem;
height: 2.25rem;
background: var(--rx-component-bg-soft);
border: var(--rx-component-border);
border-radius: 50%;
cursor: pointer;
}
.rx-drawer {
position: fixed;
inset-block: 0;
inset-inline-end: 0;
z-index: 9998;
width: min(90vw, 420px);
background: var(--rx-component-bg);
box-shadow: var(--rx-component-shadow-lg);
transform: translateX(105%);
transition: transform var(--rx-component-transition);
}
.rx-drawer.is-open {
transform: translateX(0);
}
.rx-dropdown {
position: relative;
display: inline-block;
}
.rx-dropdown__menu {
position: absolute;
inset-block-start: calc(100% + 0.5rem);
inset-inline-start: 0;
z-index: 80;
min-width: 220px;
padding: 0.5rem;
background: var(--rx-component-bg);
border: var(--rx-component-border);
border-radius: var(--rx-component-radius-lg);
box-shadow: var(--rx-component-shadow-md);
opacity: 0;
visibility: hidden;
transform: translateY(8px);
transition:
opacity var(--rx-component-transition-fast),
visibility var(--rx-component-transition-fast),
transform var(--rx-component-transition-fast);
}
.rx-dropdown:hover .rx-dropdown__menu,
.rx-dropdown:focus-within .rx-dropdown__menu,
.rx-dropdown.is-open .rx-dropdown__menu {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
/* ==========================================================================
17. TOOLTIPS
========================================================================== */
.rx-tooltip {
position: relative;
cursor: help;
}
.rx-tooltip::after {
content: attr(data-tooltip);
position: absolute;
inset-block-end: calc(100% + 0.5rem);
inset-inline-start: 50%;
z-index: 100;
width: max-content;
max-width: 240px;
padding: 0.5rem 0.7rem;
color: #ffffff;
background: #111827;
border-radius: var(--rx-component-radius-sm);
font-size: 0.8rem;
line-height: 1.35;
opacity: 0;
visibility: hidden;
transform: translateX(-50%) translateY(4px);
transition:
opacity var(--rx-component-transition-fast),
visibility var(--rx-component-transition-fast),
transform var(--rx-component-transition-fast);
}
.rx-tooltip:hover::after,
.rx-tooltip:focus-visible::after {
opacity: 1;
visibility: visible;
transform: translateX(-50%) translateY(0);
}
/* ==========================================================================
18. MEDIA, FIGURES, GALLERIES
========================================================================== */
.rx-figure {
margin: 0;
overflow: hidden;
background: var(--rx-component-bg);
border: var(--rx-component-border);
border-radius: var(--rx-component-radius-lg);
box-shadow: var(--rx-component-shadow-xs);
}
.rx-figure img {
display: block;
width: 100%;
height: auto;
}
.rx-figcaption {
padding: 0.75rem 1rem;
color: var(--rx-component-muted);
background: var(--rx-component-bg-soft);
font-size: 0.9rem;
}
.rx-gallery {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
gap: 0.75rem;
}
.rx-gallery__item {
aspect-ratio: 1 / 1;
overflow: hidden;
background: var(--rx-component-bg-soft);
border-radius: var(--rx-component-radius-md);
}
.rx-gallery__item img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform var(--rx-component-transition);
}
.rx-gallery__item:hover img {
transform: scale(1.04);
}
.rx-video {
position: relative;
aspect-ratio: 16 / 9;
overflow: hidden;
background: #000000;
border-radius: var(--rx-component-radius-lg);
}
.rx-video iframe,
.rx-video video {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
}
/* ==========================================================================
19. PROGRESS, LOADER, SKELETON
========================================================================== */
.rx-progress {
width: 100%;
height: 0.7rem;
overflow: hidden;
background: var(--rx-component-bg-soft);
border-radius: var(--rx-component-radius-pill);
}
.rx-progress__bar {
width: var(--rx-progress-value, 0%);
height: 100%;
background: linear-gradient(90deg, var(--rx-component-primary), var(--rx-component-accent));
border-radius: inherit;
transition: width var(--rx-component-transition-slow);
}
.rx-spinner {
display: inline-block;
width: 1.6rem;
height: 1.6rem;
border: 3px solid color-mix(in srgb, var(--rx-component-primary) 18%, transparent);
border-top-color: var(--rx-component-primary);
border-radius: 50%;
animation: rx-spin 0.8s linear infinite;
}
@keyframes rx-spin {
to {
transform: rotate(360deg);
}
}
.rx-skeleton {
position: relative;
overflow: hidden;
background: #e5e7eb;
border-radius: var(--rx-component-radius-md);
}
.rx-skeleton::after {
content: "";
position: absolute;
inset: 0;
transform: translateX(-100%);
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
animation: rx-skeleton 1.4s infinite;
}
@keyframes rx-skeleton {
100% {
transform: translateX(100%);
}
}
.rx-skeleton--text {
height: 1em;
}
.rx-skeleton--title {
height: 1.4em;
width: 70%;
}
.rx-skeleton--avatar {
width: 3rem;
height: 3rem;
border-radius: 50%;
}
.rx-skeleton--image {
aspect-ratio: 16 / 9;
}
/* ==========================================================================
20. BACK TO TOP, FLOATING ACTIONS
========================================================================== */
.rx-back-to-top,
.rx-floating-action {
position: fixed;
inset-inline-end: 1rem;
inset-block-end: 1rem;
z-index: 900;
display: inline-grid;
place-items: center;
width: 3rem;
height: 3rem;
color: #ffffff;
background: var(--rx-component-primary);
border: 0;
border-radius: 50%;
box-shadow: var(--rx-component-shadow-md);
cursor: pointer;
text-decoration: none;
transition:
transform var(--rx-component-transition-fast),
background-color var(--rx-component-transition-fast),
box-shadow var(--rx-component-transition-fast);
}
.rx-back-to-top:hover,
.rx-floating-action:hover {
color: #ffffff;
background: var(--rx-component-primary-dark);
transform: translateY(-2px);
box-shadow: var(--rx-component-shadow-lg);
}
/* ==========================================================================
21. WORDPRESS BLOCK SUPPORT
========================================================================== */
.wp-block-group.rx-block-card,
.wp-block-columns.rx-block-card,
.wp-block-media-text.rx-block-card {
padding: clamp(1rem, 3vw, 2rem);
background: var(--rx-component-bg);
border: var(--rx-component-border);
border-radius: var(--rx-component-radius-xl);
box-shadow: var(--rx-component-shadow-xs);
}
.wp-block-quote,
.rx-quote {
margin-inline: 0;
padding: 1rem 1.25rem;
color: var(--rx-component-text);
background: var(--rx-component-bg-soft);
border-inline-start: 5px solid var(--rx-component-primary);
border-radius: 0 var(--rx-component-radius-lg) var(--rx-component-radius-lg) 0;
}
.wp-block-quote cite,
.rx-quote cite {
display: block;
margin-block-start: 0.75rem;
color: var(--rx-component-muted);
font-size: 0.9rem;
}
.wp-block-pullquote {
padding: clamp(1.5rem, 4vw, 3rem);
border-top: 4px solid var(--rx-component-primary);
border-bottom: 4px solid var(--rx-component-primary);
}
.wp-block-separator {
border: 0;
border-top: var(--rx-component-border);
}
.wp-block-table {
overflow-x: auto;
}
.wp-block-table table {
width: 100%;
border-collapse: collapse;
}
.wp-block-table th,
.wp-block-table td {
padding: 0.85rem 1rem;
border: var(--rx-component-border);
}
.wp-block-code,
pre {
padding: 1rem;
overflow-x: auto;
color: #e5e7eb;
background: #0f172a;
border-radius: var(--rx-component-radius-lg);
}
code {
padding: 0.15em 0.35em;
color: #be123c;
background: #ffe4e6;
border-radius: var(--rx-component-radius-xs);
font-size: 0.9em;
}
pre code {
padding: 0;
color: inherit;
background: transparent;
border-radius: 0;
}
/* ==========================================================================
22. UTILITY COMPONENT CLASSES
========================================================================== */
.rx-stack {
display: flex;
flex-direction: column;
gap: var(--rx-stack-gap, 1rem);
}
.rx-cluster {
display: flex;
flex-wrap: wrap;
gap: var(--rx-cluster-gap, 1rem);
align-items: center;
}
.rx-center {
display: grid;
place-items: center;
}
.rx-split {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
}
.rx-grid {
display: grid;
gap: var(--rx-grid-gap, 1rem);
grid-template-columns: repeat(var(--rx-grid-columns, auto-fit), minmax(min(100%, var(--rx-grid-min, 240px)), 1fr));
}
.rx-grid--2 {
--rx-grid-columns: 2;
}
.rx-grid--3 {
--rx-grid-columns: 3;
}
.rx-grid--4 {
--rx-grid-columns: 4;
}
.rx-container-narrow {
width: min(100% - 2rem, 760px);
margin-inline: auto;
}
.rx-container-wide {
width: min(100% - 2rem, 1320px);
margin-inline: auto;
}
.rx-surface {
background: var(--rx-component-bg);
border: var(--rx-component-border);
border-radius: var(--rx-component-radius-lg);
box-shadow: var(--rx-component-shadow-xs);
}
.rx-surface-soft {
background: var(--rx-component-bg-soft);
border-radius: var(--rx-component-radius-lg);
}
.rx-text-muted {
color: var(--rx-component-muted);
}
.rx-text-primary {
color: var(--rx-component-primary);
}
.rx-text-success {
color: var(--rx-component-success);
}
.rx-text-warning {
color: var(--rx-component-warning);
}
.rx-text-danger {
color: var(--rx-component-danger);
}
.rx-bg-soft {
background: var(--rx-component-bg-soft);
}
.rx-rounded {
border-radius: var(--rx-component-radius-lg);
}
.rx-shadow {
box-shadow: var(--rx-component-shadow-sm);
}
.rx-shadow-lg {
box-shadow: var(--rx-component-shadow-lg);
}
.rx-overflow-hidden {
overflow: hidden;
}
.rx-w-100 {
width: 100%;
}
.rx-h-100 {
height: 100%;
}
.rx-mt-0 { margin-top: 0 !important; }
.rx-mb-0 { margin-bottom: 0 !important; }
.rx-my-0 { margin-block: 0 !important; }
.rx-p-0 { padding: 0 !important; }
.rx-mt-sm { margin-top: 0.5rem !important; }
.rx-mt-md { margin-top: 1rem !important; }
.rx-mt-lg { margin-top: 1.5rem !important; }
.rx-mt-xl { margin-top: 2rem !important; }
.rx-mb-sm { margin-bottom: 0.5rem !important; }
.rx-mb-md { margin-bottom: 1rem !important; }
.rx-mb-lg { margin-bottom: 1.5rem !important; }
.rx-mb-xl { margin-bottom: 2rem !important; }
.rx-p-sm { padding: 0.5rem !important; }
.rx-p-md { padding: 1rem !important; }
.rx-p-lg { padding: 1.5rem !important; }
.rx-p-xl { padding: 2rem !important; }
/* ==========================================================================
23. DARK MODE SUPPORT
========================================================================== */
[data-theme="dark"] .rx-card,
[data-theme="dark"] .rx-widget,
[data-theme="dark"] .rx-form-card,
[data-theme="dark"] .rx-author-box,
[data-theme="dark"] .rx-modal__dialog,
[data-theme="dark"] .rx-drawer,
[data-theme="dark"] .rx-dropdown__menu,
[data-theme="dark"] .rx-menu .sub-menu {
--rx-component-bg: #0f172a;
--rx-component-bg-soft: #111827;
--rx-component-text: #e5e7eb;
--rx-component-muted: #94a3b8;
--rx-border-color: #1f2937;
--rx-border-strong: #334155;
}
[data-theme="dark"] .rx-input,
[data-theme="dark"] .rx-select,
[data-theme="dark"] .rx-textarea,
[data-theme="dark"] .rx-search-field {
color: #e5e7eb;
background: #111827;
border-color: #334155;
}
[data-theme="dark"] .rx-table th {
background: #111827;
}
[data-theme="dark"] .rx-table tbody tr:hover {
background: rgba(255,255,255,0.04);
}
[data-theme="dark"] code {
color: #fecdd3;
background: #881337;
}
/* ==========================================================================
24. RESPONSIVE RULES
========================================================================== */
@media (max-width: 1024px) {
.rx-card-grid--4,
.rx-grid--4 {
--rx-card-grid-columns: 3;
--rx-grid-columns: 3;
}
.rx-form-row--3 {
--rx-form-columns: 2;
}
}
@media (max-width: 768px) {
.rx-mobile-menu-toggle {
display: inline-flex;
}
.rx-menu {
width: 100%;
flex-direction: column;
align-items: stretch;
}
.rx-menu .sub-menu {
position: static;
min-width: 0;
box-shadow: none;
opacity: 1;
visibility: visible;
transform: none;
border-radius: var(--rx-component-radius-md);
margin-inline-start: 1rem;
}
.rx-card-grid--2,
.rx-card-grid--3,
.rx-card-grid--4,
.rx-grid--2,
.rx-grid--3,
.rx-grid--4 {
--rx-card-grid-columns: 1;
--rx-grid-columns: 1;
}
.rx-form-row--2,
.rx-form-row--3 {
--rx-form-columns: 1;
}
.rx-post-list-item {
grid-template-columns: 1fr;
}
.rx-author-box {
grid-template-columns: 1fr;
text-align: center;
}
.rx-author-box__avatar {
margin-inline: auto;
}
.rx-search-form {
flex-direction: column;
}
.rx-split {
flex-direction: column;
align-items: stretch;
}
}
@media (max-width: 480px) {
.rx-btn,
.wp-block-button__link {
width: 100%;
}
.rx-btn-group {
width: 100%;
}
.rx-btn-group .rx-btn {
flex: 1 1 100%;
}
.rx-hero__actions {
flex-direction: column;
}
.rx-modal {
padding: 0.5rem;
}
.rx-modal__dialog {
border-radius: var(--rx-component-radius-lg);
}
}
/* ==========================================================================
25. PRINT SUPPORT
========================================================================== */
@media print {
.rx-btn,
.rx-mobile-menu-toggle,
.rx-back-to-top,
.rx-floating-action,
.rx-modal,
.rx-drawer,
.rx-dropdown__menu,
.rx-hero__actions,
.rx-card__actions,
.rx-search-form {
display: none !important;
}
.rx-card,
.rx-widget,
.rx-alert,
.rx-medical-summary,
.rx-medical-fact-box,
.rx-key-point-box,
.rx-clinical-note {
box-shadow: none !important;
border-color: #000000 !important;
break-inside: avoid;
}
a {
color: #000000 !important;
text-decoration: underline !important;
}
}
/* ==========================================================================
26. REDUCED MOTION
========================================================================== */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.001ms !important;
animation-iteration-count: 1 !important;
scroll-behavior: auto !important;
transition-duration: 0.001ms !important;
}
}
/* ==========================================================================
27. MODERN CSS ENHANCEMENTS
========================================================================== */
@supports selector(:has(*)) {
.rx-card:has(.rx-card__media) .rx-card__body {
padding-top: 0.25rem;
}
.rx-field:has([aria-invalid="true"]) .rx-label {
color: var(--rx-component-danger);
}
.rx-search-form:has(.rx-search-field:focus) {
filter: drop-shadow(0 0 0.35rem color-mix(in srgb, var(--rx-component-primary) 16%, transparent));
}
}
@supports (container-type: inline-size) {
.rx-card,
.rx-widget,
.rx-post-card {
container-type: inline-size;
}
@container (max-width: 300px) {
.rx-card__meta,
.rx-post-card__meta {
flex-direction: column;
align-items: flex-start;
}
.rx-card__actions {
flex-direction: column;
align-items: stretch;
}
}
}
/* End of assets/css/rx-components.css */
'''
path = Path("/mnt/data/rx-components.css")
path.write_text(css, encoding="utf-8")
print(f"Created {path} with {len(css.splitlines())} lines and {len(css)} characters.")