/**
 * WIB Helpdesk Public Styles
 */

.wib-public-dashboard-container,
.wib-public-ticket-detail-container {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
	color: #334155;
	max-width: 1280px;
	margin: 0 auto;
	padding: 32px 24px;
	line-height: 1.6;
}

/* Dashboard Header */
.wib-dashboard-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 28px;
	border-bottom: 2px solid #f1f5f9;
	padding-bottom: 16px;
}

.wib-dashboard-header h2 {
	font-size: 28px;
	font-weight: 700;
	color: #0f172a;
	margin: 0;
}

/* Buttons */
.wib-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.2s ease;
	border: none;
}

.wib-btn-primary {
	background: linear-gradient(135deg, #2563eb, #1d4ed8);
	color: #ffffff !important;
	box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.wib-btn-primary:hover {
	background: linear-gradient(135deg, #1d4ed8, #1e40af);
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.wib-btn-large {
	padding: 14px 28px;
	font-size: 16px;
}

/* Tickets Table View */
.wib-tickets-table-container {
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
	border: 1px solid #e2e8f0;
	overflow: hidden;
	margin-bottom: 24px;
}

.wib-tickets-table {
	width: 100%;
	border-collapse: collapse;
	text-align: left;
}

.wib-tickets-table th {
	background: #f8fafc;
	color: #64748b;
	font-weight: 600;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 16px 24px;
	border-bottom: 1px solid #e2e8f0;
}

.wib-tickets-table td {
	padding: 20px 24px;
	border-bottom: 1px solid #f1f5f9;
	color: #334155;
	font-size: 15px;
	vertical-align: middle;
}

.wib-tickets-table tbody tr {
	transition: all 0.2s ease;
	cursor: pointer;
}

.wib-tickets-table tbody tr:hover {
	background: #f8fafc;
}

.wib-tickets-table tbody tr:last-child td {
	border-bottom: none;
}

.wib-ticket-no {
	font-weight: 700;
	color: #0f172a;
}

.wib-ticket-subject-col {
	font-weight: 600;
	color: #0f172a;
}

.wib-ticket-subject-col a {
	color: #0f172a;
	text-decoration: none;
	display: block;
}

.wib-ticket-subject-col a:hover {
	color: #2563eb;
}

.wib-ticket-product-pill {
	background: #e0e7ff;
	color: #4338ca;
	padding: 4px 10px;
	border-radius: 100px;
	font-size: 12px;
	font-weight: 600;
	display: inline-block;
}

.wib-ticket-date-col {
	color: #64748b;
	font-size: 14px;
}

/* Tickets Grid */
.wib-tickets-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 20px;
}

.wib-ticket-card {
	background: #ffffff;
	border-radius: 12px;
	padding: 24px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
	border: 1px solid #e2e8f0;
	position: relative;
	transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.wib-ticket-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 20px -4px rgba(0, 0, 0, 0.1), 0 4px 8px -2px rgba(0, 0, 0, 0.05);
	border-color: #cbd5e1;
}

.wib-ticket-card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 16px;
}

.wib-ticket-id {
	font-size: 14px;
	font-weight: 600;
	color: #64748b;
}

.wib-ticket-title {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 20px 0;
	line-height: 1.4;
}

.wib-ticket-title a {
	color: #0f172a;
	text-decoration: none;
}

.wib-ticket-card-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 13px;
	color: #94a3b8;
	border-top: 1px solid #f1f5f9;
	padding-top: 16px;
}

.wib-ticket-dept {
	background: #f1f5f9;
	color: #475569;
	padding: 2px 8px;
	border-radius: 6px;
	font-weight: 500;
}

.wib-ticket-card-link {
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	z-index: 1;
}

/* Badges */
.wib-status-badge {
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}
.wib-status-open { background-color: #dbeafe; color: #1e40af; }
.wib-status-pending { background-color: #fef9c3; color: #854d0e; }
.wib-status-on-hold { background-color: #ffedd5; color: #c2410c; }
.wib-status-replied { background-color: #ffedd5; color: #ea580c; }
.wib-status-solved { background-color: #dcfce7; color: #166534; }
.wib-status-closed { background-color: #f1f5f9; color: #475569; }

.wib-priority-badge {
	padding: 4px 10px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
}
.wib-priority-low { background-color: #f1f5f9; color: #64748b; }
.wib-priority-medium { background-color: #e0f2fe; color: #0284c7; }
.wib-priority-high { background-color: #fee2e2; color: #dc2626; }
.wib-priority-urgent { background-color: #7f1d1d; color: #fef2f2; }

/* Empty State */
.wib-no-tickets-box {
	grid-column: 1 / -1;
	background: #f8fafc;
	border: 2px dashed #cbd5e1;
	border-radius: 16px;
	padding: 64px 32px;
	text-align: center;
}

.wib-no-tickets-content .dashicons {
	font-size: 48px;
	width: 48px;
	height: 48px;
	color: #94a3b8;
	margin-bottom: 16px;
}

.wib-no-tickets-content h3 {
	font-size: 20px;
	color: #0f172a;
	margin: 0 0 8px 0;
}

.wib-no-tickets-content p {
	color: #64748b;
	margin: 0;
	max-width: 400px;
	margin: 0 auto;
}

/* Pagination */
.wib-pagination {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 40px;
}

.wib-page-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 8px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	color: #334155;
	text-decoration: none;
	font-weight: 500;
	transition: all 0.2s;
}

.wib-page-num:hover:not(.current) {
	background: #f1f5f9;
	border-color: #cbd5e1;
}

.wib-page-num.current {
	background: #2563eb;
	color: #ffffff;
	border-color: #2563eb;
}

/* Modal */
.wib-modal {
	display: none;
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(15, 23, 42, 0.6);
	backdrop-filter: blur(4px);
	z-index: 99999;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.wib-modal.is-open {
	display: flex;
}

.wib-modal-content {
	background: #ffffff;
	border-radius: 16px;
	width: 100%;
	max-width: 700px;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
	border: 1px solid #e2e8f0;
}

.wib-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 28px;
	border-bottom: 1px solid #e2e8f0;
}

.wib-modal-header h3 {
	margin: 0;
	font-size: 20px;
	color: #0f172a;
}

.wib-close-modal-btn {
	background: none;
	border: none;
	font-size: 28px;
	color: #64748b;
	cursor: pointer;
	padding: 0;
	line-height: 1;
}

.wib-close-modal-btn:hover {
	color: #0f172a;
}

.wib-modal-body {
	padding: 28px;
}

/* Forms */
.wib-form-row {
	display: flex;
	gap: 20px;
	margin-bottom: 20px;
}

.wib-form-group {
	margin-bottom: 20px;
}

.wib-col-8 { flex: 2; }
.wib-col-4 { flex: 1; }

.wib-form-group label {
	display: block;
	font-weight: 600;
	font-size: 14px;
	color: #1e293b;
	margin-bottom: 8px;
}

.wib-form-group label .required {
	color: #dc2626;
}

.wib-form-group input[type="text"],
.wib-form-group select,
.wib-form-group textarea {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font-size: 15px;
	font-family: inherit;
	color: #334155;
	background: #ffffff;
	transition: all 0.2s;
	box-sizing: border-box;
}

.wib-form-group input[type="text"]:focus,
.wib-form-group select:focus,
.wib-form-group textarea:focus {
	outline: none;
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.wib-form-hint {
	display: block;
	font-size: 12px;
	color: #64748b;
	margin-top: 6px;
}

.wib-form-actions {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-top: 28px;
}

/* Ticket Detail View */
.wib-detail-top-nav {
	margin-bottom: 24px;
}

.wib-back-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 15px;
	color: #2563eb;
	text-decoration: none;
	font-weight: 600;
}

.wib-back-link:hover {
	text-decoration: underline;
}

.wib-ticket-header-card {
	background: #ffffff;
	border-radius: 16px;
	padding: 28px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
	border: 1px solid #e2e8f0;
	margin-bottom: 32px;
}

.wib-ticket-header-top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 20px;
	margin-bottom: 20px;
	border-bottom: 1px solid #f1f5f9;
	padding-bottom: 20px;
}

.wib-ticket-header-top h2 {
	margin: 0;
	font-size: 24px;
	color: #0f172a;
}

.wib-ticket-badges {
	display: flex;
	gap: 12px;
}

.wib-ticket-meta-row {
	display: flex;
	gap: 24px;
	flex-wrap: wrap;
	font-size: 14px;
	color: #64748b;
}

.wib-meta-item strong {
	color: #334155;
}

/* Public Thread */
.wib-public-thread {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin-bottom: 40px;
}

.wib-message-box {
	background: #ffffff;
	border-radius: 16px;
	padding: 24px;
	box-shadow: 0 2px 4px rgba(0,0,0,0.04);
	border: 1px solid #e2e8f0;
	position: relative;
}

.wib-message-box.wib-msg-mine {
	border-left: 4px solid #2563eb;
}

.wib-message-box.wib-msg-staff {
	border-left: 4px solid #10b981;
	background: #f8fafc;
}

.wib-msg-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 16px;
	border-bottom: 1px solid #f1f5f9;
	padding-bottom: 16px;
}

.wib-msg-user {
	display: flex;
	align-items: center;
	gap: 12px;
}

.wib-msg-user img {
	border-radius: 50%;
}

.wib-user-tag {
	display: inline-block;
	font-size: 11px;
	background: #e2e8f0;
	padding: 2px 6px;
	border-radius: 4px;
	margin-left: 8px;
	font-weight: 600;
	color: #475569;
}

.wib-msg-date {
	font-size: 13px;
	color: #94a3b8;
}

.wib-msg-content {
	font-size: 16px;
	color: #334155;
	line-height: 1.6;
}

.wib-msg-attachments {
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px dashed #cbd5e1;
}

.wib-att-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	background: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font-size: 14px;
	color: #0f172a;
	text-decoration: none;
	font-weight: 500;
	transition: all 0.2s;
}

.wib-att-link:hover {
	background: #f1f5f9;
	border-color: #94a3b8;
}

.wib-public-reply-box {
	background: #ffffff;
	border-radius: 16px;
	padding: 28px;
	box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
	border: 1px solid #e2e8f0;
}

.wib-public-reply-box h3 {
	margin: 0 0 20px 0;
	font-size: 20px;
	color: #0f172a;
	border-bottom: 1px solid #f1f5f9;
	padding-bottom: 16px;
}

.wib-ticket-closed-notice {
	background: #f1f5f9;
	border-left: 4px solid #64748b;
	padding: 20px;
	border-radius: 12px;
	text-align: center;
	color: #475569;
	font-weight: 500;
}

/* Dashboard Tabs Navigation */
.wib-dashboard-tabs-nav {
	display: flex;
	gap: 12px;
	border-bottom: 2px solid #e2e8f0;
	padding-bottom: 2px;
	margin-bottom: 32px;
}

.wib-tab-nav-btn {
	background: transparent;
	border: none;
	border-bottom: 2px solid transparent;
	color: #64748b;
	padding: 12px 20px;
	font-size: 15px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	transition: all 0.2s ease;
	margin-bottom: -2px;
}

.wib-tab-nav-btn .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
	color: #94a3b8;
	transition: color 0.2s ease;
}

.wib-tab-nav-btn:hover {
	color: #0f172a;
}

.wib-tab-nav-btn:hover .dashicons {
	color: #64748b;
}

.wib-tab-nav-btn.active {
	color: #2563eb;
	border-bottom-color: #2563eb;
}

.wib-tab-nav-btn.active .dashicons {
	color: #2563eb;
}

/* Tab Panes */
.wib-tab-pane {
	display: none;
	animation: wibFadeIn 0.3s ease;
}

.wib-tab-pane.active {
	display: block;
}

@keyframes wibFadeIn {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Invoices Status Badges mapping */
.wib-status-unpaid { background-color: #fef3c7; color: #d97706; }
.wib-status-paid { background-color: #dcfce7; color: #15803d; }
.wib-status-overdue { background-color: #fee2e2; color: #b91c1c; }

/* Profile Message Box */
.wib-profile-message-box {
	padding: 14px 18px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	margin-bottom: 20px;
}

.wib-profile-message-box.error {
	background: #fdf2f2;
	border: 1px solid #fde8e8;
	color: #c81e1e;
}

.wib-profile-message-box.success {
	background: #f3faf7;
	border: 1px solid #def7ec;
	color: #03543f;
}
