/* ==========================================================================
   Web Hill Client Portal - front-end styles for the shortcode views.
   Everything is scoped under .whcp so it cannot leak into the theme.
   Override the custom properties below from your theme to re-brand.
   ========================================================================== */

.whcp {
	--whcp-primary: #2563eb;
	--whcp-accent: #23b7c9;
	--whcp-ink: #17243a;
	--whcp-navy: #0b1730;
	--whcp-muted: #64748b;
	--whcp-line: #e6ebf2;
	--whcp-soft: #f4f7fb;
	--whcp-green: #16a36a;
	--whcp-red: #dc2626;
	--whcp-amber: #d97706;
	--whcp-radius: 16px;

	color: var(--whcp-ink);
	font-size: 15px;
	line-height: 1.6;
	box-sizing: border-box;
}
.whcp *, .whcp *::before, .whcp *::after { box-sizing: inherit; }
.whcp a { color: var(--whcp-primary); }
/* Themes often underline every link inside page content; keep our controls clean. */
.whcp a.whcp-btn, .whcp .whcp-tabs a, .whcp .whcp-nav a, .whcp a.whcp-svc, .whcp a.whcp-back { text-decoration: none; }
.whcp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }

/* Typography ------------------------------------------------------------ */
.whcp-h2 { font-size: 26px; line-height: 1.2; margin: 0 0 4px; color: var(--whcp-navy); }
.whcp-h3 { font-size: 18px; line-height: 1.3; margin: 0 0 14px; color: var(--whcp-navy); }
.whcp-muted { color: var(--whcp-muted); }
.whcp-small { font-size: 13px; color: var(--whcp-muted); }
.whcp-empty { color: var(--whcp-muted); text-align: center; padding: 20px 0; }
.whcp-tag { display: inline-block; background: #eaf2ff; color: #1d4ed8; border-radius: 30px; padding: 3px 10px; font-size: 11px; font-weight: 700; }

/* Buttons --------------------------------------------------------------- */
.whcp-btn {
	display: inline-block; padding: 12px 20px; border-radius: 10px; background: var(--whcp-primary); color: #fff !important;
	font-weight: 700; font-size: 14px; text-decoration: none; border: 1px solid var(--whcp-primary); cursor: pointer; text-align: center; line-height: 1.2;
}
.whcp-btn:hover { filter: brightness(1.07); }
.whcp-btn--light { background: #fff; color: var(--whcp-navy) !important; border-color: #d5deea; }
.whcp-btn--sm { padding: 9px 14px; font-size: 13px; }
.whcp-btn--block { display: block; width: 100%; }

/* Cards, notices -------------------------------------------------------- */
.whcp-card { background: #fff; border: 1px solid var(--whcp-line); border-radius: var(--whcp-radius); padding: 24px; margin-bottom: 20px; }
.whcp-card--ok { border-color: #b8ead3; background: #f2fcf8; }
.whcp-notice { padding: 12px 16px; border-radius: 10px; font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.whcp-notice--success { background: #e6f8f1; color: #0b6b45; border: 1px solid #b8ead3; }
.whcp-notice--error { background: #fdeeee; color: #a21d1d; border: 1px solid #f6c9c9; }
.whcp-pre { white-space: pre-wrap; background: var(--whcp-soft); border: 1px solid var(--whcp-line); border-radius: 10px; padding: 14px; font: 13px/1.6 ui-monospace, Menlo, Consolas, monospace; margin: 14px 0; }

/* Forms ----------------------------------------------------------------- */
.whcp-form p { margin: 0 0 14px; }
.whcp-form label, .whcp .login-username label, .whcp .login-password label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 5px; }
.whcp-form input[type="text"], .whcp-form input[type="email"], .whcp-form input[type="tel"], .whcp-form input[type="password"],
.whcp-form select, .whcp-form textarea, .whcp .login-username input, .whcp .login-password input {
	width: 100%; padding: 11px 13px; border: 1px solid #d5deea; border-radius: 10px; font: inherit; background: #fff; color: var(--whcp-ink);
}
.whcp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.whcp-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.whcp .login-submit input { background: var(--whcp-primary); color: #fff; border: 0; border-radius: 10px; padding: 12px 20px; font-weight: 700; cursor: pointer; width: 100%; }
.whcp .login-remember label { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; }
.whcp-tabs { display: flex; gap: 6px; background: var(--whcp-soft); border-radius: 12px; padding: 5px; margin: 14px 0 18px; flex-wrap: wrap; }
.whcp-tabs a { flex: 1; text-align: center; padding: 8px 12px; border-radius: 9px; font-size: 13px; font-weight: 700; text-decoration: none; color: #475569; }
.whcp-tabs a.is-active { background: #fff; color: var(--whcp-navy); box-shadow: 0 2px 8px rgba(18, 38, 68, .08); }

/* Login ----------------------------------------------------------------- */
.whcp-login { display: grid; place-items: center; padding: 20px 0; }
.whcp-login .whcp-card { width: min(440px, 100%); }

/* Checkout -------------------------------------------------------------- */
.whcp-checkout { max-width: 720px; margin: 0 auto; }
.whcp-summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.whcp-summary .whcp-h2 { margin: 8px 0 0; }
.whcp-total { font-size: 26px; color: var(--whcp-navy); white-space: nowrap; }
.whcp-methods { display: grid; gap: 10px; margin-bottom: 16px; }
.whcp-method { display: flex !important; align-items: center; gap: 12px; border: 1px solid #d5deea; border-radius: 12px; padding: 13px 15px; cursor: pointer; margin: 0 !important; }
.whcp-method:has(input:checked) { border-color: var(--whcp-primary); background: #f3f7ff; }
.whcp-redirect { font-family: system-ui, sans-serif; text-align: center; padding-top: 20vh; color: var(--whcp-muted); }

/* Pricing & products ---------------------------------------------------- */
.whcp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.whcp-group { margin-bottom: 32px; }
.whcp-plan { position: relative; display: flex; flex-direction: column; margin-bottom: 0; }
.whcp-plan.is-popular { border: 2px solid var(--whcp-primary); }
.whcp-ribbon { position: absolute; right: 16px; top: -12px; background: var(--whcp-primary); color: #fff; padding: 3px 10px; border-radius: 30px; font-size: 10px; font-weight: 800; }
.whcp-plan__name { margin: 0 0 4px; font-size: 18px; }
.whcp-price { font-size: 30px; font-weight: 800; color: var(--whcp-navy); }
.whcp-price small { font-size: 13px; font-weight: 600; color: var(--whcp-muted); }
.whcp-features { list-style: none; padding: 0; margin: 14px 0 20px; display: grid; gap: 8px; flex: 1; font-size: 14px; }
.whcp-features li::before { content: "✓"; color: var(--whcp-green); font-weight: 900; margin-right: 8px; }
.whcp-product { padding: 0; overflow: hidden; display: flex; flex-direction: column; margin-bottom: 0; }
.whcp-product__art { height: 150px; background: linear-gradient(135deg, #eaf2ff, #dff7fb); display: grid; place-items: center; font-size: 46px; overflow: hidden; }
.whcp-product__art img { width: 100%; height: 100%; object-fit: cover; }
.whcp-product__body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.whcp-product__body .whcp-btn { margin-top: auto; }
.whcp-product__meta { display: flex; justify-content: space-between; align-items: center; margin: 12px 0 16px; }

/* Dashboard ------------------------------------------------------------- */
.whcp-dash { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }
.whcp-side { background: #fff; border: 1px solid var(--whcp-line); border-radius: var(--whcp-radius); padding: 18px; }
.whcp-user { display: flex; gap: 12px; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--whcp-line); margin-bottom: 12px; }
.whcp-user small { display: block; color: var(--whcp-muted); font-size: 12px; word-break: break-all; }
.whcp-avatar { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px; background: linear-gradient(135deg, var(--whcp-primary), var(--whcp-accent)); color: #fff; display: grid; place-items: center; font-weight: 800; }
.whcp-nav { display: grid; gap: 4px; }
.whcp-nav a { padding: 10px 13px; border-radius: 10px; font-size: 14px; font-weight: 700; color: #475569; text-decoration: none; }
.whcp-nav a:hover { background: var(--whcp-soft); }
.whcp-nav a.is-active { background: var(--whcp-navy); color: #fff; }
.whcp-nav a.whcp-logout { color: var(--whcp-red); margin-top: 8px; border-top: 1px solid var(--whcp-line); border-radius: 0 0 10px 10px; }
.whcp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.whcp-head p { margin: 0; }
.whcp-back { display: inline-block; font-size: 13px; font-weight: 700; margin-bottom: 12px; text-decoration: none; }
.whcp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.whcp-stat { background: #fff; border: 1px solid var(--whcp-line); border-top: 3px solid var(--whcp-accent); border-radius: 14px; padding: 16px 18px; }
.whcp-stat strong { display: block; font-size: 28px; line-height: 1.1; color: var(--whcp-navy); }
.whcp-stat span { font-size: 12px; color: var(--whcp-muted); font-weight: 600; }
.whcp-stat.is-warn { border-top-color: var(--whcp-amber); }
.whcp-stat.is-warn strong { color: var(--whcp-amber); }
.whcp-panel { background: #fff; border: 1px solid var(--whcp-line); border-radius: var(--whcp-radius); padding: 22px; margin-bottom: 20px; }
.whcp-panel--pay { border-left: 4px solid var(--whcp-amber); }
.whcp-panel__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.whcp-panel__head .whcp-h3 { margin: 0; }
.whcp-cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
.whcp-svc-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.whcp-svc { display: block; border: 1px solid var(--whcp-line); border-radius: 14px; padding: 16px; text-decoration: none; color: inherit !important; }
.whcp-svc:hover { border-color: #c7d6f2; }
.whcp-svc__top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.whcp-svc__top strong { display: block; color: var(--whcp-navy); }
.whcp-svc__top small, .whcp-svc__meta { color: var(--whcp-muted); font-size: 12px; }
.whcp-svc__meta { display: flex; justify-content: space-between; margin-top: 8px; }
.whcp-note { margin: 14px 0 0; padding: 12px 14px; background: #f1f6ff; border-radius: 10px; font-size: 14px; }
.whcp-progress { height: 8px; border-radius: 8px; background: #e9eef6; overflow: hidden; }
.whcp-progress span { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--whcp-primary), var(--whcp-accent)); }
.whcp-status { display: inline-block; padding: 3px 10px; border-radius: 30px; font-size: 11px; font-weight: 700; white-space: nowrap; background: #eef2f7; color: #475569; }
.whcp-status--active, .whcp-status--inv-paid, .whcp-status--completed, .whcp-status--req-closed { background: #e6f8f1; color: #0b6b45; }
.whcp-status--in-progress, .whcp-status--req-contacted { background: #e8f0ff; color: #1d4ed8; }
.whcp-status--pending, .whcp-status--inv-due, .whcp-status--req-new, .whcp-status--pay-unpaid, .whcp-status--pay-awaiting { background: #fff4e0; color: #9a5b00; }
.whcp-status--on-hold { background: #f1ecff; color: #5b34c4; }
.whcp-status--expired, .whcp-status--inv-overdue, .whcp-status--pay-failed { background: #fdeeee; color: #a21d1d; }

.whcp-table-wrap { overflow-x: auto; }
.whcp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.whcp-table th { text-align: left; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--whcp-muted); padding: 10px; border-bottom: 1px solid var(--whcp-line); }
.whcp-table td { padding: 13px 10px; border-bottom: 1px solid var(--whcp-line); vertical-align: middle; }
.whcp-table tr:last-child td { border-bottom: 0; }

.whcp-timeline { list-style: none; margin: 6px 0 0; padding: 0; }
.whcp-timeline__item { display: flex; gap: 12px; position: relative; padding-bottom: 20px; }
.whcp-timeline__item:last-child { padding-bottom: 0; }
.whcp-timeline__item::before { content: ""; position: absolute; left: 8px; top: 20px; bottom: 0; width: 2px; background: var(--whcp-line); }
.whcp-timeline__item:last-child::before { display: none; }
.whcp-timeline__dot { width: 18px; height: 18px; flex: 0 0 18px; border-radius: 50%; border: 2px solid #cdd7e5; background: #fff; margin-top: 2px; position: relative; z-index: 1; }
.whcp-timeline__item strong { display: block; color: var(--whcp-navy); }
.whcp-timeline__item small { color: var(--whcp-muted); font-size: 12px; }
.whcp-timeline__item.is-done .whcp-timeline__dot { background: var(--whcp-green); border-color: var(--whcp-green); }
.whcp-timeline__item.is-done::before { background: var(--whcp-green); }
.whcp-timeline__item.is-current .whcp-timeline__dot { border-color: var(--whcp-primary); box-shadow: 0 0 0 4px #2563eb22; }
.whcp-details { margin: 0 0 16px; }
.whcp-details div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--whcp-line); font-size: 14px; }
.whcp-details dt { color: var(--whcp-muted); }
.whcp-details dd { margin: 0; font-weight: 700; text-align: right; word-break: break-word; }
.whcp-requests { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.whcp-requests li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--whcp-line); padding-bottom: 14px; }
.whcp-requests li:last-child { border-bottom: 0; padding-bottom: 0; }
.whcp-requests small { display: block; color: var(--whcp-muted); font-size: 12px; }
.whcp-requests p { margin: 4px 0 0; font-size: 13px; }

/* Responsive ------------------------------------------------------------ */
@media (max-width: 900px) {
	.whcp-dash { grid-template-columns: 1fr; }
	.whcp-nav { grid-template-columns: repeat(2, 1fr); }
	.whcp-stats { grid-template-columns: repeat(2, 1fr); }
	.whcp-cols { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
	.whcp-row, .whcp-svc-list { grid-template-columns: 1fr; }
	.whcp-summary { flex-direction: column; align-items: flex-start; }
	.whcp-table thead { display: none; }
	.whcp-table, .whcp-table tbody, .whcp-table tr, .whcp-table td { display: block; width: 100%; }
	.whcp-table tr { border: 1px solid var(--whcp-line); border-radius: 12px; padding: 8px 12px; margin-bottom: 10px; }
	.whcp-table td { border: 0; padding: 5px 0; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
	.whcp-table td::before { content: attr(data-label); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--whcp-muted); font-weight: 700; }
}
