/**
 * EHERO WooCommerce Subscriptions - Frontend My Account styles
 *
 * @package Ehero_Woo_Subscriptions
 */

/* Subscription table */
.ehero-subs-table {
	width: 100%;
	border-collapse: collapse;
	border: 1px solid #e5e5e5;
}

.ehero-subs-table th,
.ehero-subs-table td {
	padding: 12px 16px;
	text-align: left;
	border-bottom: 1px solid #e5e5e5;
}

.ehero-subs-table th {
	background: #f8f8f8;
	font-weight: 600;
}

.ehero-subs-table tbody tr:hover {
	background: #fafafa;
}

.ehero-subs-table tbody tr:last-child td {
	border-bottom: none;
}

/* Status badges - matching admin colors */
.ehero-subs-status-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
	color: #fff;
}

.ehero-subs-status-active { background: #46b450; }
.ehero-subs-status-onhold { background: #f0b849; }
.ehero-subs-status-cancelled { background: #dc3232; }
.ehero-subs-status-expired { background: #999; }
.ehero-subs-status-pending { background: #017cba; }
.ehero-subs-status-pending-cancel { background: #999; }
.ehero-subs-status-default { background: #666; }

/* Subscription detail page layout */
.ehero-subs-view-subscription {
	max-width: 900px;
}

.ehero-subs-back-link {
	margin-bottom: 20px;
}

.ehero-subs-back-link a {
	text-decoration: none;
}

.ehero-subs-back-link a:hover {
	text-decoration: underline;
}

.ehero-subs-subscription-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 24px;
	flex-wrap: wrap;
}

.ehero-subs-subscription-title {
	margin: 0;
	font-size: 1.5em;
}

.ehero-subs-detail-grid {
	display: grid;
	grid-template-columns: 1fr 320px;
	gap: 24px;
}

@media (max-width: 768px) {
	.ehero-subs-detail-grid {
		grid-template-columns: 1fr;
	}
}

.ehero-subs-detail-main {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.ehero-subs-section-box {
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 4px;
	padding: 20px;
}

.ehero-subs-box-title {
	margin: 0 0 16px 0;
	font-size: 1.1em;
	padding-bottom: 8px;
	border-bottom: 1px solid #e5e5e5;
}

/* Details list */
.ehero-subs-details-list {
	display: grid;
	grid-template-columns: 140px 1fr;
	gap: 8px 20px;
	margin: 0;
}

.ehero-subs-details-list dt {
	font-weight: 600;
	color: #666;
}

.ehero-subs-details-list dd {
	margin: 0;
}

/* Action buttons */
.ehero-subs-action-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.ehero-subs-action-buttons .button,
.ehero-subs-action-buttons .ehero-subs-btn-view,
.ehero-subs-action-buttons .ehero-subs-btn-cancel,
.ehero-subs-action-buttons .ehero-subs-btn-pause,
.ehero-subs-action-buttons .ehero-subs-btn-reactivate {
	display: inline-block;
	padding: 8px 16px;
	text-decoration: none;
	border-radius: 4px;
	font-size: 13px;
}

.ehero-subs-btn-view {
	background: #017cba;
	color: #fff !important;
	border: 1px solid #017cba;
}

.ehero-subs-btn-view:hover {
	background: #0299d4;
	border-color: #0299d4;
	color: #fff !important;
}

.ehero-subs-btn-cancel {
	background: #dc3232;
	color: #fff !important;
	border: 1px solid #dc3232;
}

.ehero-subs-btn-cancel:hover {
	background: #b32d2e;
	color: #fff !important;
}

.ehero-subs-btn-pause {
	background: #f0b849;
	color: #1d2327 !important;
	border: 1px solid #f0b849;
}

.ehero-subs-btn-reactivate {
	background: #46b450;
	color: #fff !important;
	border: 1px solid #46b450;
}

.ehero-subs-btn-reactivate:hover {
	background: #3a9e42;
	color: #fff !important;
}

/* Renewal list */
.ehero-subs-renewal-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ehero-subs-renewal-list li {
	margin: 0 0 6px 0;
}

.ehero-subs-renewal-list a {
	text-decoration: none;
}

.ehero-subs-renewal-list a:hover {
	text-decoration: underline;
}

/* Activity log */
.ehero-subs-activity-log {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ehero-subs-activity-item {
	padding: 10px 0;
	border-bottom: 1px dashed #e5e5e5;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ehero-subs-activity-item:last-child {
	border-bottom: none;
}

.ehero-subs-activity-event {
	font-weight: 600;
	font-size: 13px;
}

.ehero-subs-activity-desc {
	font-size: 12px;
	color: #666;
}

.ehero-subs-activity-date {
	font-size: 11px;
	color: #999;
}

/* Empty state */
.ehero-subs-empty-state {
	text-align: center;
	padding: 40px 20px;
}

.ehero-subs-empty-message {
	font-size: 1.1em;
	margin-bottom: 16px;
}

.ehero-subs-shop-link {
	display: inline-block;
}

/* Mobile responsive table */
@media (max-width: 768px) {
	.ehero-subs-table thead {
		display: none;
	}

	.ehero-subs-table tbody tr {
		display: block;
		border: 1px solid #e5e5e5;
		margin-bottom: 16px;
		border-radius: 4px;
	}

	.ehero-subs-table tbody tr td {
		display: flex;
		justify-content: space-between;
		align-items: flex-start;
		padding: 10px 12px;
		border-bottom: 1px solid #e5e5e5;
	}

	.ehero-subs-table tbody tr td:last-child {
		border-bottom: none;
	}

	.ehero-subs-table tbody tr td::before {
		content: attr(data-title);
		font-weight: 600;
		margin-right: 12px;
		flex-shrink: 0;
	}

	.ehero-subs-table tbody tr td.ehero-subs-col-actions {
		flex-direction: column;
		align-items: stretch;
	}

	.ehero-subs-action-buttons {
		flex-direction: column;
	}
}
