/*
 * IDU Listings - submission form and my-listings.
 * Placeholder styling pending the Stage 1 brand. Recolour via --idu-accent.
 */

.idu-sub {
	--idu-accent: #1b7a4b;
	--idu-ink: #1c2024;
	--idu-muted: #6b7280;
	--idu-line: #e5e7eb;
	--idu-radius: 12px;
	max-width: 820px;
	margin: 0 auto;
	color: var(--idu-ink);
	box-sizing: border-box;
}

.idu-sub *,
.idu-sub *::before,
.idu-sub *::after {
	box-sizing: border-box;
}

/* Notices */
.idu-sub-notice,
.idu-sub-success,
.idu-sub-error {
	padding: 14px 18px;
	border-radius: var(--idu-radius);
	margin-bottom: 18px;
	font-size: 0.95rem;
}

.idu-sub-notice {
	background: #f4f6f7;
	border: 1px solid var(--idu-line);
}

.idu-sub-success {
	background: #e7f4ec;
	border: 1px solid #b7dcc5;
	color: #176b41;
}

.idu-sub-error {
	background: #fdecec;
	border: 1px solid #f3c2c2;
	color: #b42424;
}

.idu-sub-notice a,
.idu-sub-success a {
	color: var(--idu-accent);
}

/* Form */
.idu-sub-form {
	background: #fff;
	border: 1px solid var(--idu-line);
	border-radius: var(--idu-radius);
	padding: 24px;
}

.idu-sub-heading {
	margin: 0 0 14px;
	font-size: 1.15rem;
}

.idu-sub-types {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 22px;
}

.idu-sub-type {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border: 1px solid var(--idu-line);
	border-radius: 999px;
	cursor: pointer;
	font-weight: 600;
	font-size: 0.92rem;
}

.idu-sub-type input {
	accent-color: var(--idu-accent);
}

.idu-sub-row {
	margin-bottom: 16px;
}

.idu-sub-label {
	display: block;
	font-size: 0.88rem;
	font-weight: 600;
	margin-bottom: 6px;
}

.idu-req {
	color: #b42424;
}

.idu-sub-form input[type="text"],
.idu-sub-form input[type="number"],
.idu-sub-form input[type="date"],
.idu-sub-form input[type="file"],
.idu-sub-form select,
.idu-sub-form textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--idu-line);
	border-radius: 8px;
	background: #fff;
	font-size: 0.92rem;
	font-family: inherit;
}

.idu-sub-form textarea {
	resize: vertical;
}

.idu-sub-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0 18px;
}

@media ( min-width: 600px ) {
	.idu-sub-grid {
		grid-template-columns: 1fr 1fr;
	}
}

.idu-sub-checks {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px 16px;
}

@media ( min-width: 600px ) {
	.idu-sub-checks {
		grid-template-columns: repeat( 3, 1fr );
	}
}

.idu-sub-check {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.9rem;
	cursor: pointer;
}

.idu-sub-check input {
	accent-color: var(--idu-accent);
}

.idu-sub-bills {
	margin-top: 12px;
}

.idu-sub-hint {
	margin: 6px 0 0;
	font-size: 0.82rem;
	color: var(--idu-muted);
}

/* Drag and drop uploader */
.idu-dropzone {
	position: relative;
	border: 2px dashed var(--idu-line);
	border-radius: var(--idu-radius);
	padding: 32px 20px;
	text-align: center;
	cursor: pointer;
	background: #fafbfb;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.idu-dropzone:hover,
.idu-dropzone.dragover {
	border-color: var(--idu-accent);
	background: #f1f8f4;
}

.idu-dropzone-input {
	display: none;
}

.idu-dropzone-prompt {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	color: var(--idu-muted);
	pointer-events: none;
}

.idu-dropzone-ico .idu-ico {
	width: 30px;
	height: 30px;
	color: var(--idu-accent);
}

.idu-dropzone-text {
	font-size: 0.95rem;
	color: var(--idu-ink);
}

.idu-dropzone-browse {
	color: var(--idu-accent);
	font-weight: 600;
	text-decoration: underline;
}

.idu-dropzone small {
	font-size: 0.8rem;
}

.idu-previews {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 12px;
}

.idu-preview {
	position: relative;
	width: 92px;
	height: 92px;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid var(--idu-line);
}

.idu-preview img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.idu-preview-x {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: none;
	background: rgba( 0, 0, 0, 0.6 );
	color: #fff;
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.idu-preview-x:hover {
	background: #d63638;
}

.idu-btn {
	display: inline-block;
	background: var(--idu-accent);
	color: #fff;
	text-decoration: none;
	font-weight: 600;
	padding: 12px 26px;
	border: none;
	border-radius: 999px;
	cursor: pointer;
	font-size: 0.95rem;
}

.idu-btn:hover {
	filter: brightness( 0.93 );
	color: #fff;
}

.idu-sub-submit {
	margin-top: 8px;
}

/* My listings */
.idu-sub-new {
	margin-bottom: 18px;
}

.idu-my-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.92rem;
}

.idu-my-table th,
.idu-my-table td {
	text-align: left;
	padding: 11px 10px;
	border-bottom: 1px solid var(--idu-line);
	vertical-align: middle;
}

.idu-my-table th {
	color: var(--idu-muted);
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.idu-my-table a {
	color: var(--idu-accent);
	text-decoration: none;
}

.idu-status {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 600;
}

.idu-status-publish {
	background: #e7f4ec;
	color: #176b41;
}

.idu-status-pending {
	background: #fdf3e3;
	color: #9a6700;
}

.idu-status-draft {
	background: #f0f0f1;
	color: #50575e;
}

.idu-my-actions a {
	margin-right: 10px;
}

.idu-my-del {
	color: #b42424 !important;
}

.idu-sub-empty {
	color: var(--idu-muted);
}

/* Inside the BuddyBoss profile: drop our card chrome and adopt BuddyBoss's
 * own colour variables so the content matches the native member area. */
.buddypress .idu-sub {
	max-width: none;
	margin: 0;
}

.buddypress .idu-sub-form,
.buddypress .idu-my-listings {
	background: transparent;
	border: none;
	padding: 0;
}

.buddypress .idu-sub .idu-btn {
	background: var( --bb-primary-color, #1b7a4b );
	border-radius: var( --bb-button-radius, 4px );
	padding: 9px 20px;
}

.buddypress .idu-sub a:not( .idu-btn ):not( .idu-my-del ) {
	color: var( --bb-primary-color, #1b7a4b );
}

.buddypress .idu-my-table th,
.buddypress .idu-my-table td {
	border-bottom-color: var( --bb-content-border-color, #e5e7eb );
}

.buddypress .idu-my-table th {
	color: var( --bb-body-secondary-text-color, #6b7280 );
}

.buddypress .idu-status-publish {
	background: var( --bb-success-color-fonts, #176b41 );
	color: #fff;
}

/* Embedded WooCommerce account content inside the profile tabs */
.idu-wc-account .woocommerce-MyAccount-content {
	padding: 0;
	width: 100%;
}

.idu-wc-account form .button,
.idu-wc-account .woocommerce-Button,
.idu-wc-account button[type="submit"] {
	background: var( --bb-primary-color, #1b7a4b );
	color: #fff;
	border: none;
	border-radius: var( --bb-button-radius, 4px );
	padding: 10px 22px;
	cursor: pointer;
}

.idu-wc-account table.woocommerce-orders-table,
.idu-wc-account table.shop_table {
	width: 100%;
	border-collapse: collapse;
}

.idu-wc-account table.shop_table th,
.idu-wc-account table.shop_table td {
	padding: 11px 10px;
	border-bottom: 1px solid var( --bb-content-border-color, #e5e7eb );
	text-align: left;
}

.idu-wc-account .woocommerce-Address {
	margin-top: 10px;
}
