/* ============================================================
   Intersections Speed Date Booking – Styles
   ============================================================ */

/* ---- Wrapper ------------------------------------------------ */
.isd-wrap {
	width: 100%;
}

/* ---- Section titles ----------------------------------------- */
.isd-section-title {
	font-size: 1rem;
	font-weight: 700;
	margin: 0 0 1rem;
	color: inherit;
}

/* ---- Login notice ------------------------------------------- */
.isd-notice {
	padding: .75rem 1rem;
	background: #f0f4f8;
	border-radius: 6px;
	font-size: .9rem;
}

/* ---- Cascading form grid ------------------------------------ */
.isd-form {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
	align-items: flex-end;
	background: #fff;
	border: 1px solid #d1d9e6;
	border-radius: 8px;
	padding: 1.25rem 1rem;
}

.isd-col {
	display: flex;
	flex-direction: column;
	min-width: 160px;
	flex: 1;
}

.isd-cta-col {
	flex: 0 0 auto;
	min-width: unset;
}

/* ---- Labels ------------------------------------------------- */
.isd-label {
	font-size: .75rem;
	font-weight: 600;
	color: #374151;
	margin-bottom: .4rem;
	letter-spacing: .03em;
	text-transform: uppercase;
}

/* ---- Native select (company + day) -------------------------- */
.isd-native-select-wrap {
	position: relative;
	display: flex;
	align-items: center;
	border: 1px solid #d1d9e6;
	border-radius: 6px;
	background: #fff;
	overflow: hidden;
}

.isd-native-select-wrap .isd-chevron {
	position: absolute;
	right: .6rem;
	top: 50%;
	transform: translateY(-50%) rotate(180deg);
	pointer-events: none;
	font-size: .7rem;
	color: #374151;
}

.isd-select {
	appearance: none;
	-webkit-appearance: none;
	border: none;
	background: transparent;
	padding: .5rem 2rem .5rem .75rem;
	width: 100%;
	font-size: .875rem;
	color: #374151;
	cursor: pointer;
	outline: none;
}

.isd-select:disabled {
	opacity: .5;
	cursor: not-allowed;
}

/* ---- Custom slot picker ------------------------------------- */
.isd-slot-wrap {
	position: relative;
	border: 1px solid #d1d9e6;
	border-radius: 6px;
	background: #fff;
}

.isd-slot-trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: .5rem .75rem;
	cursor: pointer;
	font-size: .875rem;
	color: #374151;
	user-select: none;
	min-height: 38px;
}

.isd-slot-trigger.isd-disabled {
	opacity: .5;
	cursor: not-allowed;
	pointer-events: none;
}

.isd-slot-trigger .isd-chevron {
	font-size: .7rem;
	margin-left: .5rem;
	transition: transform .2s;
}

.isd-slot-trigger.isd-open .isd-chevron {
	transform: rotate(180deg);
}

/* Dropdown list */
.isd-slot-list {
	position: absolute;
	top: calc(100% + 2px);
	left: 0;
	right: 0;
	z-index: 999;
	background: #fff;
	border: 1px solid #d1d9e6;
	border-radius: 6px;
	box-shadow: 0 4px 12px rgba(0,0,0,.12);
	max-height: 220px;
	overflow-y: auto;
}

/* Slot items -------------------------------------------------- */
.isd-slot-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: .5rem .75rem;
	font-size: .875rem;
	cursor: pointer;
	transition: filter .15s;
	border-bottom: 1px solid rgba(0,0,0,.05);
}

.isd-slot-item:last-child {
	border-bottom: none;
}

/* BIANCO – disponibile */
.isd-slot-item.isd-available {
	background: #ffffff;
	color: #111827;
}
.isd-slot-item.isd-available:hover {
	filter: brightness(.96);
}

/* ARANCIO – in attesa di conferma */
.isd-slot-item.isd-pending {
	background: #fff7ed;
	color: #92400e;
	cursor: not-allowed;
}

/* ROSSO – confermato / chiuso */
.isd-slot-item.isd-confirmed {
	background: #fef2f2;
	color: #991b1b;
	cursor: not-allowed;
}

.isd-slot-item.isd-selected {
	outline: 2px solid #374151;
	outline-offset: -2px;
}

.isd-slot-status-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex-shrink: 0;
	margin-left: .5rem;
}
.isd-available .isd-slot-status-dot  { background: #d1d5db; }
.isd-pending  .isd-slot-status-dot   { background: #f97316; }
.isd-confirmed .isd-slot-status-dot  { background: #c0392b; }

/* ---- Submit button ------------------------------------------ */
.isd-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: .5rem 1.25rem;
	background: #111827;
	color: #fff;
	border: 1px solid #111827;
	border-radius: 6px;
	font-size: .875rem;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	transition: background .2s, opacity .2s;
	height: 38px;
}

.isd-btn:disabled {
	opacity: .4;
	cursor: not-allowed;
}

.isd-btn:not(:disabled):hover {
	background: #374151;
	border-color: #374151;
}

/* ---- Feedback banner ---------------------------------------- */
.isd-feedback {
	margin-top: 1rem;
	padding: .75rem 1rem;
	border-radius: 6px;
	font-size: .875rem;
	font-weight: 500;
}
.isd-feedback.isd-success {
	background: #f0fdf4;
	color: #166534;
	border: 1px solid #bbf7d0;
}
.isd-feedback.isd-error {
	background: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
}

/* ---- Requests section --------------------------------------- */
.isd-requests-section {
	margin-top: 2rem;
}

.isd-empty {
	color: #6b7280;
	font-size: .875rem;
}

.isd-table {
	width: 100%;
	border-collapse: collapse;
	font-size: .875rem;
}

.isd-table th,
.isd-table td {
	text-align: left;
	padding: .5rem .75rem;
	border-bottom: 1px solid #e5e7eb;
}

.isd-table th {
	font-weight: 600;
	color: #374151;
	background: #f9fafb;
}

/* Status badges */
.isd-badge {
	display: inline-block;
	padding: .2rem .6rem;
	border-radius: 999px;
	font-size: .75rem;
	font-weight: 600;
}
.isd-badge--pending {
	background: #fff7ed;
	color: #92400e;
	border: 1px solid #fed7aa;
}
.isd-badge--confirmed {
	background: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
}
.isd-badge--cancelled {
	background: #f3f4f6;
	color: #6b7280;
	border: 1px solid #d1d5db;
}

/* ---- Cancel button in requests table ----------------------- */
.isd-cancel-btn {
	padding: .25rem .65rem;
	font-size: .75rem;
	font-weight: 600;
	color: #991b1b;
	background: #fff;
	border: 1px solid #fca5a5;
	border-radius: 4px;
	cursor: pointer;
	white-space: nowrap;
	transition: background .15s, color .15s;
}

.isd-cancel-btn:hover:not(:disabled) {
	background: #fef2f2;
}

.isd-cancel-btn:disabled {
	opacity: .5;
	cursor: not-allowed;
}

/* ---- Searchable company picker ----------------------------- */
.isd-company-wrap {
	position: relative;
	border: 1px solid #d1d9e6;
	border-radius: 6px;
	background: #fff;
}

.isd-company-trigger {
	display: flex;
	align-items: center;
	position: relative;
}

.isd-company-search {
	flex: 1;
	border: none;
	background: transparent;
	padding: .5rem 2rem .5rem .75rem;
	font-size: .875rem;
	color: #374151;
	outline: none;
	width: 100%;
	min-height: 38px;
}

.isd-company-search::placeholder {
	color: #9ca3af;
}

.isd-company-trigger .isd-chevron {
	position: absolute;
	right: .6rem;
	top: 50%;
	transform: translateY(-50%) rotate(180deg);
	pointer-events: none;
	font-size: .7rem;
	color: #374151;
	transition: transform .2s;
}

.isd-company-wrap.isd-open .isd-company-trigger .isd-chevron {
	transform: translateY(-50%) rotate(0deg);
}

.isd-company-list {
	position: absolute;
	top: calc(100% + 2px);
	left: 0;
	right: 0;
	z-index: 999;
	background: #fff;
	border: 1px solid #d1d9e6;
	border-radius: 6px;
	box-shadow: 0 4px 12px rgba(0,0,0,.12);
	max-height: 220px;
	overflow-y: auto;
}

.isd-company-item {
	padding: .5rem .75rem;
	font-size: .875rem;
	color: #374151;
	cursor: pointer;
	border-bottom: 1px solid rgba(0,0,0,.05);
}

.isd-company-item:last-child  { border-bottom: none; }
.isd-company-item:hover       { background: #f9fafb; }
.isd-company-item.isd-selected { background: #f0f4f8; font-weight: 600; }

/* ---- Responsive -------------------------------------------- */
@media (max-width: 600px) {
	.isd-form {
		flex-direction: column;
	}
	.isd-col {
		width: 100%;
	}
	.isd-cta-col {
		width: 100%;
	}
	.isd-btn {
		width: 100%;
	}
}
