diff --git a/assets/css/frontend.css b/assets/css/frontend.css index 860cf71..6a03c97 100644 --- a/assets/css/frontend.css +++ b/assets/css/frontend.css @@ -1,68 +1,112 @@ /** * WC Licensed Product - Frontend Styles + * Designed to match Twenty Twenty-Five theme * * @package Jeremias\WcLicensedProduct */ -/* License Status Badges */ +/* ======================================== + CSS Custom Properties (matching theme.json) + ======================================== */ +.woocommerce-licenses, +.wclp-modal { + --wclp-color-base: #FFFFFF; + --wclp-color-contrast: #111111; + --wclp-color-accent-4: #686868; + --wclp-color-accent-5: #FBFAF3; + --wclp-color-accent-6: color-mix(in srgb, currentColor 20%, transparent); + --wclp-font-family: inherit; + --wclp-font-family-mono: "Fira Code", monospace; + --wclp-font-size-small: 0.875rem; + --wclp-font-size-medium: 1rem; + --wclp-spacing-20: 10px; + --wclp-spacing-30: 20px; + --wclp-spacing-40: 30px; + --wclp-border-radius: 0.25rem; + --wclp-border-radius-pill: 3.125rem; +} + +/* ======================================== + License Status Badges + ======================================== */ .license-status { display: inline-block; - padding: 0.25em 0.6em; - font-size: 0.85em; - font-weight: 600; + padding: 0.35em 0.85em; + font-size: var(--wclp-font-size-small); + font-weight: 500; line-height: 1; text-align: center; white-space: nowrap; vertical-align: baseline; - border-radius: 0.25rem; + border-radius: var(--wclp-border-radius-pill); + letter-spacing: 0.02em; } .license-status-active { - background-color: #d4edda; - color: #155724; + background-color: #e8f5e9; + color: #2e7d32; } .license-status-inactive { - background-color: #fff3cd; - color: #856404; + background-color: #fff8e1; + color: #f57f17; } .license-status-expired { - background-color: #f8d7da; - color: #721c24; + background-color: #ffebee; + color: #c62828; } .license-status-revoked { - background-color: #d6d8db; - color: #383d41; + background-color: var(--wclp-color-accent-5); + color: var(--wclp-color-accent-4); } -/* License Cards */ +/* ======================================== + License Cards Container + ======================================== */ .woocommerce-licenses { display: flex; flex-direction: column; - gap: 1.5em; + gap: var(--wclp-spacing-40); } +.woocommerce-licenses > p:first-child:last-child { + color: var(--wclp-color-accent-4); + font-style: italic; +} + +/* ======================================== + License Card + ======================================== */ .license-card { - border: 1px solid #e5e5e5; - border-radius: 8px; + border: 1px solid var(--wclp-color-accent-6); + border-radius: var(--wclp-border-radius); overflow: hidden; - background: #fff; + background: var(--wclp-color-base); + transition: border-color 0.2s ease; } +.license-card:hover { + border-color: color-mix(in srgb, currentColor 40%, transparent); +} + +/* License Header */ .license-header { display: flex; justify-content: space-between; align-items: center; - padding: 1em 1.5em; - background: #f8f9fa; - border-bottom: 1px solid #e5e5e5; + padding: var(--wclp-spacing-30); + background: var(--wclp-color-accent-5); + border-bottom: 1px solid var(--wclp-color-accent-6); + gap: 1rem; } .license-header h3 { margin: 0; - font-size: 1.1em; + font-size: var(--wclp-font-size-medium); + font-weight: 500; + letter-spacing: -0.1px; } .license-header h3 a { @@ -74,48 +118,59 @@ text-decoration: underline; } +/* License Details */ .license-details { - padding: 1.5em; + padding: var(--wclp-spacing-30); } +/* License Key Row */ .license-key-row { display: flex; align-items: center; - gap: 0.75em; - margin-bottom: 1em; + gap: 0.75rem; + margin-bottom: var(--wclp-spacing-30); flex-wrap: wrap; } .license-key-row label { - font-weight: 600; + font-weight: 500; + font-size: var(--wclp-font-size-small); + color: var(--wclp-color-accent-4); } -.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; +.license-key-row code, +.license-key { + font-family: var(--wclp-font-family-mono); + background-color: var(--wclp-color-accent-5); + padding: 0.5em 1em; + border-radius: var(--wclp-border-radius); + font-size: var(--wclp-font-size-small); + font-weight: 400; letter-spacing: 0.05em; + color: var(--wclp-color-contrast); + border: 1px solid var(--wclp-color-accent-6); } +/* Copy Button */ .copy-license-btn { display: inline-flex; align-items: center; justify-content: center; - width: 32px; - height: 32px; + width: 36px; + height: 36px; padding: 0; - background: #f0f0f0; - border: 1px solid #ddd; - border-radius: 4px; + background: var(--wclp-color-base); + border: 1px solid var(--wclp-color-accent-6); + border-radius: var(--wclp-border-radius); cursor: pointer; transition: all 0.2s ease; + color: var(--wclp-color-accent-4); } .copy-license-btn:hover { - background: #e5e5e5; - border-color: #ccc; + background: var(--wclp-color-accent-5); + border-color: color-mix(in srgb, currentColor 40%, transparent); + color: var(--wclp-color-contrast); } .copy-license-btn .dashicons { @@ -127,54 +182,75 @@ .copy-feedback { display: inline-block; margin-left: 0.5em; - padding: 0.25em 0.5em; - font-size: 0.85em; - border-radius: 3px; + padding: 0.35em 0.75em; + font-size: var(--wclp-font-size-small); + border-radius: var(--wclp-border-radius-pill); + animation: fadeIn 0.2s ease; +} + +@keyframes fadeIn { + from { opacity: 0; transform: translateY(-5px); } + to { opacity: 1; transform: translateY(0); } } .copy-feedback.success { - background: #d4edda; - color: #155724; + background: #e8f5e9; + color: #2e7d32; } .copy-feedback.error { - background: #f8d7da; - color: #721c24; + background: #ffebee; + color: #c62828; } +/* License Info Row */ .license-info-row { display: flex; - gap: 2em; - color: #666; - font-size: 0.95em; + gap: 2rem; + color: var(--wclp-color-accent-4); + font-size: var(--wclp-font-size-small); 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.5em; + gap: 0.75rem; + flex-wrap: wrap; } -/* Transfer Button */ +.domain-value { + font-family: var(--wclp-font-family-mono); + font-size: var(--wclp-font-size-small); +} + +/* ======================================== + Transfer Button + ======================================== */ .wclp-transfer-btn { display: inline-flex; align-items: center; - gap: 0.25em; - padding: 0.2em 0.6em; - background: #f0f0f0; - border: 1px solid #ddd; - border-radius: 3px; - font-size: 0.85em; - color: #555; + gap: 0.35em; + padding: 0.4em 0.8em; + background: var(--wclp-color-base); + border: 1px solid var(--wclp-color-accent-6); + border-radius: var(--wclp-border-radius-pill); + font-size: var(--wclp-font-size-small); + font-weight: 500; + color: var(--wclp-color-accent-4); cursor: pointer; transition: all 0.2s ease; } .wclp-transfer-btn:hover { - background: #e5e5e5; - border-color: #ccc; - color: #333; + background: var(--wclp-color-accent-5); + border-color: color-mix(in srgb, currentColor 40%, transparent); + color: var(--wclp-color-contrast); } .wclp-transfer-btn .dashicons { @@ -183,17 +259,22 @@ height: 14px; } -/* Download Section */ +/* ======================================== + Downloads Section + ======================================== */ .license-downloads { - padding: 1em 1.5em; - background: #f8f9fa; - border-top: 1px solid #e5e5e5; + padding: var(--wclp-spacing-30); + background: var(--wclp-color-accent-5); + border-top: 1px solid var(--wclp-color-accent-6); } .license-downloads h4 { - margin: 0 0 0.75em 0; - font-size: 0.95em; - color: #333; + 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; } .download-list { @@ -205,22 +286,29 @@ .download-list li { display: flex; align-items: center; - gap: 1em; - padding: 0.5em 0; - border-bottom: 1px solid #eee; + gap: 1rem; + padding: 0.75rem 0; + border-bottom: 1px solid var(--wclp-color-accent-6); } .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: #2271b1; + color: var(--wclp-color-contrast); text-decoration: none; font-weight: 500; + font-size: var(--wclp-font-size-medium); + transition: color 0.2s ease; } .download-link:hover { @@ -228,94 +316,123 @@ } .download-link .dashicons { - font-size: 16px; - width: 16px; - height: 16px; + font-size: 18px; + width: 18px; + height: 18px; + color: var(--wclp-color-accent-4); } .download-version { - background: #e7f3ff; - padding: 0.2em 0.5em; - border-radius: 3px; - font-size: 0.85em; - color: #2271b1; + 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-color-accent-6); } .download-date { - color: #999; - font-size: 0.85em; + color: var(--wclp-color-accent-4); + font-size: var(--wclp-font-size-small); margin-left: auto; } -/* Domain Field */ +/* ======================================== + Domain Field at Checkout + ======================================== */ #licensed-product-domain-field { - margin-top: 2em; - padding: 1.5em; - background-color: #f8f9fa; - border: 1px solid #e5e5e5; - border-radius: 4px; + margin-top: var(--wclp-spacing-40); + padding: var(--wclp-spacing-30); + background-color: var(--wclp-color-accent-5); + border: 1px solid var(--wclp-color-accent-6); + border-radius: var(--wclp-border-radius); } #licensed-product-domain-field h3 { margin-top: 0; - margin-bottom: 1em; - font-size: 1.1em; + margin-bottom: var(--wclp-spacing-20); + font-size: var(--wclp-font-size-medium); + font-weight: 500; } #licensed-product-domain-field .description { display: block; margin-top: 0.5em; - font-size: 0.9em; - color: #666; + font-size: var(--wclp-font-size-small); + color: var(--wclp-color-accent-4); } -/* Legacy License Table (kept for backwards compatibility) */ +#licensed-product-domain-field input[type="text"] { + border-radius: var(--wclp-border-radius); + border-color: var(--wclp-color-accent-6); + padding: 0.75em 1em; + font-size: var(--wclp-font-size-medium); +} + +#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) + ======================================== */ .woocommerce-licenses-table { width: 100%; border-collapse: collapse; margin-bottom: 1em; + font-size: var(--wclp-font-size-medium); } .woocommerce-licenses-table th, .woocommerce-licenses-table td { padding: 0.75em; text-align: left; - border-bottom: 1px solid #e5e5e5; + border-bottom: 1px solid var(--wclp-color-accent-6); } .woocommerce-licenses-table th { - font-weight: 600; - background-color: #f8f8f8; + font-weight: 500; + background-color: var(--wclp-color-accent-5); + font-size: var(--wclp-font-size-small); + text-transform: uppercase; + letter-spacing: 0.5px; } .woocommerce-licenses-table code { - font-family: monospace; - background-color: #f5f5f5; - padding: 0.2em 0.4em; - border-radius: 3px; - font-size: 0.9em; + font-family: var(--wclp-font-family-mono); + background-color: var(--wclp-color-accent-5); + padding: 0.3em 0.6em; + border-radius: var(--wclp-border-radius); + font-size: var(--wclp-font-size-small); } -/* Responsive */ +/* ======================================== + Responsive Design + ======================================== */ @media screen and (max-width: 768px) { .license-header { flex-direction: column; align-items: flex-start; - gap: 0.5em; + gap: 0.75rem; } .license-key-row { flex-direction: column; align-items: flex-start; + gap: 0.5rem; } .license-info-row { flex-direction: column; - gap: 0.5em; + gap: 0.75rem; } .download-list li { flex-wrap: wrap; + gap: 0.5rem; } .download-date { @@ -339,14 +456,21 @@ } .woocommerce-licenses-table tr { - border: 1px solid #e5e5e5; + border: 1px solid var(--wclp-color-accent-6); 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-color-accent-6); + } + + .woocommerce-licenses-table td:last-child { + border-bottom: none; } .woocommerce-licenses-table td:before { @@ -354,7 +478,9 @@ position: absolute; left: 0.75em; width: 45%; - font-weight: 600; + font-weight: 500; + font-size: var(--wclp-font-size-small); + color: var(--wclp-color-accent-4); } .license-domain-display { @@ -366,7 +492,9 @@ } } -/* Transfer Modal */ +/* ======================================== + Transfer Modal + ======================================== */ .wclp-modal { position: fixed; top: 0; @@ -385,66 +513,76 @@ left: 0; width: 100%; height: 100%; - background: rgba(0, 0, 0, 0.5); + background: rgba(0, 0, 0, 0.4); + backdrop-filter: blur(2px); } .wclp-modal-content { position: relative; - background: #fff; - padding: 2em; - border-radius: 8px; + background: var(--wclp-color-base); + padding: var(--wclp-spacing-40); + border-radius: var(--wclp-border-radius); max-width: 450px; width: 90%; max-height: 90vh; overflow-y: auto; - box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); + box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15); } .wclp-modal-close { position: absolute; - top: 0.5em; - right: 0.5em; + top: var(--wclp-spacing-20); + right: var(--wclp-spacing-20); background: none; border: none; font-size: 1.5em; cursor: pointer; - color: #666; + color: var(--wclp-color-accent-4); line-height: 1; padding: 0.25em; + border-radius: var(--wclp-border-radius); + transition: all 0.2s ease; } .wclp-modal-close:hover { - color: #333; + color: var(--wclp-color-contrast); + background: var(--wclp-color-accent-5); } .wclp-modal-content h3 { - margin: 0 0 1.5em 0; - font-size: 1.25em; + margin: 0 0 var(--wclp-spacing-30) 0; + font-size: 1.25rem; + font-weight: 500; + letter-spacing: -0.1px; } +/* Form Styles */ .wclp-form-row { - margin-bottom: 1.5em; + margin-bottom: var(--wclp-spacing-30); } .wclp-form-row label { display: block; - font-weight: 600; + font-weight: 500; margin-bottom: 0.5em; - color: #333; + font-size: var(--wclp-font-size-small); + color: var(--wclp-color-contrast); } .wclp-form-row input[type="text"] { width: 100%; - padding: 0.75em; - border: 1px solid #ddd; - border-radius: 4px; - font-size: 1em; + padding: 0.875em 1em; + border: 1px solid var(--wclp-color-accent-6); + border-radius: var(--wclp-border-radius); + font-size: var(--wclp-font-size-medium); + font-family: inherit; + transition: border-color 0.2s ease, box-shadow 0.2s ease; } .wclp-form-row input[type="text"]:focus { outline: none; - border-color: #2271b1; - box-shadow: 0 0 0 1px #2271b1; + border-color: var(--wclp-color-contrast); + box-shadow: 0 0 0 1px var(--wclp-color-contrast); } .wclp-current-domain { @@ -452,33 +590,43 @@ } .wclp-current-domain code { - background: #f5f5f5; - padding: 0.4em 0.8em; - border-radius: 4px; - font-size: 1em; + font-family: var(--wclp-font-family-mono); + background: var(--wclp-color-accent-5); + padding: 0.5em 1em; + border-radius: var(--wclp-border-radius); + font-size: var(--wclp-font-size-medium); + border: 1px solid var(--wclp-color-accent-6); + display: inline-block; } .wclp-field-description { margin: 0.5em 0 0 0; - font-size: 0.85em; - color: #666; + font-size: var(--wclp-font-size-small); + color: var(--wclp-color-accent-4); } +/* Form Actions */ .wclp-form-actions { display: flex; - gap: 1em; - margin-top: 2em; + gap: 1rem; + margin-top: var(--wclp-spacing-40); } +/* Primary Button - matches theme button style */ .wclp-btn-primary { - background: #2271b1 !important; - border-color: #2271b1 !important; - color: #fff !important; + 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; + cursor: pointer; + transition: background 0.2s ease; } .wclp-btn-primary:hover { - background: #135e96 !important; - border-color: #135e96 !important; + background: color-mix(in srgb, var(--wclp-color-contrast) 85%, transparent) !important; } .wclp-btn-primary:disabled { @@ -486,21 +634,38 @@ cursor: not-allowed; } +/* Secondary/Cancel Button - outline style */ +.wclp-modal-cancel { + background: transparent !important; + border: 1px solid currentColor !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; + cursor: pointer; + transition: background 0.2s ease; +} + +.wclp-modal-cancel:hover { + background: var(--wclp-color-accent-5) !important; +} + +/* Message Styles */ .wclp-message { - margin-top: 1em; - padding: 0.75em 1em; - border-radius: 4px; - font-size: 0.95em; + margin-top: var(--wclp-spacing-20); + padding: 1em 1.25em; + border-radius: var(--wclp-border-radius); + font-size: var(--wclp-font-size-small); + animation: fadeIn 0.3s ease; } .wclp-message.success { - background: #d4edda; - color: #155724; - border: 1px solid #c3e6cb; + background: #e8f5e9; + color: #2e7d32; } .wclp-message.error { - background: #f8d7da; - color: #721c24; - border: 1px solid #f5c6cb; + background: #ffebee; + color: #c62828; }