/* ==========================================================================
   Wigwam Offers — Front-end styles
   Dashboard table, status badges, filter bar, edit panel, flash messages
   ========================================================================== */

/* Teal primary: #1a7070  Hover: #155858 */

/* --------------------------------------------------------------------------
   Back-to-dashboard link
   -------------------------------------------------------------------------- */

/* Legacy class — kept for GravityView injected link */
.staff-dashboard-link-inline {
	display: inline-block;
	font-size: .85em;
	color: #1a7070;
	text-decoration: none;
}

.staff-dashboard-link-inline:hover,
.staff-dashboard-link-inline:focus {
	text-decoration: underline;
	color: #155858;
}

/* Top-right dashboard button bar */
.wo-page-header {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 1em;
}


/* --------------------------------------------------------------------------
   Flash / notice messages
   -------------------------------------------------------------------------- */

.wo-flash {
	padding: .6em 1em;
	border-left: 3px solid currentColor;
	border-radius: 3px;
	margin-bottom: 1em;
	font-size: .875em;
}

.wo-flash--success {
	color: #0a5c2f;
	background: #eafbf0;
	border-color: #00a32a;
}

.wo-flash--error {
	color: #7a1414;
	background: #fdf0f0;
	border-color: #d63638;
}

.wo-notice {
	padding: .7em 1em;
	border-left: 3px solid currentColor;
	border-radius: 3px;
	margin-bottom: 1.25em;
	font-size: .9em;
}

.wo-notice--warn {
	color: #7a5900;
	background: #fff8e5;
	border-color: #dba617;
}

.wo-notice--error {
	color: #7a1414;
	background: #fdf0f0;
	border-color: #d63638;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.wo-btn {
	display: inline-block;
	padding: .45em 1em;
	border-radius: 3px;
	text-decoration: none;
	font-size: .875em;
	font-weight: 600;
	cursor: pointer;
	border: none;
	line-height: 1.4;
	white-space: nowrap;
}

.wo-btn--primary {
	background: #1a7070;
	color: #fff;
}

.wo-btn--primary:hover,
.wo-btn--primary:focus {
	background: #155858;
	color: #fff;
}

.wo-btn--secondary {
	background: #f0f0f1;
	color: #3c434a;
	border: 1px solid #c3c4c7;
}

.wo-btn--secondary:hover,
.wo-btn--secondary:focus {
	background: #dcdcde;
	color: #3c434a;
}

.wo-btn--sm {
	padding: .3em .7em;
	font-size: .8em;
}

/* --------------------------------------------------------------------------
   Dashboard wrapper + header
   -------------------------------------------------------------------------- */

.wo-dashboard {
	font-size: .9em;
}

.wo-dashboard__header {
	display: flex;
	align-items: center;
	gap: .75em;
	margin-bottom: .9em;
	flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Filter bar
   -------------------------------------------------------------------------- */

.wo-filter-bar {
	display: flex;
	flex-wrap: wrap;
	gap: .35em;
	margin-bottom: .85em;
	padding-bottom: .65em;
	border-bottom: 1px solid #e2e4e7;
}

.wo-filter-bar__tab {
	padding: .28em .75em;
	border-radius: 3px;
	text-decoration: none;
	font-size: .8em;
	color: #3c434a;
	background: #f0f0f1;
	border: 1px solid #c3c4c7;
	transition: background .12s;
}

.wo-filter-bar__tab:hover,
.wo-filter-bar__tab:focus {
	background: #dcdcde;
	color: #3c434a;
}

.wo-filter-bar__tab--active {
	background: #1a7070;
	color: #fff;
	border-color: #1a7070;
}

.wo-filter-bar__tab--active:hover,
.wo-filter-bar__tab--active:focus {
	background: #155858;
	color: #fff;
}

/* --------------------------------------------------------------------------
   Offers table
   -------------------------------------------------------------------------- */

.wo-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border: 1px solid #dde1e5;
	border-radius: 4px;
}

.wo-table {
	width: 100%;
	border-collapse: collapse;
	font-size: .85em;
	min-width: 820px;
	margin: 0;
}

.wo-table th,
.wo-table td {
	text-align: left;
	padding: .38em .6em;
	border-bottom: 1px solid #e8eaed;
	vertical-align: middle;
}

.wo-table thead th {
	background: #f3f5f6;
	font-weight: 600;
	font-size: .8em;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #5a6370;
	white-space: nowrap;
	border-bottom: 1px solid #dde1e5;
}

.wo-table tbody tr td {
	background: #fff !important;
}

.wo-table tbody tr:nth-child(even) td {
	background: #f6fafa !important;
}

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

.wo-table tbody tr:hover td {
	background: #eaf3f3 !important;
}

.wo-table tbody tr.wo-row--active td {
	background: #dff0f0 !important;
}

/* Column widths */
.wo-table .col-date     { white-space: nowrap; width: 7em; }
.wo-table .col-child    { min-width: 10em; }
.wo-table .col-loc      { white-space: nowrap; }
.wo-table .col-dates    { white-space: nowrap; width: 9em; }
.wo-table .col-status   { white-space: nowrap; width: 8em; }
.wo-table .col-ref      { white-space: nowrap; width: 4em; text-align: center; }
.wo-table .col-accepted { white-space: nowrap; width: 4em; text-align: center; }
.wo-table .col-update   { width: 140px; min-width: 140px; }

/* Child cell */
.wo-table .col-child strong {
	display: block;
	font-weight: 600;
	color: #1a2530;
}

/* Muted secondary text */
.wo-muted {
	color: #7a828c;
	font-size: .9em;
}

/* --------------------------------------------------------------------------
   Inline update form (dropdown + Save + Edit link)
   -------------------------------------------------------------------------- */

.wo-inline-form {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: .3em;
}

.wo-inline-form__select {
	font-size: .8em;
	padding: .28em .4em;
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	background: #fff;
	color: #3c434a;
	width: 100%;
}

.wo-inline-form__btns {
	display: flex;
	align-items: center;
	gap: .5em;
}

.wo-inline-form .wo-btn--sm {
	background: #1a7070;
	color: #fff;
	border: none;
	border-radius: 3px;
	cursor: pointer;
	flex-shrink: 0;
}

.wo-inline-form .wo-btn--sm:hover,
.wo-inline-form .wo-btn--sm:focus {
	background: #155858;
}

.wo-inline-edit-link {
	font-size: .75em;
	color: #7a828c;
	text-decoration: none;
}

.wo-inline-edit-link:hover,
.wo-inline-edit-link:focus {
	color: #1a7070;
	text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Status badges
   -------------------------------------------------------------------------- */

.wo-status {
	display: inline-block;
	padding: .2em .5em;
	border-radius: 3px;
	font-size: .75em;
	font-weight: 700;
	white-space: nowrap;
	text-transform: uppercase;
	letter-spacing: .04em;
}

.wo-status--offer-sent {
	background: #deeeff;
	color: #0d4875;
}

.wo-status--accepted {
	background: #d6f5eb;
	color: #0a5c2f;
}

.wo-status--declined {
	background: #fce8e8;
	color: #7a1414;
}

.wo-status--expired {
	background: #ebebeb;
	color: #5a6370;
}

.wo-status--withdrawn {
	background: #fff4d6;
	color: #7a5900;
}

/* --------------------------------------------------------------------------
   Edit panel
   -------------------------------------------------------------------------- */

.wo-edit-panel {
	background: #fff;
	border: 1px solid #dde1e5;
	border-radius: 4px;
	padding: 1.1em 1.4em;
	margin-bottom: 1.25em;
	box-shadow: 0 1px 3px rgba(0,0,0,.06);
	font-size: .9em;
}

.wo-edit-panel__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: .85em;
	padding-bottom: .5em;
	border-bottom: 1px solid #e8eaed;
}

.wo-edit-panel__title {
	margin: 0;
	font-size: 1em;
	font-weight: 700;
	color: #1a2530;
}

.wo-edit-panel__close {
	font-size: .8em;
	color: #7a828c;
	text-decoration: none;
}

.wo-edit-panel__close:hover {
	color: #d63638;
}

.wo-edit-panel__summary {
	background: #f6f7f8;
	border-radius: 3px;
	padding: .6em .9em;
	margin-bottom: 1em;
	display: flex;
	flex-wrap: wrap;
	gap: .25em 1.25em;
}

.wo-edit-panel__field {
	font-size: .875em;
	color: #3c434a;
}

.wo-edit-panel__field strong {
	color: #5a6370;
	font-weight: 600;
}

.wo-edit-panel__form .wo-field-row {
	margin-bottom: .75em;
}

.wo-edit-panel__form .wo-field-row__label {
	display: block;
	font-weight: 600;
	font-size: .875em;
	margin-bottom: .25em;
	color: #3c434a;
}

.wo-edit-panel__form .wo-field-row__input {
	font-size: .875em;
}

.wo-edit-panel__form input[type="text"],
.wo-edit-panel__form input[type="date"],
.wo-edit-panel__form select {
	max-width: 320px;
	width: 100%;
}

.wo-edit-panel__form textarea.wo-field-row__input {
	max-width: 480px;
	width: 100%;
	height: 70px;
}

.wo-field-row--full .wo-field-row__help {
	font-size: .8em;
	color: #7a828c;
	margin-top: .25em;
}

.wo-edit-panel__actions {
	display: flex;
	gap: .5em;
	margin-top: .85em;
	padding-top: .65em;
	border-top: 1px solid #e8eaed;
}

/* --------------------------------------------------------------------------
   Empty state
   -------------------------------------------------------------------------- */

.wo-no-entries {
	padding: 2em 1em;
	text-align: center;
	color: #7a828c;
	font-style: italic;
}

/* --------------------------------------------------------------------------
   GravityView table styling (matches Offers Dashboard table)
   -------------------------------------------------------------------------- */

@media screen {

table.gv-table-view {
	width: 100%;
	border-collapse: collapse;
	font-size: .9em;
	margin: 0;
}

table.gv-table-view th,
table.gv-table-view td {
	text-align: left;
	padding: .45em .7em;
	border-bottom: 1px solid #e8eaed;
	vertical-align: top;
}

table.gv-table-view thead th {
	background: #f3f5f6 !important;
	font-weight: 600;
	font-size: .8em;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #5a6370;
	white-space: nowrap;
	border-bottom: 1px solid #dde1e5;
}

table.gv-table-view tbody tr td {
	background: #fff !important;
}

table.gv-table-view tbody tr:nth-child(even) td {
	background: #f6fafa !important;
}

table.gv-table-view tbody tr:last-child td {
	border-bottom: none;
}

table.gv-table-view tbody tr:hover td {
	background: #eaf3f3 !important;
}

/* Single entry view */
table.gv-table-view-content {
	width: 100%;
	border-collapse: collapse;
	font-size: .9em;
	margin: 0;
}

table.gv-table-view-content th,
table.gv-table-view-content td {
	text-align: left;
	padding: .45em .7em;
	border-bottom: 1px solid #e8eaed;
	vertical-align: top;
}

table.gv-table-view-content tbody tr td {
	background: #fff !important;
}

table.gv-table-view-content tbody tr:nth-child(even) td,
table.gv-table-view-content tbody tr:nth-child(even) th {
	background: #f6fafa !important;
}

table.gv-table-view-content tbody tr:nth-child(odd) th {
	background: #fff !important;
}

table.gv-table-view-content tbody tr:last-child td,
table.gv-table-view-content tbody tr:last-child th {
	border-bottom: none;
}

table.gv-table-view-content tbody tr:hover td,
table.gv-table-view-content tbody tr:hover th {
	background: #eaf3f3 !important;
}

/* Label column (th scope="row") */
table.gv-table-view-content tbody th {
	font-weight: 600;
	color: #3c434a;
	width: 35%;
	background: #f3f5f6 !important;
}

.gv-table-container,
.gv-container {
	border: 1px solid #dde1e5;
	border-radius: 4px;
	overflow: hidden;
}

body.single-gravityview {
	background-color: #f5f0eb !important;
}

} /* end @media screen */



/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

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

	.wo-edit-panel__summary {
		flex-direction: column;
		gap: .2em;
	}
}
