/**
 * DMTK e-Tempahan "Tempahan Saya" Styles
 */

.dmtk-my-bookings-container {
	max-width: 900px;
	margin: 20px auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	color: #1e293b;
	line-height: 1.5;
}

.dmtk-my-bookings-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
	padding: 28px;
	overflow: hidden;
}

.dmtk-my-bookings-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 24px;
	border-bottom: 1px solid #f1f5f9;
	padding-bottom: 16px;
}

.dmtk-my-bookings-header h2 {
	margin: 0 0 6px 0;
	font-size: 24px;
	font-weight: 700;
	color: #0f172a;
}

.dmtk-my-bookings-header p {
	margin: 0;
	color: #64748b;
	font-size: 14px;
}

/* Badges */
.dmtk-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 9999px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.3px;
	text-transform: uppercase;
}

.dmtk-badge-pending   { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.dmtk-badge-approved  { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.dmtk-badge-rejected  { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.dmtk-badge-cancelled { background: #f3f4f6; color: #4b5563; border: 1px solid #d1d5db; }
.dmtk-badge-completed { background: #e0f2fe; color: #075985; border: 1px solid #7dd3fc; }
.dmtk-badge-no-show   { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }

/* Table Styles */
.dmtk-history-table-wrapper {
	overflow-x: auto;
	margin-top: 16px;
}

.dmtk-history-table {
	width: 100%;
	border-collapse: collapse;
	text-align: left;
	font-size: 14px;
}

.dmtk-history-table th {
	background: #f8fafc;
	color: #475569;
	font-weight: 600;
	padding: 12px 14px;
	border-bottom: 2px solid #e2e8f0;
	white-space: nowrap;
}

.dmtk-history-table td {
	padding: 14px;
	border-bottom: 1px solid #f1f5f9;
	vertical-align: middle;
}

.dmtk-history-table tr:hover {
	background-color: #f8fafc;
}

.dmtk-ref-link {
	color: #0284c7;
	text-decoration: none;
	font-weight: 700;
	transition: color 0.15s ease;
}

.dmtk-ref-link:hover,
.dmtk-ref-link:focus {
	color: #0369a1;
	text-decoration: underline;
}

/* Action buttons */
.dmtk-btn-cancel {
	background: #fff;
	color: #dc2626;
	border: 1px solid #fca5a5;
	padding: 6px 12px;
	font-size: 13px;
	font-weight: 500;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.dmtk-btn-cancel:hover {
	background: #fee2e2;
	color: #991b1b;
	border-color: #f87171;
}

.dmtk-btn-cancel:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.dmtk-btn-primary {
	display: inline-block;
	background: #0284c7;
	color: #ffffff !important;
	padding: 8px 16px;
	font-size: 14px;
	font-weight: 600;
	border-radius: 6px;
	text-decoration: none;
	border: none;
	cursor: pointer;
	transition: background 0.2s ease;
}

.dmtk-btn-primary:hover {
	background: #0369a1;
	color: #ffffff;
}

/* Alerts */
.dmtk-alert {
	padding: 12px 16px;
	border-radius: 6px;
	font-size: 14px;
	margin-bottom: 16px;
	display: none;
}

.dmtk-alert-error {
	background: #fee2e2;
	color: #991b1b;
	border: 1px solid #fca5a5;
}

.dmtk-alert-success {
	background: #dcfce7;
	color: #166534;
	border: 1px solid #86efac;
}

.dmtk-alert-info {
	background: #e0f2fe;
	color: #075985;
	border: 1px solid #bae6fd;
}

/* Empty State */
.dmtk-empty-state {
	text-align: center;
	padding: 48px 16px;
	color: #64748b;
}

.dmtk-empty-icon {
	font-size: 40px;
	margin-bottom: 12px;
}

.dmtk-empty-text {
	font-size: 16px;
	font-weight: 500;
	margin-bottom: 16px;
	color: #334155;
}

/* Loading state */
.dmtk-loading-state {
	text-align: center;
	padding: 40px 16px;
	color: #64748b;
	font-size: 14px;
}

/* Auth required notice */
.dmtk-auth-notice {
	background: #f8fafc;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	padding: 32px 24px;
	text-align: center;
}

.dmtk-auth-notice h3 {
	margin: 0 0 8px 0;
	font-size: 20px;
	color: #1e293b;
}

.dmtk-auth-notice p {
	margin: 0 0 20px 0;
	color: #64748b;
	font-size: 15px;
}

/* Responsive cards view on small screens */
@media (max-width: 680px) {
	.dmtk-my-bookings-card {
		padding: 18px;
	}
	.dmtk-history-table, .dmtk-history-table thead, .dmtk-history-table tbody, .dmtk-history-table th, .dmtk-history-table td, .dmtk-history-table tr {
		display: block;
	}
	.dmtk-history-table thead tr {
		position: absolute;
		top: -9999px;
		left: -9999px;
	}
	.dmtk-history-table tr {
		border: 1px solid #e2e8f0;
		border-radius: 8px;
		margin-bottom: 16px;
		padding: 12px;
		background: #fff;
	}
	.dmtk-history-table td {
		border: none;
		border-bottom: 1px solid #f1f5f9;
		position: relative;
		padding: 8px 0;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
	.dmtk-history-table td:last-child {
		border-bottom: none;
		padding-top: 12px;
	}
	.dmtk-history-table td::before {
		content: attr(data-label);
		font-weight: 600;
		color: #64748b;
		font-size: 13px;
		margin-right: 12px;
	}
}
