.woocommerce-account-wcgd {
	margin-bottom: 2em;
}

.wcgd-link-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 20px;
	margin-top: 20px;
}

.wcgd-link-card {
	border: 1px solid #dcdcde;
	padding: 0;
	background: #fff;
	border-radius: 2px;
	box-shadow: 0 1px 1px rgba(0,0,0,.04);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transition: box-shadow .15s ease, border-color .15s ease;
}
.wcgd-link-card:hover {
	box-shadow: 0 2px 4px rgba(0,0,0,.08);
	border-color: #b0b0b0;
}

.wcgd-link-card-header {
	padding: 14px 16px 10px;
	border-bottom: 1px solid #dcdcde;
	background: #f6f7f7;
}

.wcgd-link-card-header h3,
.wcgd-link-card-header h4 {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	color: #1d2327;
}

.wcgd-link-card-body {
	padding: 14px 16px;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.wcgd-path {
	color: #50575e;
	font-size: 12px;
	margin: 0;
	word-break: break-all;
	line-height: 1.4;
}

.wcgd-meta {
	margin: 0;
	display: flex;
	gap: 8px;
	align-items: center;
}

.wcgd-status {
	display: inline-block;
	padding: 2px 8px;
	border: 1px solid transparent;
	border-radius: 2px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.4;
	text-transform: uppercase;
	letter-spacing: .03em;
}

.wcgd-status-active {
	background: #edfaef;
	border-color: #00a32a;
	color: #005c12;
}

.wcgd-status-inactive,
.wcgd-status-expired {
	background: #fcf0f1;
	border-color: #d63638;
	color: #8a1a1c;
}

.wcgd-subfolders {
	margin: 0;
	font-size: 12px;
	color: #50575e;
}

.wcgd-subfolders a {
	margin-right: 10px;
	color: #2271b1;
	text-decoration: none;
}
.wcgd-subfolders a:hover {
	text-decoration: underline;
}

.wcgd-dates {
	margin: 0;
	font-size: 12px;
	color: #50575e;
}

.wcgd-dates p {
	margin: 2px 0;
	display: flex;
	justify-content: space-between;
	gap: 8px;
}

.wcgd-days-left {
	font-weight: 600;
}

.wcgd-urgent {
	color: #d63638;
}

.wcgd-link-card-footer {
	padding: 10px 16px 14px;
	border-top: 1px solid #dcdcde;
	background: #f6f7f7;
}

.wcgd-open-folder {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	width: 100%;
	padding: 6px 12px;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.4;
	text-align: center;
	text-decoration: none;
	border: 1px solid #2271b1;
	border-radius: 2px;
	background: #2271b1;
	color: #fff;
	cursor: pointer;
}
.wcgd-open-folder:hover,
.wcgd-open-folder:focus {
	background: #135e96;
	border-color: #135e96;
	color: #fff;
	text-decoration: none;
	outline: none;
}
.wcgd-open-folder:disabled,
.wcgd-link-card button[disabled] {
	background: #ccc;
	border-color: #b0b0b0;
	color: #555;
	cursor: not-allowed;
}

.woocommerce-order-wcgd {
	margin-top: 2em;
}

.wcgd-order-detail-item {
	border: 1px solid #dcdcde;
	padding: 14px 16px;
	margin-bottom: 14px;
	border-radius: 2px;
	background: #f6f7f7;
}

.wcgd-shortcode .wcgd-link-card {
	margin-bottom: 0;
}

/* === Summary stats bar === */
.wcgd-summary {
	display: flex;
	gap: 12px;
	margin: 16px 0 12px;
	flex-wrap: wrap;
}

.wcgd-summary-item {
	flex: 1 1 0;
	min-width: 110px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 12px 14px;
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-left: 3px solid #2271b1;
	border-radius: 2px;
}

.wcgd-summary-active { border-left-color: #00a32a; }
.wcgd-summary-soon   { border-left-color: #dba617; }
.wcgd-summary-gone   { border-left-color: #d63638; }

.wcgd-summary-num {
	font-size: 22px;
	font-weight: 600;
	color: #1d2327;
	line-height: 1.1;
}

.wcgd-summary-label {
	font-size: 12px;
	color: #50575e;
	margin-top: 2px;
}

/* === Toolbar (filter tabs + search) === */
.wcgd-toolbar {
	display: flex;
	gap: 12px;
	align-items: center;
	margin: 12px 0 16px;
	flex-wrap: wrap;
	justify-content: space-between;
}

.wcgd-tabs {
	display: inline-flex;
	gap: 0;
	border: 1px solid #dcdcde;
	border-radius: 2px;
	overflow: hidden;
	background: #f6f7f7;
}

.wcgd-tab {
	display: inline-flex;
	align-items: center;
	padding: 6px 12px;
	font-size: 13px;
	color: #1d2327;
	cursor: pointer;
	border-right: 1px solid #dcdcde;
	background: #f6f7f7;
}
.wcgd-tab:last-child { border-right: 0; }
.wcgd-tab input { position: absolute; opacity: 0; pointer-events: none; }
.wcgd-tab:has(input:checked) {
	background: #2271b1;
	color: #fff;
}

.wcgd-search { flex: 1 1 220px; max-width: 320px; }
.wcgd-search-input {
	width: 100%;
	padding: 6px 10px;
	border: 1px solid #dcdcde;
	border-radius: 2px;
	font-size: 13px;
	background: #fff;
}
.wcgd-search-input:focus { border-color: #2271b1; outline: none; box-shadow: 0 0 0 1px #2271b1; }

.wcgd-no-results {
	margin: 12px 0;
	padding: 10px 12px;
	background: #fcf0f1;
	border-left: 3px solid #d63638;
	color: #50575e;
	font-size: 13px;
}

.wcgd-empty {
	margin: 12px 0;
	color: #50575e;
}

/* === Header order link === */
.wcgd-link-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.wcgd-order-link {
	font-size: 11px;
	color: #2271b1;
	text-decoration: none;
	white-space: nowrap;
}
.wcgd-order-link:hover { text-decoration: underline; }

/* === Progress bar === */
.wcgd-progress {
	width: 100%;
	height: 6px;
	background: #f0f0f1;
	border-radius: 3px;
	overflow: hidden;
	margin-top: 4px;
}

.wcgd-progress-bar {
	height: 100%;
	transition: width .3s ease;
	background: #00a32a;
}

.wcgd-progress-ok      .wcgd-progress-bar { background: #00a32a; }
.wcgd-progress-warn    .wcgd-progress-bar { background: #dba617; }
.wcgd-progress-critical .wcgd-progress-bar { background: #d63638; }

/* === Copy link button === */
.wcgd-link-card-footer {
	display: flex;
	gap: 6px;
}

.wcgd-open-folder { flex: 1; }

.wcgd-copy-link {
	flex: 0 0 auto;
	font-size: 12px !important;
	padding: 4px 10px !important;
}

/* === Shortcode grid === */
.wcgd-shortcode-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 20px;
	margin-top: 20px;
}

@media (max-width: 600px) {
	.wcgd-toolbar { flex-direction: column; align-items: stretch; }
	.wcgd-search { max-width: none; }
	.wcgd-tabs { width: 100%; }
	.wcgd-tab { flex: 1; justify-content: center; }
}
