Revert "Update frontend CSS to match Twenty Twenty-Five theme"

This reverts commit 1ad29120e9.
This commit is contained in:
2026-01-21 22:38:54 +01:00
parent 1660c185dd
commit 76cc943dc7

View File

@@ -1,129 +1,68 @@
/**
* WC Licensed Product - Frontend Styles
* Uses WordPress Global Styles CSS Custom Properties
*
* @package Jeremias\WcLicensedProduct
*/
/* ========================================
CSS Custom Properties
Uses WordPress theme.json global styles with fallbacks
======================================== */
.woocommerce-licenses,
.wclp-modal,
#licensed-product-domain-field {
/* Colors - inherit from WordPress global styles */
--wclp-color-base: var(--wp--preset--color--base, #FFFFFF);
--wclp-color-contrast: var(--wp--preset--color--contrast, #111111);
--wclp-color-accent-4: var(--wp--preset--color--accent-4, #686868);
--wclp-color-accent-5: var(--wp--preset--color--accent-5, #f5f5f5);
--wclp-color-accent-6: var(--wp--preset--color--accent-6, rgba(0, 0, 0, 0.1));
/* Typography - inherit from WordPress global styles */
--wclp-font-family: var(--wp--preset--font-family--body, inherit);
--wclp-font-family-mono: var(--wp--preset--font-family--monospace, "Fira Code", Consolas, Monaco, monospace);
--wclp-font-size-small: var(--wp--preset--font-size--small, 0.875rem);
--wclp-font-size-medium: var(--wp--preset--font-size--medium, 1rem);
/* Spacing - inherit from WordPress global styles */
--wclp-spacing-20: var(--wp--preset--spacing--20, 10px);
--wclp-spacing-30: var(--wp--preset--spacing--30, 20px);
--wclp-spacing-40: var(--wp--preset--spacing--40, 30px);
/* Border radius */
--wclp-border-radius: 0.25rem;
--wclp-border-radius-pill: 3.125rem;
/* Derived colors using color-mix for transparency */
--wclp-border-color: color-mix(in srgb, var(--wclp-color-contrast) 15%, transparent);
--wclp-border-color-hover: color-mix(in srgb, var(--wclp-color-contrast) 30%, transparent);
--wclp-bg-subtle: color-mix(in srgb, var(--wclp-color-contrast) 3%, var(--wclp-color-base));
}
/* ========================================
License Status Badges
======================================== */
/* License Status Badges */
.license-status {
display: inline-block;
padding: 0.35em 0.85em;
font-size: var(--wclp-font-size-small);
font-weight: 500;
padding: 0.25em 0.6em;
font-size: 0.85em;
font-weight: 600;
line-height: 1;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
border-radius: var(--wclp-border-radius-pill);
letter-spacing: 0.02em;
border-radius: 0.25rem;
}
.license-status-active {
background-color: color-mix(in srgb, green 15%, var(--wclp-color-base));
color: color-mix(in srgb, green 70%, var(--wclp-color-contrast));
background-color: #d4edda;
color: #155724;
}
.license-status-inactive {
background-color: color-mix(in srgb, orange 15%, var(--wclp-color-base));
color: color-mix(in srgb, orange 80%, var(--wclp-color-contrast));
background-color: #fff3cd;
color: #856404;
}
.license-status-expired {
background-color: color-mix(in srgb, red 15%, var(--wclp-color-base));
color: color-mix(in srgb, red 70%, var(--wclp-color-contrast));
background-color: #f8d7da;
color: #721c24;
}
.license-status-revoked {
background-color: var(--wclp-bg-subtle);
color: var(--wclp-color-accent-4);
background-color: #d6d8db;
color: #383d41;
}
/* ========================================
License Cards Container
======================================== */
/* License Cards */
.woocommerce-licenses {
display: flex;
flex-direction: column;
gap: var(--wclp-spacing-40);
font-family: var(--wclp-font-family);
color: var(--wclp-color-contrast);
gap: 1.5em;
}
.woocommerce-licenses > p:first-child:last-child {
color: var(--wclp-color-accent-4);
font-style: italic;
}
/* ========================================
License Card
======================================== */
.license-card {
border: 1px solid var(--wclp-border-color);
border-radius: var(--wclp-border-radius);
border: 1px solid #e5e5e5;
border-radius: 8px;
overflow: hidden;
background: var(--wclp-color-base);
transition: border-color 0.2s ease;
background: #fff;
}
.license-card:hover {
border-color: var(--wclp-border-color-hover);
}
/* License Header */
.license-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: var(--wclp-spacing-30);
background: var(--wclp-bg-subtle);
border-bottom: 1px solid var(--wclp-border-color);
gap: 1rem;
padding: 1em 1.5em;
background: #f8f9fa;
border-bottom: 1px solid #e5e5e5;
}
.license-header h3 {
margin: 0;
font-size: var(--wclp-font-size-medium);
font-weight: 500;
letter-spacing: -0.1px;
color: var(--wclp-color-contrast);
font-size: 1.1em;
}
.license-header h3 a {
@@ -135,60 +74,48 @@
text-decoration: underline;
}
/* License Details */
.license-details {
padding: var(--wclp-spacing-30);
background: var(--wclp-color-base);
padding: 1.5em;
}
/* License Key Row */
.license-key-row {
display: flex;
align-items: center;
gap: 0.75rem;
margin-bottom: var(--wclp-spacing-30);
gap: 0.75em;
margin-bottom: 1em;
flex-wrap: wrap;
}
.license-key-row label {
font-weight: 500;
font-size: var(--wclp-font-size-small);
color: var(--wclp-color-accent-4);
font-weight: 600;
}
.license-key-row code,
.license-key {
font-family: var(--wclp-font-family-mono);
background-color: var(--wclp-bg-subtle);
padding: 0.5em 1em;
border-radius: var(--wclp-border-radius);
font-size: var(--wclp-font-size-small);
font-weight: 400;
.license-key-row code {
font-family: 'SF Mono', Monaco, Consolas, monospace;
background-color: #f5f5f5;
padding: 0.4em 0.8em;
border-radius: 4px;
font-size: 1em;
letter-spacing: 0.05em;
color: var(--wclp-color-contrast);
border: 1px solid var(--wclp-border-color);
}
/* Copy Button */
.copy-license-btn {
display: inline-flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
width: 32px;
height: 32px;
padding: 0;
background: var(--wclp-color-base);
border: 1px solid var(--wclp-border-color);
border-radius: var(--wclp-border-radius);
background: #f0f0f0;
border: 1px solid #ddd;
border-radius: 4px;
cursor: pointer;
transition: all 0.2s ease;
color: var(--wclp-color-accent-4);
}
.copy-license-btn:hover {
background: var(--wclp-bg-subtle);
border-color: var(--wclp-border-color-hover);
color: var(--wclp-color-contrast);
background: #e5e5e5;
border-color: #ccc;
}
.copy-license-btn .dashicons {
@@ -200,75 +127,54 @@
.copy-feedback {
display: inline-block;
margin-left: 0.5em;
padding: 0.35em 0.75em;
font-size: var(--wclp-font-size-small);
border-radius: var(--wclp-border-radius-pill);
animation: wclpFadeIn 0.2s ease;
}
@keyframes wclpFadeIn {
from { opacity: 0; transform: translateY(-5px); }
to { opacity: 1; transform: translateY(0); }
padding: 0.25em 0.5em;
font-size: 0.85em;
border-radius: 3px;
}
.copy-feedback.success {
background: color-mix(in srgb, green 15%, var(--wclp-color-base));
color: color-mix(in srgb, green 70%, var(--wclp-color-contrast));
background: #d4edda;
color: #155724;
}
.copy-feedback.error {
background: color-mix(in srgb, red 15%, var(--wclp-color-base));
color: color-mix(in srgb, red 70%, var(--wclp-color-contrast));
background: #f8d7da;
color: #721c24;
}
/* License Info Row */
.license-info-row {
display: flex;
gap: 2rem;
color: var(--wclp-color-accent-4);
font-size: var(--wclp-font-size-small);
gap: 2em;
color: #666;
font-size: 0.95em;
flex-wrap: wrap;
}
.license-info-row strong {
font-weight: 500;
color: var(--wclp-color-contrast);
}
.license-domain-display {
display: flex;
align-items: center;
gap: 0.75rem;
flex-wrap: wrap;
gap: 0.5em;
}
.domain-value {
font-family: var(--wclp-font-family-mono);
font-size: var(--wclp-font-size-small);
}
/* ========================================
Transfer Button
======================================== */
/* Transfer Button */
.wclp-transfer-btn {
display: inline-flex;
align-items: center;
gap: 0.35em;
padding: 0.4em 0.8em;
background: var(--wclp-color-base);
border: 1px solid var(--wclp-border-color);
border-radius: var(--wclp-border-radius-pill);
font-size: var(--wclp-font-size-small);
font-weight: 500;
color: var(--wclp-color-accent-4);
gap: 0.25em;
padding: 0.2em 0.6em;
background: #f0f0f0;
border: 1px solid #ddd;
border-radius: 3px;
font-size: 0.85em;
color: #555;
cursor: pointer;
transition: all 0.2s ease;
}
.wclp-transfer-btn:hover {
background: var(--wclp-bg-subtle);
border-color: var(--wclp-border-color-hover);
color: var(--wclp-color-contrast);
background: #e5e5e5;
border-color: #ccc;
color: #333;
}
.wclp-transfer-btn .dashicons {
@@ -277,22 +183,17 @@
height: 14px;
}
/* ========================================
Downloads Section
======================================== */
/* Download Section */
.license-downloads {
padding: var(--wclp-spacing-30);
background: var(--wclp-bg-subtle);
border-top: 1px solid var(--wclp-border-color);
padding: 1em 1.5em;
background: #f8f9fa;
border-top: 1px solid #e5e5e5;
}
.license-downloads h4 {
margin: 0 0 var(--wclp-spacing-20) 0;
font-size: var(--wclp-font-size-small);
font-weight: 500;
color: var(--wclp-color-contrast);
text-transform: uppercase;
letter-spacing: 0.5px;
margin: 0 0 0.75em 0;
font-size: 0.95em;
color: #333;
}
.download-list {
@@ -304,29 +205,22 @@
.download-list li {
display: flex;
align-items: center;
gap: 1rem;
padding: 0.75rem 0;
border-bottom: 1px solid var(--wclp-border-color);
gap: 1em;
padding: 0.5em 0;
border-bottom: 1px solid #eee;
}
.download-list li:last-child {
border-bottom: none;
padding-bottom: 0;
}
.download-list li:first-child {
padding-top: 0;
}
.download-link {
display: inline-flex;
align-items: center;
gap: 0.5em;
color: var(--wclp-color-contrast);
color: #2271b1;
text-decoration: none;
font-weight: 500;
font-size: var(--wclp-font-size-medium);
transition: opacity 0.2s ease;
}
.download-link:hover {
@@ -334,129 +228,94 @@
}
.download-link .dashicons {
font-size: 18px;
width: 18px;
height: 18px;
color: var(--wclp-color-accent-4);
font-size: 16px;
width: 16px;
height: 16px;
}
.download-version {
background: var(--wclp-color-base);
padding: 0.25em 0.65em;
border-radius: var(--wclp-border-radius-pill);
font-size: var(--wclp-font-size-small);
font-family: var(--wclp-font-family-mono);
color: var(--wclp-color-accent-4);
border: 1px solid var(--wclp-border-color);
background: #e7f3ff;
padding: 0.2em 0.5em;
border-radius: 3px;
font-size: 0.85em;
color: #2271b1;
}
.download-date {
color: var(--wclp-color-accent-4);
font-size: var(--wclp-font-size-small);
color: #999;
font-size: 0.85em;
margin-left: auto;
}
/* ========================================
Domain Field at Checkout
======================================== */
/* Domain Field */
#licensed-product-domain-field {
margin-top: var(--wclp-spacing-40);
padding: var(--wclp-spacing-30);
background-color: var(--wclp-bg-subtle);
border: 1px solid var(--wclp-border-color);
border-radius: var(--wclp-border-radius);
margin-top: 2em;
padding: 1.5em;
background-color: #f8f9fa;
border: 1px solid #e5e5e5;
border-radius: 4px;
}
#licensed-product-domain-field h3 {
margin-top: 0;
margin-bottom: var(--wclp-spacing-20);
font-size: var(--wclp-font-size-medium);
font-weight: 500;
color: var(--wclp-color-contrast);
margin-bottom: 1em;
font-size: 1.1em;
}
#licensed-product-domain-field .description {
display: block;
margin-top: 0.5em;
font-size: var(--wclp-font-size-small);
color: var(--wclp-color-accent-4);
font-size: 0.9em;
color: #666;
}
#licensed-product-domain-field input[type="text"] {
border-radius: var(--wclp-border-radius);
border: 1px solid var(--wclp-border-color);
padding: 0.75em 1em;
font-size: var(--wclp-font-size-medium);
font-family: var(--wclp-font-family);
background: var(--wclp-color-base);
color: var(--wclp-color-contrast);
}
#licensed-product-domain-field input[type="text"]:focus {
border-color: var(--wclp-color-contrast);
outline: none;
box-shadow: 0 0 0 1px var(--wclp-color-contrast);
}
/* ========================================
Legacy Table (backwards compatibility)
======================================== */
/* Legacy License Table (kept for backwards compatibility) */
.woocommerce-licenses-table {
width: 100%;
border-collapse: collapse;
margin-bottom: 1em;
font-size: var(--wclp-font-size-medium);
font-family: var(--wclp-font-family);
color: var(--wclp-color-contrast);
}
.woocommerce-licenses-table th,
.woocommerce-licenses-table td {
padding: 0.75em;
text-align: left;
border-bottom: 1px solid var(--wclp-border-color);
border-bottom: 1px solid #e5e5e5;
}
.woocommerce-licenses-table th {
font-weight: 500;
background-color: var(--wclp-bg-subtle);
font-size: var(--wclp-font-size-small);
text-transform: uppercase;
letter-spacing: 0.5px;
font-weight: 600;
background-color: #f8f8f8;
}
.woocommerce-licenses-table code {
font-family: var(--wclp-font-family-mono);
background-color: var(--wclp-bg-subtle);
padding: 0.3em 0.6em;
border-radius: var(--wclp-border-radius);
font-size: var(--wclp-font-size-small);
font-family: monospace;
background-color: #f5f5f5;
padding: 0.2em 0.4em;
border-radius: 3px;
font-size: 0.9em;
}
/* ========================================
Responsive Design
======================================== */
/* Responsive */
@media screen and (max-width: 768px) {
.license-header {
flex-direction: column;
align-items: flex-start;
gap: 0.75rem;
gap: 0.5em;
}
.license-key-row {
flex-direction: column;
align-items: flex-start;
gap: 0.5rem;
}
.license-info-row {
flex-direction: column;
gap: 0.75rem;
gap: 0.5em;
}
.download-list li {
flex-wrap: wrap;
gap: 0.5rem;
}
.download-date {
@@ -480,21 +339,14 @@
}
.woocommerce-licenses-table tr {
border: 1px solid var(--wclp-border-color);
border: 1px solid #e5e5e5;
margin-bottom: 1em;
border-radius: var(--wclp-border-radius);
overflow: hidden;
}
.woocommerce-licenses-table td {
border: none;
position: relative;
padding-left: 50%;
border-bottom: 1px solid var(--wclp-border-color);
}
.woocommerce-licenses-table td:last-child {
border-bottom: none;
}
.woocommerce-licenses-table td:before {
@@ -502,9 +354,7 @@
position: absolute;
left: 0.75em;
width: 45%;
font-weight: 500;
font-size: var(--wclp-font-size-small);
color: var(--wclp-color-accent-4);
font-weight: 600;
}
.license-domain-display {
@@ -516,9 +366,7 @@
}
}
/* ========================================
Transfer Modal
======================================== */
/* Transfer Modal */
.wclp-modal {
position: fixed;
top: 0;
@@ -529,7 +377,6 @@
display: flex;
align-items: center;
justify-content: center;
font-family: var(--wclp-font-family);
}
.wclp-modal-overlay {
@@ -538,80 +385,66 @@
left: 0;
width: 100%;
height: 100%;
background: color-mix(in srgb, var(--wclp-color-contrast) 40%, transparent);
backdrop-filter: blur(2px);
background: rgba(0, 0, 0, 0.5);
}
.wclp-modal-content {
position: relative;
background: var(--wclp-color-base);
padding: var(--wclp-spacing-40);
border-radius: var(--wclp-border-radius);
background: #fff;
padding: 2em;
border-radius: 8px;
max-width: 450px;
width: 90%;
max-height: 90vh;
overflow-y: auto;
box-shadow: 0 10px 40px color-mix(in srgb, var(--wclp-color-contrast) 20%, transparent);
color: var(--wclp-color-contrast);
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.wclp-modal-close {
position: absolute;
top: var(--wclp-spacing-20);
right: var(--wclp-spacing-20);
top: 0.5em;
right: 0.5em;
background: none;
border: none;
font-size: 1.5em;
cursor: pointer;
color: var(--wclp-color-accent-4);
color: #666;
line-height: 1;
padding: 0.25em;
border-radius: var(--wclp-border-radius);
transition: all 0.2s ease;
}
.wclp-modal-close:hover {
color: var(--wclp-color-contrast);
background: var(--wclp-bg-subtle);
color: #333;
}
.wclp-modal-content h3 {
margin: 0 0 var(--wclp-spacing-30) 0;
font-size: 1.25rem;
font-weight: 500;
letter-spacing: -0.1px;
color: var(--wclp-color-contrast);
margin: 0 0 1.5em 0;
font-size: 1.25em;
}
/* Form Styles */
.wclp-form-row {
margin-bottom: var(--wclp-spacing-30);
margin-bottom: 1.5em;
}
.wclp-form-row label {
display: block;
font-weight: 500;
font-weight: 600;
margin-bottom: 0.5em;
font-size: var(--wclp-font-size-small);
color: var(--wclp-color-contrast);
color: #333;
}
.wclp-form-row input[type="text"] {
width: 100%;
padding: 0.875em 1em;
border: 1px solid var(--wclp-border-color);
border-radius: var(--wclp-border-radius);
font-size: var(--wclp-font-size-medium);
font-family: var(--wclp-font-family);
background: var(--wclp-color-base);
color: var(--wclp-color-contrast);
transition: border-color 0.2s ease, box-shadow 0.2s ease;
padding: 0.75em;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 1em;
}
.wclp-form-row input[type="text"]:focus {
outline: none;
border-color: var(--wclp-color-contrast);
box-shadow: 0 0 0 1px var(--wclp-color-contrast);
border-color: #2271b1;
box-shadow: 0 0 0 1px #2271b1;
}
.wclp-current-domain {
@@ -619,45 +452,33 @@
}
.wclp-current-domain code {
font-family: var(--wclp-font-family-mono);
background: var(--wclp-bg-subtle);
padding: 0.5em 1em;
border-radius: var(--wclp-border-radius);
font-size: var(--wclp-font-size-medium);
border: 1px solid var(--wclp-border-color);
display: inline-block;
color: var(--wclp-color-contrast);
background: #f5f5f5;
padding: 0.4em 0.8em;
border-radius: 4px;
font-size: 1em;
}
.wclp-field-description {
margin: 0.5em 0 0 0;
font-size: var(--wclp-font-size-small);
color: var(--wclp-color-accent-4);
font-size: 0.85em;
color: #666;
}
/* Form Actions */
.wclp-form-actions {
display: flex;
gap: 1rem;
margin-top: var(--wclp-spacing-40);
gap: 1em;
margin-top: 2em;
}
/* Primary Button - uses theme contrast color */
.wclp-btn-primary {
background: var(--wclp-color-contrast) !important;
border: none !important;
color: var(--wclp-color-base) !important;
padding: 1rem 2.25rem !important;
border-radius: var(--wclp-border-radius) !important;
font-size: var(--wclp-font-size-medium) !important;
font-weight: 500 !important;
font-family: var(--wclp-font-family) !important;
cursor: pointer;
transition: opacity 0.2s ease;
background: #2271b1 !important;
border-color: #2271b1 !important;
color: #fff !important;
}
.wclp-btn-primary:hover {
opacity: 0.85;
background: #135e96 !important;
border-color: #135e96 !important;
}
.wclp-btn-primary:disabled {
@@ -665,39 +486,21 @@
cursor: not-allowed;
}
/* Secondary/Cancel Button - outline style */
.wclp-modal-cancel {
background: transparent !important;
border: 1px solid var(--wclp-border-color-hover) !important;
color: var(--wclp-color-contrast) !important;
padding: calc(1rem - 1px) calc(2.25rem - 1px) !important;
border-radius: var(--wclp-border-radius) !important;
font-size: var(--wclp-font-size-medium) !important;
font-weight: 500 !important;
font-family: var(--wclp-font-family) !important;
cursor: pointer;
transition: background 0.2s ease;
}
.wclp-modal-cancel:hover {
background: var(--wclp-bg-subtle) !important;
}
/* Message Styles */
.wclp-message {
margin-top: var(--wclp-spacing-20);
padding: 1em 1.25em;
border-radius: var(--wclp-border-radius);
font-size: var(--wclp-font-size-small);
animation: wclpFadeIn 0.3s ease;
margin-top: 1em;
padding: 0.75em 1em;
border-radius: 4px;
font-size: 0.95em;
}
.wclp-message.success {
background: color-mix(in srgb, green 15%, var(--wclp-color-base));
color: color-mix(in srgb, green 70%, var(--wclp-color-contrast));
background: #d4edda;
color: #155724;
border: 1px solid #c3e6cb;
}
.wclp-message.error {
background: color-mix(in srgb, red 15%, var(--wclp-color-base));
color: color-mix(in srgb, red 70%, var(--wclp-color-contrast));
background: #f8d7da;
color: #721c24;
border: 1px solid #f5c6cb;
}