Files
wc-licensed-product/assets/css/frontend.css
magdev 78e43b9aea Implement version 0.0.3 features
- Add file attachment support for product versions (Media Library)
- Add version auto-detection from uploaded filenames
- Implement secure customer downloads with hash verification
- Add license key copy-to-clipboard functionality
- Redesign customer licenses page with card-based UI
- Fix product versions meta box visibility for non-licensed types
- Add DownloadController for secure file delivery
- Update CLAUDE.md roadmap and session history

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 19:46:50 +01:00

327 lines
5.7 KiB
CSS

/**
* WC Licensed Product - Frontend Styles
*
* @package Jeremias\WcLicensedProduct
*/
/* License Status Badges */
.license-status {
display: inline-block;
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: 0.25rem;
}
.license-status-active {
background-color: #d4edda;
color: #155724;
}
.license-status-inactive {
background-color: #fff3cd;
color: #856404;
}
.license-status-expired {
background-color: #f8d7da;
color: #721c24;
}
.license-status-revoked {
background-color: #d6d8db;
color: #383d41;
}
/* License Cards */
.woocommerce-licenses {
display: flex;
flex-direction: column;
gap: 1.5em;
}
.license-card {
border: 1px solid #e5e5e5;
border-radius: 8px;
overflow: hidden;
background: #fff;
}
.license-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1em 1.5em;
background: #f8f9fa;
border-bottom: 1px solid #e5e5e5;
}
.license-header h3 {
margin: 0;
font-size: 1.1em;
}
.license-header h3 a {
color: inherit;
text-decoration: none;
}
.license-header h3 a:hover {
text-decoration: underline;
}
.license-details {
padding: 1.5em;
}
.license-key-row {
display: flex;
align-items: center;
gap: 0.75em;
margin-bottom: 1em;
flex-wrap: wrap;
}
.license-key-row label {
font-weight: 600;
}
.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;
}
.copy-license-btn {
display: inline-flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
padding: 0;
background: #f0f0f0;
border: 1px solid #ddd;
border-radius: 4px;
cursor: pointer;
transition: all 0.2s ease;
}
.copy-license-btn:hover {
background: #e5e5e5;
border-color: #ccc;
}
.copy-license-btn .dashicons {
font-size: 18px;
width: 18px;
height: 18px;
}
.copy-feedback {
display: inline-block;
margin-left: 0.5em;
padding: 0.25em 0.5em;
font-size: 0.85em;
border-radius: 3px;
}
.copy-feedback.success {
background: #d4edda;
color: #155724;
}
.copy-feedback.error {
background: #f8d7da;
color: #721c24;
}
.license-info-row {
display: flex;
gap: 2em;
color: #666;
font-size: 0.95em;
flex-wrap: wrap;
}
/* Download Section */
.license-downloads {
padding: 1em 1.5em;
background: #f8f9fa;
border-top: 1px solid #e5e5e5;
}
.license-downloads h4 {
margin: 0 0 0.75em 0;
font-size: 0.95em;
color: #333;
}
.download-list {
list-style: none;
margin: 0;
padding: 0;
}
.download-list li {
display: flex;
align-items: center;
gap: 1em;
padding: 0.5em 0;
border-bottom: 1px solid #eee;
}
.download-list li:last-child {
border-bottom: none;
}
.download-link {
display: inline-flex;
align-items: center;
gap: 0.5em;
color: #2271b1;
text-decoration: none;
font-weight: 500;
}
.download-link:hover {
text-decoration: underline;
}
.download-link .dashicons {
font-size: 16px;
width: 16px;
height: 16px;
}
.download-version {
background: #e7f3ff;
padding: 0.2em 0.5em;
border-radius: 3px;
font-size: 0.85em;
color: #2271b1;
}
.download-date {
color: #999;
font-size: 0.85em;
margin-left: auto;
}
/* Domain Field */
#licensed-product-domain-field {
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: 1em;
font-size: 1.1em;
}
#licensed-product-domain-field .description {
display: block;
margin-top: 0.5em;
font-size: 0.9em;
color: #666;
}
/* Legacy License Table (kept for backwards compatibility) */
.woocommerce-licenses-table {
width: 100%;
border-collapse: collapse;
margin-bottom: 1em;
}
.woocommerce-licenses-table th,
.woocommerce-licenses-table td {
padding: 0.75em;
text-align: left;
border-bottom: 1px solid #e5e5e5;
}
.woocommerce-licenses-table th {
font-weight: 600;
background-color: #f8f8f8;
}
.woocommerce-licenses-table code {
font-family: monospace;
background-color: #f5f5f5;
padding: 0.2em 0.4em;
border-radius: 3px;
font-size: 0.9em;
}
/* Responsive */
@media screen and (max-width: 768px) {
.license-header {
flex-direction: column;
align-items: flex-start;
gap: 0.5em;
}
.license-key-row {
flex-direction: column;
align-items: flex-start;
}
.license-info-row {
flex-direction: column;
gap: 0.5em;
}
.download-list li {
flex-wrap: wrap;
}
.download-date {
margin-left: 0;
width: 100%;
}
.woocommerce-licenses-table,
.woocommerce-licenses-table thead,
.woocommerce-licenses-table tbody,
.woocommerce-licenses-table th,
.woocommerce-licenses-table td,
.woocommerce-licenses-table tr {
display: block;
}
.woocommerce-licenses-table thead tr {
position: absolute;
top: -9999px;
left: -9999px;
}
.woocommerce-licenses-table tr {
border: 1px solid #e5e5e5;
margin-bottom: 1em;
}
.woocommerce-licenses-table td {
border: none;
position: relative;
padding-left: 50%;
}
.woocommerce-licenses-table td:before {
content: attr(data-title);
position: absolute;
left: 0.75em;
width: 45%;
font-weight: 600;
}
}