/* =========================================================
   Teklif Sidebar & Hizmet Seçici
   ========================================================= */

/* Backdrop */
.teklif-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 1100;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.teklif-backdrop.is-visible {
	opacity: 1;
	pointer-events: auto;
}

/* =========================================================
   Teklif Sidebar (sağ drawer)
   ========================================================= */

.teklif-sidebar {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: 420px;
	max-width: 100vw;
	background: #fff;
	z-index: 1200;
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
	/* Picker açıkken sidebar görünür kalır */
	isolation: isolate;
}

.teklif-sidebar.is-open {
	transform: translateX(0);
}

.teklif-sidebar__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px;
	background-color: var(--primary-color, #ed1c24);
	flex-shrink: 0;
}

.teklif-sidebar__title {
	font-size: 1.1rem;
	font-weight: 700;
	color: #fff;
	margin: 0;
}

.teklif-sidebar__close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
	cursor: pointer;
	transition: background 0.2s;
	padding: 0;
}

.teklif-sidebar__close:hover {
	background: rgba(255, 255, 255, 0.35);
}

.teklif-sidebar__body {
	flex: 1;
	overflow-y: auto;
	padding: 24px;
}

.teklif-sidebar__form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.teklif-sidebar__field-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.teklif-sidebar__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.teklif-sidebar__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.teklif-sidebar__label {
	font-size: 0.82rem;
	font-weight: 600;
	color: #333;
}

.teklif-sidebar__label span {
	color: var(--primary-color, #ed1c24);
}

.teklif-sidebar__input,
.teklif-sidebar__textarea {
	width: 100%;
	padding: 10px 14px;
	border: 1.5px solid #e0e0e0;
	border-radius: 8px;
	font-size: 0.875rem;
	font-family: inherit;
	color: #222;
	background: #fafafa;
	transition: border-color 0.2s;
	box-sizing: border-box;
}

.teklif-sidebar__input:focus,
.teklif-sidebar__textarea:focus {
	outline: none;
	border-color: var(--primary-color, #ed1c24);
	background: #fff;
}

.teklif-sidebar__textarea {
	resize: vertical;
	min-height: 100px;
}

/* Seçilen hizmetler listesi */
.teklif-selected-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.teklif-selected-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	border: 1.5px solid #e8e8e8;
	border-radius: 8px;
	background: #f9f9f9;
}

.teklif-selected-item__thumb {
	width: 36px;
	height: 36px;
	border-radius: 6px;
	object-fit: cover;
	flex-shrink: 0;
	background: #eee;
}

.teklif-selected-item__thumb--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #e8e8e8;
	color: #aaa;
	font-size: 0.65rem;
	font-weight: 600;
	letter-spacing: 0.03em;
}

.teklif-selected-item__title {
	flex: 1;
	font-size: 0.82rem;
	font-weight: 600;
	color: #222;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.teklif-selected-item__remove {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: none;
	background: var(--primary-color, #ed1c24);
	color: #fff;
	cursor: pointer;
	padding: 0;
	flex-shrink: 0;
	transition: opacity 0.2s;
}

.teklif-selected-item__remove:hover {
	opacity: 0.8;
}

/* Hizmet ekle butonu */
.teklif-add-service-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 11px;
	border: 1.5px dashed #ccc;
	border-radius: 8px;
	background: transparent;
	color: #555;
	font-size: 0.875rem;
	font-weight: 500;
	font-family: inherit;
	cursor: pointer;
	transition: border-color 0.2s, color 0.2s;
}

.teklif-add-service-btn:hover {
	border-color: var(--primary-color, #ed1c24);
	color: var(--primary-color, #ed1c24);
}

/* Submit butonu */
.teklif-sidebar__submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 14px;
	background-color: var(--primary-color, #ed1c24);
	color: #fff;
	font-size: 0.95rem;
	font-weight: 700;
	font-family: inherit;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: opacity 0.2s;
	margin-top: 4px;
}

.teklif-sidebar__submit:hover {
	opacity: 0.88;
}

/* Ara butonu */
.teklif-sidebar__call-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 13px;
	background: #f0f0f0;
	color: #222;
	font-size: 0.9rem;
	font-weight: 600;
	border-radius: 8px;
	text-decoration: none;
	transition: background 0.2s;
}

.teklif-sidebar__call-btn:hover {
	background: #e4e4e4;
}

/* =========================================================
   Hizmet Seçici (sol drawer)
   ========================================================= */

.teklif-service-picker {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	width: 520px;
	max-width: calc(100vw - 420px);
	background: #fff;
	z-index: 1400;
	display: flex;
	flex-direction: column;
	transform: translateX(-100%);
	transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
}

.teklif-service-picker.is-open {
	transform: translateX(0);
}

.teklif-service-picker__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 20px;
	border-bottom: 1px solid #eee;
	flex-shrink: 0;
}

.teklif-service-picker__title {
	font-size: 1rem;
	font-weight: 700;
	color: #222;
	margin: 0;
}

.teklif-service-picker__close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 1.5px solid #e0e0e0;
	background: transparent;
	color: #555;
	cursor: pointer;
	padding: 0;
	transition: border-color 0.2s, color 0.2s;
}

.teklif-service-picker__close:hover {
	border-color: var(--primary-color, #ed1c24);
	color: var(--primary-color, #ed1c24);
}

.teklif-service-picker__grid {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 12px;
	align-content: start;
}

.teklif-service-picker__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 10px 6px;
	border: 1.5px solid #e8e8e8;
	border-radius: 10px;
	cursor: pointer;
	text-align: center;
	transition: border-color 0.2s, background 0.2s;
	background: #fafafa;
}

.teklif-service-picker__item:hover {
	border-color: var(--primary-color, #ed1c24);
	background: #fff;
}

.teklif-service-picker__item.is-selected {
	border-color: var(--primary-color, #ed1c24);
	background: #fff5f5;
}

.teklif-service-picker__item-thumb {
	width: 60px;
	height: 60px;
	border-radius: 8px;
	object-fit: cover;
	background: #eee;
}

.teklif-service-picker__item-thumb--placeholder {
	width: 60px;
	height: 60px;
	border-radius: 8px;
	background: #e8e8e8;
	display: flex;
	align-items: center;
	justify-content: center;
}

.teklif-service-picker__item-title {
	font-size: 0.7rem;
	font-weight: 600;
	color: #333;
	line-height: 1.3;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.teklif-service-picker__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 20px;
	border-top: 1px solid #eee;
	flex-shrink: 0;
}

.teklif-service-picker__count {
	font-size: 0.82rem;
	color: #777;
}

.teklif-service-picker__confirm {
	padding: 10px 24px;
	background-color: var(--primary-color, #ed1c24);
	color: #fff;
	font-size: 0.875rem;
	font-weight: 700;
	font-family: inherit;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: opacity 0.2s;
}

.teklif-service-picker__confirm:hover {
	opacity: 0.88;
}

.teklif-sidebar__notice {
	padding: 12px 14px;
	border: 1px solid transparent;
	border-radius: 8px;
	font-size: 0.84rem;
	line-height: 1.5;
}

.teklif-sidebar__notice--success {
	border-color: #a8d5b5;
	background: #edf8f0;
	color: #246b38;
}

.teklif-sidebar__notice--error {
	border-color: #efb0b0;
	background: #fff0f0;
	color: #9b2424;
}

/* Responsive */
@media (max-width: 768px) {
	.teklif-sidebar {
		width: 100vw;
	}

	.teklif-sidebar__row {
		grid-template-columns: 1fr;
	}

	/* Picker mobilde alttan yukarı açılır */
	.teklif-service-picker {
		top: auto;
		bottom: 0;
		left: 0;
		right: 0;
		width: 100vw;
		max-width: 100vw;
		max-height: 85vh;
		border-radius: 20px 20px 0 0;
		transform: translateY(100%);
		box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
	}

	.teklif-service-picker.is-open {
		transform: translateY(0);
	}

	.teklif-service-picker__grid {
		grid-template-columns: 1fr 1fr 1fr;
	}
}
