Files
WooCow/assets/css/woocow.css
Malin 2ee81efacf feat: initial WooCow plugin — Mailcow/WooCommerce integration
- Mailcow API client wrapping domains, mailboxes, aliases endpoints
- Admin backend: server management, customer-domain assignments, mailbox overview
- WooCommerce My Account: email hosting tab with mailbox/alias management
- Per-mailbox password change (independent of WP account password)
- Optional WP account password sync to all customer mailboxes
- Installer creates wp_woocow_servers and wp_woocow_assignments DB tables
- Full nonce + capability + ownership verification on all AJAX endpoints

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 08:06:22 +01:00

347 lines
9.5 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* =========================================================
WooCow Shared styles (admin + account)
========================================================= */
/* ── Admin wrap ──────────────────────────────────────────── */
.woocow-wrap h1 { margin-bottom: 8px; }
.woocow-version { font-size: 13px; font-weight: 400; color: #777; vertical-align: middle; }
.woocow-toolbar {
display: flex;
gap: 10px;
align-items: center;
margin: 16px 0;
}
.woocow-flex { flex-wrap: wrap; }
/* ── Cards ───────────────────────────────────────────────── */
.woocow-card {
background: #fff;
border: 1px solid #ddd;
border-radius: 6px;
padding: 20px 24px;
margin-bottom: 20px;
}
.woocow-form table.form-table th { width: 160px; }
.woocow-form-actions {
display: flex;
align-items: center;
gap: 10px;
margin-top: 16px;
padding-top: 16px;
border-top: 1px solid #f0f0f0;
}
/* ── Dashboard cards ─────────────────────────────────────── */
.woocow-dashboard-cards {
display: flex;
gap: 20px;
flex-wrap: wrap;
margin-top: 20px;
}
.woocow-dashboard-cards .woocow-card {
flex: 1;
min-width: 180px;
text-align: center;
padding: 30px 20px;
}
.woocow-card-number {
display: block;
font-size: 48px;
font-weight: 700;
color: #2c3e50;
line-height: 1;
margin-bottom: 8px;
}
.woocow-card-label {
display: block;
font-size: 14px;
color: #666;
margin-bottom: 16px;
}
/* ── Tables ──────────────────────────────────────────────── */
.woocow-table { margin-top: 12px; }
.woocow-table td.woocow-actions { white-space: nowrap; }
.woocow-table td.woocow-actions button { margin-right: 4px; }
/* ── Badges ──────────────────────────────────────────────── */
.woocow-badge {
display: inline-block;
padding: 2px 8px;
border-radius: 10px;
font-size: 12px;
font-weight: 600;
}
.woocow-badge-green { background: #d4edda; color: #155724; }
.woocow-badge-grey { background: #e9ecef; color: #495057; }
/* ── Quota bar (admin) ───────────────────────────────────── */
.woocow-quota-bar {
width: 80px;
height: 6px;
background: #eee;
border-radius: 3px;
overflow: hidden;
display: inline-block;
vertical-align: middle;
margin-left: 6px;
}
.woocow-quota-bar div {
height: 100%;
background: #27ae60;
border-radius: 3px;
}
/* ── Customer autocomplete ───────────────────────────────── */
.woocow-autocomplete {
position: absolute;
background: #fff;
border: 1px solid #ccc;
border-radius: 4px;
max-height: 220px;
overflow-y: auto;
z-index: 9999;
min-width: 320px;
box-shadow: 0 4px 12px rgba(0,0,0,.1);
}
.woocow-ac-item {
padding: 8px 12px;
cursor: pointer;
font-size: 13px;
}
.woocow-ac-item:hover { background: #f0f7ff; }
.woocow-selected-badge {
display: inline-block;
margin-left: 10px;
padding: 3px 10px;
background: #e8f4fd;
border-radius: 12px;
font-size: 12px;
color: #0073aa;
font-weight: 600;
}
/* ── Modal (admin) ───────────────────────────────────────── */
.woocow-modal {
position: fixed;
inset: 0;
background: rgba(0,0,0,.5);
z-index: 100000;
display: flex;
align-items: center;
justify-content: center;
}
.woocow-modal-box {
background: #fff;
border-radius: 8px;
padding: 28px 32px;
min-width: 420px;
max-width: 560px;
width: 90%;
box-shadow: 0 8px 30px rgba(0,0,0,.2);
}
.woocow-modal-box h3 { margin-top: 0; }
.woocow-modal-actions {
display: flex;
gap: 10px;
align-items: center;
margin-top: 20px;
}
/* ── Flex inline ─────────────────────────────────────────── */
.woocow-flex-inline { display: flex; align-items: center; gap: 6px; }
.woocow-at, .woocow-arrow { font-weight: 700; color: #555; }
.woocow-domain-label { font-weight: 600; color: #333; }
/* ── Inline test result ──────────────────────────────────── */
.wc-inline-test { font-size: 12px; }
/* =============================================================
My Account Email Hosting
============================================================= */
.woocow-account { max-width: 900px; }
/* Domain panel */
.woocow-domain-panel {
border: 1px solid #e0e0e0;
border-radius: 8px;
margin-bottom: 24px;
overflow: hidden;
background: #fff;
}
.woocow-domain-header {
display: flex;
align-items: center;
gap: 12px;
padding: 14px 20px;
background: #f7f8fa;
border-bottom: 1px solid #e0e0e0;
flex-wrap: wrap;
}
.woocow-domain-name {
font-size: 17px;
font-weight: 700;
color: #1a1a2e;
flex: 1;
min-width: 140px;
}
.woocow-domain-server {
font-size: 12px;
color: #888;
margin-right: auto;
}
.woocow-mailboxes-wrap { padding: 16px 20px; }
/* Mailbox row */
.woocow-mailbox-row {
border: 1px solid #ececec;
border-radius: 6px;
padding: 14px 16px;
margin-bottom: 12px;
background: #fafafa;
transition: box-shadow .2s;
}
.woocow-mailbox-row:hover { box-shadow: 0 2px 8px rgba(0,0,0,.07); }
.woocow-mbox-main {
display: flex;
align-items: center;
gap: 16px;
flex-wrap: wrap;
margin-bottom: 10px;
}
.woocow-mbox-address { display: flex; align-items: center; gap: 8px; }
.woocow-mbox-icon { font-size: 18px; }
.woocow-mbox-name { font-size: 13px; color: #777; }
.woocow-quota-wrap { display: flex; align-items: center; gap: 8px; }
.woocow-quota-bar-outer {
width: 120px;
height: 8px;
background: #e8e8e8;
border-radius: 4px;
overflow: hidden;
}
.woocow-quota-bar-inner { height: 100%; border-radius: 4px; transition: width .4s; }
.woocow-quota-text { font-size: 12px; color: #666; white-space: nowrap; }
.woocow-mbox-actions {
display: flex;
gap: 8px;
flex-wrap: wrap;
}
/* Alias section */
.woocow-aliases-wrap {
margin-top: 12px;
padding-top: 12px;
border-top: 1px dashed #e0e0e0;
}
.woocow-alias-list {
list-style: none;
margin: 0 0 10px;
padding: 0;
}
.woocow-alias-list li {
display: flex;
align-items: center;
gap: 8px;
padding: 6px 0;
border-bottom: 1px solid #f0f0f0;
font-size: 13px;
}
.woocow-alias-list li:last-child { border-bottom: none; }
.woocow-alias-addr { font-weight: 600; }
.woocow-alias-goto { color: #666; }
.woocow-alias-fields {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
margin-bottom: 8px;
padding: 12px;
background: #f0f7ff;
border-radius: 6px;
}
/* Create mailbox form */
.woocow-create-mbox-form {
margin-top: 16px;
padding: 20px;
background: #f7f9fc;
border: 1px dashed #bbd;
border-radius: 8px;
}
.woocow-create-mbox-form h4 { margin: 0 0 14px; }
.woocow-field-row { margin-bottom: 10px; }
/* Buttons */
.woocow-btn {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 7px 14px;
border-radius: 5px;
border: none;
font-size: 13px;
font-weight: 600;
cursor: pointer;
text-decoration: none;
transition: opacity .15s, background .15s;
white-space: nowrap;
line-height: 1;
}
.woocow-btn:hover { opacity: .88; }
.woocow-btn-primary { background: #2271b1; color: #fff; }
.woocow-btn-outline { background: transparent; border: 1.5px solid #2271b1; color: #2271b1; }
.woocow-btn-ghost { background: transparent; border: 1.5px solid #bbb; color: #555; }
.woocow-btn-danger { background: #c0392b; color: #fff; }
.woocow-btn-sm { padding: 5px 10px; font-size: 12px; }
.woocow-btn-xs { padding: 3px 7px; font-size: 11px; }
/* Inputs */
.woocow-input { padding: 7px 10px; border: 1px solid #ccc; border-radius: 4px; font-size: 14px; width: 100%; max-width: 280px; box-sizing: border-box; }
.woocow-input-sm { width: 80px; padding: 5px 8px; border: 1px solid #ccc; border-radius: 4px; font-size: 13px; }
/* Modal (account) */
#woocow-pw-modal {
position: fixed;
inset: 0;
background: rgba(0,0,0,.55);
z-index: 99999;
display: flex;
align-items: center;
justify-content: center;
}
#woocow-pw-modal .woocow-modal-box {
background: #fff;
border-radius: 10px;
padding: 32px;
min-width: 340px;
max-width: 460px;
width: 92%;
box-shadow: 0 8px 40px rgba(0,0,0,.22);
}
#woocow-pw-modal h3 { margin: 0 0 4px; }
.woocow-modal-subtitle { color: #555; font-size: 14px; margin: 0 0 20px; }
/* Misc */
.woocow-loading { color: #888; font-style: italic; }
.woocow-muted { color: #aaa; font-size: 13px; }
.woocow-error { color: #c0392b; }
@media (max-width: 600px) {
.woocow-domain-header,
.woocow-mbox-main,
.woocow-mbox-actions { flex-direction: column; align-items: flex-start; }
.woocow-quota-bar-outer { width: 80px; }
.woocow-alias-fields { flex-direction: column; }
.woocow-input { max-width: 100%; }
}