/**
 * Restaurant Portal Dashboard Styles
 *
 * Modern card-based dashboard UI for "My Restaurants" portal.
 * All styles namespaced under .hrw-portal to avoid conflicts.
 *
 * @package HoustonRestaurantWeeks
 * @subpackage Modules\RestaurantPortal
 * @since 1.0.0
 */

/* ========================================
   CSS Variables
   ======================================== */

:root {
	/* Brand Colors */
	--hrw-blue: #00A0DC;
	--hrw-green: #A4D233;
	--hrw-orange: #F47E3C;
	--hrw-dark: #1a1a1a;

	/* Gray Scale */
	--hrw-gray-50: #f9fafb;
	--hrw-gray-100: #f3f4f6;
	--hrw-gray-200: #e5e7eb;
	--hrw-gray-300: #d1d5db;
	--hrw-gray-400: #9ca3af;
	--hrw-gray-500: #6b7280;
	--hrw-gray-600: #4b5563;
	--hrw-gray-700: #374151;
	--hrw-gray-800: #1f2937;
	--hrw-gray-900: #111827;
	--hrw-white: #ffffff;

	/* Semantic Colors */
	--hrw-success: #10b981;
	--hrw-warning: #f59e0b;
	--hrw-error: #ef4444;

	/* Shadows */
	--hrw-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
	--hrw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
	--hrw-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
	--hrw-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
	--hrw-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

	/* Border Radius */
	--hrw-border-radius: 12px;
	--hrw-border-radius-sm: 8px;

	/* Transitions */
	--hrw-transition: all 0.2s ease;
}

/* ========================================
   Base Portal Styles
   ======================================== */

body:not([class*=elementor-page-]) .site-main {
	max-width: 100% !important;
}

.page-header {
	display: none;
}

.page-content {
	padding-top: 3em !important;
}

.hrw-portal {
	min-height: 100vh;
	background: transparent;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	color: var(--hrw-gray-900);
	line-height: 1.5;
}

.hrw-portal *,
.hrw-portal *::before,
.hrw-portal *::after {
	box-sizing: border-box;
}

/* ========================================
   Header
   ======================================== */

.hrw-portal__header {
	background: linear-gradient(135deg, var(--hrw-blue) 0%, #0077b3 100%);
	color: var(--hrw-white);
	padding: 24px 0;
	box-shadow: var(--hrw-shadow-lg);
	position: sticky;
	top: 0;
	z-index: 100;
}

.hrw-portal__header-content {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 24px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
}

.hrw-portal__logo {
	display: flex;
	align-items: center;
	gap: 12px;
}

.hrw-portal__logo-icon {
	font-size: 48px;
	line-height: 1;
	color: var(--hrw-green);
}

.hrw-portal__logo-text {
	display: flex;
	flex-direction: column;
}

.hrw-portal__logo-title {
	font-size: 24px;
	font-weight: 700;
	letter-spacing: 1px;
	line-height: 1.2;
}

.hrw-portal__logo-subtitle {
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 2px;
	opacity: 0.95;
}

.hrw-portal__event-info {
	display: flex;
	align-items: center;
}

.hrw-portal__event-dates {
	font-size: 18px;
	font-weight: 600;
	padding: 8px 20px;
	background: rgba(255, 255, 255, 0.15);
	border-radius: 50px;
	backdrop-filter: blur(10px);
}

/* ========================================
   Layout
   ======================================== */

.hrw-portal__main {
	padding: 32px 0;
}

.hrw-portal__container {
	max-width: 100%;
	margin: 0 auto;
	padding: 0 24px;
}

.hrw-portal__grid {
	display: grid;
	grid-template-columns: 1fr 380px;
	gap: 24px;
	margin-bottom: 32px;
}

.hrw-portal__primary {
	min-width: 0;
}

.hrw-portal__sidebar {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.hrw-portal__secondary {
	margin-top: 68px;
}

/* Full Width Section */
.hrw-portal__full-width {
	width: 100%;
}

/* Three Column Layout */
.hrw-portal__three-column {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	margin-top: 68px;
}

.hrw-portal__column {
	min-width: 0;
}

/* Ensure cards in columns fill height */
.hrw-portal__column>.hrw-card {
	height: 100%;
	display: flex;
	flex-direction: column;
}

.hrw-portal__column>.hrw-card>.hrw-card__body {
	flex: 1;
}

/* ========================================
   Cards
   ======================================== */

.hrw-card {
	background: var(--hrw-white);
	border-radius: var(--hrw-border-radius);
	box-shadow: var(--hrw-shadow-md);
	overflow: hidden;
	transition: var(--hrw-transition);
}

.hrw-card:hover {
	box-shadow: var(--hrw-shadow-lg);
}

.hrw-card__header {
	padding: 24px;
	border-bottom: 2px solid var(--hrw-gray-100);
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	flex-wrap: wrap;
	background: var(--hrw-gray-100);
}

.hrw-card__header-main {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1;
}

.hrw-card__title {
	font-size: 22px;
	font-weight: 700;
	color: var(--hrw-gray-900);
	margin: 0;
	line-height: 1.3;
}

.hrw-card__subtitle {
	color: var(--hrw-gray-600);
	font-size: 14px;
	margin: 8px 0 0 0;
	line-height: 1.5;
}

.hrw-card__body {
	padding: 24px;
}

.hrw-card__body--no-padding {
	padding: 0;
}

/* ========================================
   Buttons
   ======================================== */

.hrw-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 24px;
	font-size: 15px;
	font-weight: 600;
	border-radius: var(--hrw-border-radius-sm);
	border: none;
	cursor: pointer;
	transition: var(--hrw-transition);
	white-space: nowrap;
	text-decoration: none;
}

.hrw-button--primary {
	background: var(--hrw-green);
	color: var(--hrw-white);
	box-shadow: var(--hrw-shadow-sm);
}

.hrw-button--primary:hover {
	background: #93c120;
	box-shadow: var(--hrw-shadow);
	transform: translateY(-1px);
	color: var(--hrw-white);
}

.hrw-button--secondary {
	background: var(--hrw-gray-100);
	color: var(--hrw-gray-700);
}

.hrw-button--secondary:hover {
	background: var(--hrw-gray-200);
	color: var(--hrw-gray-900);
}

.hrw-button--danger {
	background: var(--hrw-error);
	color: var(--hrw-white);
}

.hrw-button--danger:hover {
	background: #dc2626;
}

.hrw-button--outline {
	background: transparent;
	color: var(--hrw-gray-600);
	border: 1px solid var(--hrw-gray-300);
}

.hrw-button--outline:hover {
	background: var(--hrw-gray-50);
	color: var(--hrw-gray-800);
	border-color: var(--hrw-gray-400);
}

.hrw-button--small {
	padding: 8px 16px;
	font-size: 14px;
	gap: 6px;
}

/* Icon Buttons */
.hrw-icon-button {
	background: none;
	border: none;
	color: var(--hrw-gray-600);
	cursor: pointer;
	padding: 8px;
	border-radius: var(--hrw-border-radius-sm);
	transition: var(--hrw-transition);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.hrw-icon-button:hover {
	background: var(--hrw-gray-100);
	color: var(--hrw-gray-900);
}

.hrw-icon-button--danger:hover {
	background: var(--hrw-error);
	color: var(--hrw-white);
}

.hrw-icon-button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Icon button variations for revision states */
.hrw-icon-button--locked {
	color: var(--hrw-warning);
	opacity: 0.7;
}

.hrw-icon-button--continue {
	color: var(--hrw-blue);
	background: rgba(0, 160, 220, 0.1);
}

.hrw-icon-button--continue:hover {
	background: var(--hrw-blue);
	color: var(--hrw-white);
}

/* Revision status indicators */
.hrw-revision-indicator {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-left: 6px;
}

.hrw-revision-indicator--submitted {
	/* Orange/warning - waiting on admin */
}

.hrw-revision-indicator--draft {
	/* Blue - user can continue editing */
	animation: pulse-subtle 2s ease-in-out infinite;
}

@keyframes pulse-subtle {

	0%,
	100% {
		opacity: 1;
	}

	50% {
		opacity: 0.6;
	}
}

.hrw-help-icon {
	background: none;
	border: none;
	color: var(--hrw-gray-500);
	cursor: pointer;
	padding: 4px;
	border-radius: var(--hrw-border-radius-sm);
	transition: var(--hrw-transition);
	display: flex;
	align-items: center;
	justify-content: center;
}

.hrw-help-icon:hover {
	color: var(--hrw-blue);
	background: var(--hrw-gray-100);
}

/* ========================================
   Badges
   ======================================== */

.hrw-badge {
	display: inline-flex;
	align-items: center;
	padding: 4px 12px;
	font-size: 13px;
	font-weight: 600;
	border-radius: 50px;
	white-space: nowrap;
}

.hrw-badge--success {
	background: #d1fae5;
	color: #065f46;
}

.hrw-badge--warning {
	background: #fef3c7;
	color: #92400e;
}

.hrw-badge--error {
	background: #fee2e2;
	color: #991b1b;
}

.hrw-badge--info {
	background: #dbeafe;
	color: #1e40af;
}

/* ========================================
   Tables
   ======================================== */

.hrw-table-wrapper {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.hrw-table {
	width: 100%;
	border-collapse: collapse;
	border: none !important;
}

.hrw-table__head {
	background: transparent;
	border: none !important;
}

.hrw-table__th {
	text-align: left;
	padding: 16px;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	border: none !important;
	letter-spacing: 0.5px;
	color: var(--hrw-gray-500);
	border: none;
}

.hrw-table__row {
	border: none !important;
	border-bottom: none !important;
	transition: var(--hrw-transition);
}

/* Revision row - inherits even/odd background from parent row via matching class */
.hrw-revision-row {
	border-top: none !important;
}

.hrw-revision-row__spacer {
	padding: 0 16px 16px 16px !important;
}

.hrw-revision-row__content {
	padding: 0 16px 16px 0 !important;
}

/* Explicit even/odd row backgrounds */
.hrw-table__row--even {
	background-color: var(--hrw-white);
}

.hrw-table__row--odd {
	background-color: var(--hrw-gray-50);
}

.hrw-table__row:hover {
	background: transparent;
}

.hrw-table__td {
	padding: 20px 16px;
	font-size: 15px;
	color: var(--hrw-gray-800);
	vertical-align: middle;
	border: none !important;
	border-bottom: none !important;
}

.hrw-table__td--restaurant {
	font-weight: 600;
}

.hrw-text-muted {
	color: var(--hrw-gray-500);
	font-size: 13px;
}

/* Status Cell */
.hrw-status-cell {
	display: flex;
	align-items: center;
	gap: 8px;
}

.hrw-status-note {
	background: none;
	border: none;
	color: var(--hrw-gray-500);
	cursor: pointer;
	padding: 4px;
	border-radius: 50%;
	transition: var(--hrw-transition);
	display: flex;
	align-items: center;
	justify-content: center;
}

.hrw-status-note:hover {
	background: var(--hrw-gray-100);
	color: var(--hrw-blue);
}

/* Tooltips */
.hrw-tooltip-wrapper {
	position: relative;
	display: inline-flex;
}

.hrw-tooltip {
	position: absolute;
	bottom: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%);
	z-index: 1000;
	opacity: 0;
	visibility: hidden;
	transition: var(--hrw-transition);
	pointer-events: none;
}

.hrw-tooltip-wrapper:hover .hrw-tooltip {
	opacity: 1;
	visibility: visible;
}

.hrw-tooltip__content {
	background: var(--hrw-gray-900);
	color: var(--hrw-white);
	padding: 12px 16px;
	border-radius: var(--hrw-border-radius-sm);
	font-size: 14px;
	line-height: 1.5;
	max-width: 320px;
	min-width: 200px;
	box-shadow: var(--hrw-shadow-lg);
	white-space: normal;
	text-align: left;
}

.hrw-tooltip__content::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	width: 0;
	height: 0;
	border-left: 6px solid transparent;
	border-right: 6px solid transparent;
	border-top: 6px solid var(--hrw-gray-900);
}

/* Table header with tooltip */
.hrw-th-with-tooltip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	vertical-align: middle;
	position: relative;
}

.hrw-th-with-tooltip .hrw-tooltip-wrapper {
	position: static;
}

.hrw-th-with-tooltip .hrw-tooltip--below {
	left: 0;
	transform: none;
}

.hrw-help-icon--small {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--hrw-gray-400);
	cursor: help;
	transition: color 0.15s ease;
	position: relative;
}

.hrw-help-icon--small:hover {
	color: var(--hrw-gray-600);
}

/* Tooltip positioned below (for table headers) */
.hrw-tooltip--below {
	bottom: auto;
	top: calc(100% + 8px);
	left: 50%;
	right: auto;
	transform: translateX(-50%);
	z-index: 9999;
}

.hrw-tooltip--below .hrw-tooltip__content::after {
	top: auto;
	bottom: 100%;
	border-top: none;
	border-bottom: 6px solid var(--hrw-gray-900);
}

/* Ensure table header doesn't clip tooltip */
.hrw-table__head {
	position: relative;
}

.hrw-table__head th {
	overflow: visible;
}

/* Action Buttons Container */
.hrw-action-buttons {
	display: flex;
	gap: 4px;
	flex-wrap: nowrap;
	align-items: center;
}

/* ========================================
   Empty State
   ======================================== */

.hrw-empty-state {
	text-align: center;
	padding: 64px 32px;
}

.hrw-empty-state__icon {
	font-size: 64px;
	margin-bottom: 24px;
	opacity: 0.5;
}

.hrw-empty-state__title {
	font-size: 24px;
	font-weight: 700;
	color: var(--hrw-gray-900);
	margin: 0 0 12px 0;
}

.hrw-empty-state__description {
	font-size: 16px;
	color: var(--hrw-gray-600);
	max-width: 500px;
	margin: 0 auto 32px;
	line-height: 1.6;
}

.hrw-empty-state__actions {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
}

/* ========================================
   Account Actions
   ======================================== */

.hrw-action-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}

.hrw-action-card {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 20px;
	background: var(--hrw-gray-50);
	border: 2px solid var(--hrw-gray-200);
	border-radius: var(--hrw-border-radius-sm);
	cursor: pointer;
	transition: var(--hrw-transition);
	text-align: left;
	width: 100%;
	text-decoration: none;
	color: inherit;
}

.hrw-action-card:hover {
	border-color: var(--hrw-blue);
	background: var(--hrw-white);
	transform: translateY(-2px);
	box-shadow: var(--hrw-shadow);
}

.hrw-action-card__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: var(--hrw-border-radius-sm);
	flex-shrink: 0;
}

.hrw-action-card__icon--primary {
	background: linear-gradient(135deg, var(--hrw-blue) 0%, #0077b3 100%);
	color: var(--hrw-white);
}

.hrw-action-card__icon--secondary {
	background: linear-gradient(135deg, var(--hrw-green) 0%, #93c120 100%);
	color: var(--hrw-white);
}

.hrw-action-card__icon--neutral {
	background: var(--hrw-gray-200);
	color: var(--hrw-gray-700);
}

.hrw-action-card__icon--warning {
	background: linear-gradient(135deg, var(--hrw-orange) 0%, #e66920 100%);
	color: var(--hrw-white);
}

.hrw-action-card__label {
	font-size: 17px;
	font-weight: 600;
	color: var(--hrw-gray-900);
}

/* Large action cards for quick links */
.hrw-action-card--large {
	flex-direction: row;
	text-align: left;
	padding: 12px 14px;
}

.hrw-action-card--large .hrw-action-card__icon {
	width: 40px;
	height: 40px;
}

.hrw-action-card--large .hrw-action-card__icon svg {
	width: 22px;
	height: 22px;
}

.hrw-action-card--large .hrw-action-card__label {
	font-size: 14px;
}

/* Quick Links Grid */
.hrw-quick-links__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
}

/* ========================================
   Accordion
   ======================================== */

.hrw-accordion {
	display: flex;
	flex-direction: column;
}

.hrw-accordion__item {
	border-bottom: 1px solid var(--hrw-gray-200);
}

.hrw-accordion__item:last-child {
	border-bottom: none;
}

.hrw-accordion__trigger {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 0;
	background: none;
	border: none;
	cursor: pointer;
	text-align: left;
	transition: var(--hrw-transition);
	font-family: inherit;
}

.hrw-accordion__trigger:hover {
	color: var(--hrw-blue);
}

.hrw-accordion__trigger-content {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1;
}

.hrw-accordion__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--hrw-gray-600);
}

.hrw-accordion__title {
	font-size: 16px;
	font-weight: 600;
	color: var(--hrw-gray-900);
}

.hrw-accordion__count {
	margin-left: 8px;
	font-size: 13px;
	font-weight: 500;
	color: var(--hrw-gray-500);
}

.hrw-accordion__chevron {
	color: var(--hrw-gray-500);
	transition: transform 0.2s ease;
	flex-shrink: 0;
}

.hrw-accordion__trigger[aria-expanded="true"] .hrw-accordion__chevron {
	transform: rotate(180deg);
}

.hrw-accordion__content {
	padding-bottom: 16px;
	animation: hrwSlideDown 0.2s ease;
}

.hrw-accordion__content[hidden] {
	display: none;
}

@keyframes hrwSlideDown {
	from {
		opacity: 0;
		transform: translateY(-8px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ========================================
   Resources Accordion - Override Theme Styles
   Ensures clean, minimal accordion toggles
   ======================================== */

.hrw-resources .hrw-accordion__item {
	border-bottom: 1px solid var(--hrw-gray-200) !important;
	background: transparent !important;
}

.hrw-resources .hrw-accordion__item:last-child {
	border-bottom: none !important;
}

.hrw-resources .hrw-accordion__trigger,
.hrw-resources button.hrw-accordion__trigger {
	width: 100% !important;
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	padding: 18px 0 !important;
	background: none !important;
	background-color: transparent !important;
	border: none !important;
	border-radius: 0 !important;
	cursor: pointer !important;
	text-align: left !important;
	box-shadow: none !important;
	outline: none !important;
	margin: 0 !important;
	font-family: inherit !important;
	text-decoration: none !important;
	transition: color 0.2s ease !important;
}

.hrw-resources .hrw-accordion__trigger:hover,
.hrw-resources .hrw-accordion__trigger:focus,
.hrw-resources button.hrw-accordion__trigger:hover,
.hrw-resources button.hrw-accordion__trigger:focus {
	background: none !important;
	background-color: transparent !important;
	box-shadow: none !important;
	transform: none !important;
}

.hrw-resources .hrw-accordion__trigger-content {
	display: flex !important;
	align-items: center !important;
	gap: 14px !important;
	flex: 1 !important;
}

.hrw-resources .hrw-accordion__icon {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	color: var(--hrw-gray-500) !important;
	width: 24px !important;
	height: 24px !important;
	flex-shrink: 0 !important;
}

.hrw-resources .hrw-accordion__icon svg {
	width: 22px !important;
	height: 22px !important;
	stroke: var(--hrw-gray-500) !important;
	fill: none !important;
}

.hrw-resources .hrw-accordion__title {
	font-size: 16px !important;
	font-weight: 600 !important;
	color: var(--hrw-gray-800) !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	margin: 0 !important;
	padding: 0 !important;
	background: none !important;
}

.hrw-resources .hrw-accordion__trigger:hover .hrw-accordion__title {
	color: var(--hrw-gray-900) !important;
}

.hrw-resources .hrw-accordion__chevron {
	color: var(--hrw-gray-400) !important;
	transition: transform 0.2s ease !important;
	flex-shrink: 0 !important;
	width: 20px !important;
	height: 20px !important;
}

.hrw-resources .hrw-accordion__chevron svg {
	width: 20px !important;
	height: 20px !important;
	stroke: var(--hrw-gray-400) !important;
}

.hrw-resources .hrw-accordion__trigger[aria-expanded="true"] .hrw-accordion__chevron {
	transform: rotate(180deg) !important;
}

.hrw-resources .hrw-accordion__content {
	padding: 0 0 16px 0 !important;
	background: transparent !important;
}

/* ========================================
   Previous Events Accordion Overrides
   Heavy overrides to remove green button styling
   ======================================== */

.hrw-previous-events .hrw-accordion__item,
.hrw-card.hrw-previous-events .hrw-accordion__item,
section.hrw-previous-events .hrw-accordion__item {
	border-bottom: 1px solid var(--hrw-gray-200) !important;
	background: transparent !important;
	margin: 0 !important;
	padding: 0 !important;
}

.hrw-previous-events .hrw-accordion__item:last-child {
	border-bottom: none !important;
}

/* Kill all green button styles on accordion triggers */
.hrw-previous-events .hrw-accordion__trigger,
.hrw-previous-events button.hrw-accordion__trigger,
.hrw-previous-events .hrw-accordion button,
.hrw-previous-events .hrw-accordion__item button,
.hrw-card.hrw-previous-events .hrw-accordion__trigger,
.hrw-card.hrw-previous-events button.hrw-accordion__trigger,
section.hrw-previous-events .hrw-accordion__trigger,
section.hrw-previous-events button.hrw-accordion__trigger,
.hrw-portal .hrw-previous-events .hrw-accordion__trigger,
.hrw-portal .hrw-previous-events button.hrw-accordion__trigger {
	width: 100% !important;
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	padding: 16px 0 !important;
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	border: none !important;
	border-radius: 0 !important;
	cursor: pointer !important;
	box-shadow: none !important;
	outline: none !important;
	margin: 0 !important;
	text-align: left !important;
	transition: color 0.2s ease !important;
	color: inherit !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	font-size: inherit !important;
}

.hrw-previous-events .hrw-accordion__trigger:hover,
.hrw-previous-events .hrw-accordion__trigger:focus,
.hrw-previous-events .hrw-accordion__trigger:active,
.hrw-previous-events button.hrw-accordion__trigger:hover,
.hrw-previous-events button.hrw-accordion__trigger:focus,
.hrw-previous-events button.hrw-accordion__trigger:active,
.hrw-card.hrw-previous-events .hrw-accordion__trigger:hover,
.hrw-card.hrw-previous-events .hrw-accordion__trigger:focus,
.hrw-card.hrw-previous-events .hrw-accordion__trigger:active,
.hrw-portal .hrw-previous-events .hrw-accordion__trigger:hover,
.hrw-portal .hrw-previous-events .hrw-accordion__trigger:focus,
.hrw-portal .hrw-previous-events .hrw-accordion__trigger:active {
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	transform: none !important;
	border: none !important;
	color: inherit !important;
}

.hrw-previous-events .hrw-accordion__trigger-content {
	display: flex !important;
	align-items: center !important;
	gap: 14px !important;
	flex: 1 !important;
}

.hrw-previous-events .hrw-accordion__title,
.hrw-previous-events .hrw-accordion__trigger .hrw-accordion__title {
	font-size: 16px !important;
	font-weight: 600 !important;
	color: var(--hrw-gray-800) !important;
	display: flex !important;
	align-items: center !important;
	gap: 12px !important;
	border: none !important;
	padding: 0 !important;
	margin: 0 !important;
	background: transparent !important;
	text-transform: none !important;
}

.hrw-previous-events .hrw-accordion__trigger:hover .hrw-accordion__title {
	color: var(--hrw-gray-900) !important;
}

.hrw-previous-events .hrw-accordion__count {
	font-size: 13px !important;
	font-weight: 500 !important;
	color: var(--hrw-gray-500) !important;
	background: var(--hrw-gray-100) !important;
	padding: 4px 10px !important;
	border-radius: 12px !important;
	text-transform: none !important;
}

.hrw-previous-events .hrw-accordion__chevron,
.hrw-previous-events .hrw-accordion__trigger .hrw-accordion__chevron {
	color: var(--hrw-gray-400) !important;
	transition: transform 0.2s ease !important;
	flex-shrink: 0 !important;
	width: 20px !important;
	height: 20px !important;
}

.hrw-previous-events .hrw-accordion__chevron svg {
	width: 20px !important;
	height: 20px !important;
	stroke: var(--hrw-gray-400) !important;
}

.hrw-previous-events .hrw-accordion__trigger[aria-expanded="true"] .hrw-accordion__chevron {
	transform: rotate(180deg) !important;
}

.hrw-previous-events .hrw-accordion__content {
	padding: 0 0 16px 0 !important;
	background: transparent !important;
}

/* ========================================
   Resource List
   ======================================== */

.hrw-resource-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.hrw-resource-item {
	margin: 0;
}

.hrw-resource-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	background: var(--hrw-gray-50);
	border-radius: var(--hrw-border-radius-sm);
	margin-bottom: 8px;
	text-decoration: none;
	color: var(--hrw-gray-900);
	transition: var(--hrw-transition);
	font-size: 14px;
}

.hrw-resource-link:hover {
	background: var(--hrw-blue);
	color: var(--hrw-white);
	transform: translateX(4px);
}

/* ========================================
   Previous Events Table
   ======================================== */

.hrw-previous-table-wrapper {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin-top: 8px;
}

.hrw-previous-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	border: none !important;
}

.hrw-previous-table__head {
	background: transparent;
	border: none !important;
}

.hrw-previous-table__th {
	text-align: left;
	padding: 12px 16px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--hrw-gray-500);
	border: none !important;
}

.hrw-previous-table__row {
	border: none !important;
	border-bottom: none !important;
	transition: var(--hrw-transition);
}

.hrw-previous-table__row:hover {
	background: transparent;
}

.hrw-previous-table__td {
	padding: 16px;
	color: var(--hrw-gray-800);
	vertical-align: middle;
	border: none !important;
	border-bottom: none !important;
}

/* ========================================
   Modal
   ======================================== */

.hrw-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.hrw-modal[hidden] {
	display: none;
}

.hrw-modal__backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
}

.hrw-modal__content {
	position: relative;
	background: var(--hrw-white);
	border-radius: var(--hrw-border-radius);
	max-width: 600px;
	width: 100%;
	max-height: 80vh;
	overflow-y: auto;
	padding: 32px;
	box-shadow: var(--hrw-shadow-xl);
}

.hrw-modal__close {
	position: absolute;
	top: 16px;
	right: 16px;
	background: none;
	border: none;
	color: var(--hrw-gray-500);
	cursor: pointer;
	padding: 8px;
	border-radius: var(--hrw-border-radius-sm);
	transition: var(--hrw-transition);
}

.hrw-modal__close:hover {
	background: var(--hrw-gray-100);
	color: var(--hrw-gray-900);
}

.hrw-modal__title {
	font-size: 24px;
	font-weight: 700;
	color: var(--hrw-gray-900);
	margin: 0 0 4px 0;
	padding-right: 48px;
}

.hrw-modal__subtitle {
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--hrw-gray-500);
	margin: 0 0 20px 0;
}

.hrw-modal__body {
	font-size: 15px;
	line-height: 1.7;
	color: var(--hrw-gray-700);
}

.hrw-modal__link {
	display: inline-block;
	margin-top: 20px;
	color: var(--hrw-blue);
	font-weight: 600;
	text-decoration: none;
}

.hrw-modal__link:hover {
	text-decoration: underline;
}

/* ========================================
   Contact Form Section
   ======================================== */

.hrw-portal__contact {
	margin-top: 68px;
}

.hrw-contact-form {
	max-width: 800px;
	margin: 0 auto;
}

.hrw-contact-form .hrw-card__header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
}

.hrw-contact-form .hrw-card__subtitle {
	margin-top: 4px;
	font-size: 14px;
	color: var(--hrw-gray-500);
	font-weight: 400;
}

.hrw-contact-form .hrw-card__icon {
	color: var(--hrw-blue);
	background: rgba(59, 130, 246, 0.1);
	padding: 12px;
	border-radius: var(--hrw-border-radius);
}

.hrw-contact-form__body {
	padding-top: 8px;
}

/* Gravity Forms Override Styles */
.hrw-contact-form .gform_wrapper {
	margin: 0 !important;
	padding: 0 !important;
}

.hrw-contact-form .gform_wrapper.gravity-theme {
	--gf-ctrl-border-color: var(--hrw-gray-300) !important;
	--gf-ctrl-border-radius: var(--hrw-border-radius-sm) !important;
	--gf-ctrl-bg-color: var(--hrw-white) !important;
	--gf-color-primary: var(--hrw-blue) !important;
}

.hrw-contact-form .gform_wrapper .gfield {
	margin-bottom: 20px !important;
}

.hrw-contact-form .gform_wrapper .gfield_label {
	font-size: 14px !important;
	font-weight: 600 !important;
	color: var(--hrw-gray-700) !important;
	margin-bottom: 6px !important;
}

.hrw-contact-form .gform_wrapper input[type="text"],
.hrw-contact-form .gform_wrapper input[type="email"],
.hrw-contact-form .gform_wrapper input[type="tel"],
.hrw-contact-form .gform_wrapper input[type="url"],
.hrw-contact-form .gform_wrapper input[type="number"],
.hrw-contact-form .gform_wrapper select,
.hrw-contact-form .gform_wrapper textarea {
	width: 100% !important;
	padding: 12px 16px !important;
	font-size: 15px !important;
	border: 1px solid var(--hrw-gray-300) !important;
	border-radius: var(--hrw-border-radius-sm) !important;
	background: var(--hrw-white) !important;
	transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
	font-family: inherit !important;
}

.hrw-contact-form .gform_wrapper input:focus,
.hrw-contact-form .gform_wrapper select:focus,
.hrw-contact-form .gform_wrapper textarea:focus {
	outline: none !important;
	border-color: var(--hrw-blue) !important;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

.hrw-contact-form .gform_wrapper textarea {
	min-height: 120px !important;
	resize: vertical !important;
}

.hrw-contact-form .gform_wrapper .gform_button,
.hrw-contact-form .gform_wrapper input[type="submit"] {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 8px !important;
	padding: 14px 28px !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	border: none !important;
	border-radius: var(--hrw-border-radius) !important;
	cursor: pointer !important;
	transition: all 0.2s ease !important;
	text-decoration: none !important;
	background: var(--hrw-blue) !important;
	color: var(--hrw-white) !important;
	font-family: inherit !important;
}

.hrw-contact-form .gform_wrapper .gform_button:hover,
.hrw-contact-form .gform_wrapper input[type="submit"]:hover {
	background: #2563eb !important;
	transform: translateY(-1px) !important;
	box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
}

.hrw-contact-form .gform_wrapper .gfield_required {
	color: var(--hrw-red) !important;
}

.hrw-contact-form .gform_wrapper .validation_error,
.hrw-contact-form .gform_wrapper .gfield_error {
	border-color: var(--hrw-red) !important;
}

.hrw-contact-form .gform_wrapper .validation_message {
	color: var(--hrw-red) !important;
	font-size: 13px !important;
	margin-top: 4px !important;
}

.hrw-contact-form .gform_wrapper .gform_confirmation_message {
	padding: 24px !important;
	background: rgba(34, 197, 94, 0.1) !important;
	border-radius: var(--hrw-border-radius) !important;
	color: var(--hrw-green) !important;
	font-size: 15px !important;
	text-align: center !important;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 1024px) {
	.hrw-portal__grid {
		grid-template-columns: 1fr;
	}

	.hrw-portal__sidebar {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 24px;
	}

	.hrw-portal__three-column {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 768px) {
	.hrw-portal__header-content {
		flex-direction: column;
		align-items: flex-start;
	}

	.hrw-portal__logo-icon {
		font-size: 36px;
	}

	.hrw-portal__logo-title {
		font-size: 20px;
	}

	.hrw-portal__logo-subtitle {
		font-size: 12px;
	}

	.hrw-portal__event-dates {
		font-size: 16px;
	}

	.hrw-portal__main {
		padding: 24px 0;
	}

	.hrw-portal__container {
		padding: 0 16px;
	}

	.hrw-portal__sidebar {
		grid-template-columns: 1fr;
	}

	.hrw-card__header {
		padding: 20px;
		flex-direction: column;
		align-items: stretch;
	}

	.hrw-card__title {
		font-size: 20px;
	}

	.hrw-card__body {
		padding: 20px;
	}

	.hrw-button {
		width: 100%;
	}

	/* Mobile Table Cards */
	.hrw-table {
		display: block;
	}

	.hrw-table__head {
		display: none;
	}

	.hrw-table__body {
		display: block;
	}

	.hrw-table__row {
		display: block;
		margin-bottom: 24px;
		border: 1px solid var(--hrw-gray-200);
		border-radius: var(--hrw-border-radius-sm);
		padding: 16px;
		background: var(--hrw-white);
	}

	.hrw-table__row:hover {
		background: var(--hrw-white);
		box-shadow: var(--hrw-shadow);
	}

	.hrw-table__td {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 12px 0;
		border-bottom: 1px solid var(--hrw-gray-100);
	}

	.hrw-table__td:last-child {
		border-bottom: none;
	}

	.hrw-table__td::before {
		content: attr(data-label);
		font-weight: 700;
		color: var(--hrw-gray-700);
		font-size: 13px;
		text-transform: uppercase;
		letter-spacing: 0.5px;
	}

	.hrw-table__td--restaurant {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
	}

	.hrw-table__td--restaurant::before {
		margin-bottom: 4px;
	}

	.hrw-action-buttons {
		justify-content: flex-end;
	}

	/* Previous Events Mobile */
	.hrw-previous-table {
		display: block;
	}

	.hrw-previous-table__head {
		display: none;
	}

	.hrw-previous-table__body {
		display: block;
	}

	.hrw-previous-table__row {
		display: block;
		margin-bottom: 16px;
		border: 1px solid var(--hrw-gray-200);
		border-radius: var(--hrw-border-radius-sm);
		padding: 12px;
		background: var(--hrw-white);
	}

	.hrw-previous-table__td {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 10px 0;
		border-bottom: 1px solid var(--hrw-gray-100);
	}

	.hrw-previous-table__td:last-child {
		border-bottom: none;
	}

	.hrw-previous-table__td::before {
		content: attr(data-label);
		font-weight: 700;
		color: var(--hrw-gray-700);
		font-size: 12px;
		text-transform: uppercase;
		letter-spacing: 0.5px;
	}

	.hrw-previous-table__td[data-label="Invoice"],
	.hrw-previous-table__td[data-label="Meal Counts"],
	.hrw-previous-table__td[data-label="Actions"] {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}

	.hrw-previous-table__td[data-label="Actions"] .hrw-action-buttons {
		flex-direction: column;
		gap: 8px;
	}

	.hrw-empty-state {
		padding: 48px 16px;
	}

	.hrw-empty-state__icon {
		font-size: 48px;
	}

	.hrw-empty-state__title {
		font-size: 20px;
	}

	.hrw-empty-state__description {
		font-size: 15px;
	}

	.hrw-empty-state__actions {
		flex-direction: column;
	}

	.hrw-action-buttons .hrw-button {
		width: auto;
	}
}

@media (max-width: 480px) {
	.hrw-action-buttons {
		width: 100%;
	}

	.hrw-action-buttons .hrw-button--small {
		flex: 1;
		min-width: 0;
		padding: 8px 12px;
		font-size: 13px;
	}

	.hrw-icon-button {
		padding: 6px;
	}
}

/* Donation cell with small links */
.hrw-donation-cell {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
}

.hrw-donation-links {
	display: flex;
	gap: 8px;
	margin-top: 2px;
}

.hrw-link--small {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	font-size: 11px;
	color: var(--hrw-gray-500);
	text-decoration: none;
	transition: color 0.2s ease;
}

.hrw-link--small:hover {
	color: var(--hrw-primary);
	text-decoration: underline;
}

.hrw-link--small svg {
	flex-shrink: 0;
}

/* ========================================
   Revision Banner Styles (inside row)
   ======================================== */


.hrw-revision-banner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 10px 16px;
	background: var(--hrw-gray-100);
	border-radius: var(--hrw-border-radius-sm);
	border-left: 3px solid var(--hrw-gray-300);
}

.hrw-revision-banner__info {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--hrw-gray-600);
	flex-wrap: wrap;
}

.hrw-revision-banner__info svg {
	flex-shrink: 0;
	stroke: var(--hrw-gray-400);
}

.hrw-revision-banner__label {
	font-weight: 500;
	color: var(--hrw-gray-500);
}

.hrw-revision-banner__info strong {
	font-weight: 500;
	color: var(--hrw-gray-700);
}

.hrw-revision-banner__date {
	color: var(--hrw-gray-400);
}

.hrw-revision-banner__actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.hrw-revision-banner__actions .hrw-button {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 12px;
	padding: 6px 12px;
}

.hrw-revision-banner__actions .hrw-button svg {
	flex-shrink: 0;
}

/* Danger outline button variant for revision banner */
.hrw-revision-banner__actions .hrw-button.hrw-button--danger.hrw-button--outline {
	color: var(--hrw-gray-500);
	border-color: var(--hrw-gray-300);
	background: transparent;
}

.hrw-revision-banner__actions .hrw-button.hrw-button--danger.hrw-button--outline:hover {
	color: var(--hrw-error);
	border-color: var(--hrw-error);
	background: rgba(239, 68, 68, 0.05);
}

/* Mobile responsive */
@media (max-width: 768px) {
	.hrw-revision-row__spacer {
		display: none;
	}

	.hrw-revision-row__content {
		padding: 12px !important;
	}

	.hrw-revision-banner {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}

	.hrw-revision-banner__actions {
		width: 100%;
	}

	.hrw-revision-banner__actions .hrw-button {
		flex: 1;
		justify-content: center;
	}
}

/* Revision banner state variants */
.hrw-revision-banner--pending {
	background: #fef3c7;
	border-left-color: #f59e0b;
}

.hrw-revision-banner--pending .hrw-revision-banner__info svg {
	stroke: #f59e0b;
}

.hrw-revision-banner--pending .hrw-revision-banner__info strong {
	color: #92400e;
}

.hrw-revision-banner--pending .hrw-revision-banner__status-text {
	font-size: 12px;
	color: #92400e;
	font-style: italic;
}

.hrw-revision-banner--attention {
	background: #fef2f2;
	border-left-color: #ef4444;
}

.hrw-revision-banner--attention .hrw-revision-banner__info svg {
	stroke: #ef4444;
}

.hrw-revision-banner--attention .hrw-revision-banner__info strong {
	color: #991b1b;
}

.hrw-revision-banner__status-text {
	font-size: 12px;
	color: var(--hrw-gray-500);
	font-style: italic;
}