/* Seal Subs WP — frontend (Kadence-friendly) */

.sswp-widget {
    margin: 1.25rem 0;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    padding: 1rem 1.1rem;
    background: #fff;
    font-family: inherit;
}
.sswp-widget * { box-sizing: border-box; }
.sswp-widget-title {
    margin: 0 0 .85rem;
    font-size: 1rem;
    font-weight: 600;
    color: #222;
    letter-spacing: .01em;
}
.sswp-option {
    display: flex;
    align-items: flex-start;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    padding: .85rem 1rem;
    margin-bottom: .6rem;
    cursor: pointer;
    transition: all .15s ease;
    background: #fff;
    flex-wrap: wrap;
}
.sswp-option:hover { border-color: #cfd8dc; }
.sswp-option input[type="radio"] {
    margin-right: .75rem;
    margin-top: .25rem;
    accent-color: var(--sswp-color, #1e8cbe);
}
.sswp-option.sswp-selected {
    border-color: var(--sswp-color, #1e8cbe);
    background: rgba(30,140,190,.04);
    box-shadow: 0 0 0 1px var(--sswp-color, #1e8cbe) inset;
}
.sswp-option-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}
.sswp-option-title {
    font-weight: 600;
    color: #222;
}
.sswp-option-price {
    color: #555;
    margin-top: 2px;
    font-size: .92rem;
}
.sswp-option-discount-badge {
    margin-left: auto;
    background: var(--sswp-color, #1e8cbe);
    color: #fff;
    font-size: .75rem;
    padding: 2px 8px;
    border-radius: 4px;
    align-self: flex-start;
}
.sswp-option-discount-badge:empty { display: none; }
.sswp-plan-selector {
    width: 100%;
    margin-top: .65rem;
    padding-top: .65rem;
    border-top: 1px dashed #eee;
    display: none;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}
.sswp-option.sswp-selected .sswp-plan-selector { display: flex; }
.sswp-plan-label { font-size: .9rem; color: #555; }
.sswp-plan-select {
    padding: .35rem .55rem;
    border: 1px solid #d6d6d6;
    border-radius: 5px;
    background: #fff;
    font-size: .92rem;
}
.sswp-benefits { width: 100%; display: none; margin-top: .5rem; }
.sswp-option.sswp-selected .sswp-benefits { display: block; }
.sswp-benefits ul {
    margin: 0; padding: 0; list-style: none;
    font-size: .85rem; color: #666;
}
.sswp-benefits li {
    position: relative; padding-left: 1.1rem; margin: 2px 0;
}
.sswp-benefits li:before {
    content: "✓"; color: var(--sswp-color, #1e8cbe); position: absolute; left: 0; top: 0;
}

/* Customer portal */
.sswp-portal {
    max-width: 980px;
    margin: 0 auto;
}
.sswp-portal-title { font-size: 1.5rem; margin-bottom: 1rem; }
.sswp-empty { padding: 2rem; text-align: center; background: #fafafa; border-radius: 8px; color: #777; }
.sswp-table { width: 100%; border-collapse: collapse; }
.sswp-table th, .sswp-table td {
    padding: 10px 12px; border-bottom: 1px solid #ececec; text-align: left;
}
.sswp-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    background: #e8f0fe;
    color: #1a73e8;
}
.sswp-badge-active     { background: #e7f5ee; color: #1e7d4a; }
.sswp-badge-paused     { background: #fff5d9; color: #946800; }
.sswp-badge-cancelled  { background: #fde7e7; color: #b22020; }
.sswp-badge-expired    { background: #ececec; color: #555; }
.sswp-badge-pending    { background: #fff5d9; color: #946800; }
.sswp-badge-failed     { background: #fde7e7; color: #b22020; }

.sswp-portal-header { display: flex; align-items: center; gap: 12px; margin: .5rem 0 1rem; }
.sswp-grid { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; margin: 1rem 0; }
@media (max-width: 720px) { .sswp-grid { grid-template-columns: 1fr; } }
.sswp-card { background: #fff; border: 1px solid #ececec; border-radius: 10px; padding: 1rem 1.1rem; }
.sswp-card h3 { margin: 0 0 .65rem; font-size: 1rem; }
.sswp-items { list-style: none; margin: 0; padding: 0; }
.sswp-items li { padding: .35rem 0; border-bottom: 1px dashed #eee; display: flex; gap: 8px; }
.sswp-items li:last-child { border-bottom: 0; }
.sswp-qty { color: #888; }
.sswp-price { margin-left: auto; }

.sswp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 1rem 0; }
.sswp-action-form { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sswp-btn, .sswp-portal a.button {
    background: #fff;
    border: 1px solid #d6d6d6;
    color: #333;
    padding: .55rem 1rem;
    border-radius: 6px;
    font-size: .92rem;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.2;
    display: inline-block;
}
.sswp-btn:hover { border-color: #999; }
.sswp-btn-primary {
    background: var(--sswp-color, #1e8cbe);
    border-color: var(--sswp-color, #1e8cbe);
    color: #fff;
}
.sswp-btn-secondary { background: #f5f5f5; }
.sswp-btn-danger {
    background: #fff;
    border-color: #d33;
    color: #d33;
}
.sswp-btn-danger:hover { background: #d33; color: #fff; }

.sswp-form-row { display: flex; gap: 8px; margin-bottom: 8px; }
.sswp-form-row input { flex: 1; }
.sswp-address-form input {
    width: 100%; margin-bottom: 8px; padding: .5rem .65rem;
    border: 1px solid #d6d6d6; border-radius: 5px;
}

.sswp-renewals { list-style: none; margin: 0; padding: 0; }
.sswp-renewals li { padding: 6px 0; border-bottom: 1px dashed #eee; font-size: .92rem; }

.sswp-logs { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.sswp-logs li { display: flex; gap: 10px; padding: 4px 0; border-bottom: 1px dashed #eee; }
.sswp-log-date { color: #999; min-width: 130px; }
.sswp-log-type { font-weight: 600; min-width: 80px; color: #555; }

/* Build a box */
.sswp-box-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin: 14px 0;
}
.sswp-box-item {
    border: 1px solid #ececec;
    border-radius: 10px;
    padding: 10px;
    background: #fff;
    text-align: center;
}
.sswp-box-img img { max-width: 100%; height: auto; border-radius: 6px; }
.sswp-box-name { font-weight: 600; margin: 6px 0; }
.sswp-box-price { color: #555; }
.sswp-box-controls { display: flex; gap: 4px; align-items: center; justify-content: center; margin-top: 6px; }
.sswp-box-controls button {
    width: 28px; height: 28px; border: 1px solid #ddd; background: #fafafa; border-radius: 5px; cursor: pointer;
}
.sswp-box-qty { width: 50px; text-align: center; padding: 4px; border: 1px solid #ddd; border-radius: 5px; }
.sswp-box-counter { font-weight: 600; margin: 8px 0; }
.sswp-box-summary { margin-top: 12px; }

/* Kadence theme tweaks — keep it neutral */
.kadence-content-wrap .sswp-widget,
body.theme-kadence .sswp-widget {
    background: var(--global-palette9, #fff);
    border-color: var(--global-gray-300, #e6e6e6);
}
