/* Hesabım > İade Taleplerim. Tema neyi dayatırsa dayatsın okunur kalsın diye
   ölçüler görecelidir; renkler temanın paletini ezmeyecek şekilde nötr. */

.fbi-muted { color: #6b6b6b; font-size: .9em; }
.fbi-required { color: #b32d2e; }
.fbi-num { text-align: right; }

.fbi-form h3 {
	margin: 1.6em 0 .6em;
	padding-bottom: .3em;
	border-bottom: 1px solid #e3e3e3;
	font-size: 1.05em;
}

.fbi-form label { display: inline-block; margin-bottom: .3em; }
.fbi-form select,
.fbi-form textarea { width: 100%; max-width: 520px; }

.fbi-items,
.fbi-table { width: 100%; border-collapse: collapse; margin-bottom: 1em; }

.fbi-items th,
.fbi-table th {
	text-align: left;
	font-size: .85em;
	text-transform: uppercase;
	letter-spacing: .03em;
	padding: .5em .6em;
	border-bottom: 2px solid #e3e3e3;
}
.fbi-items th.fbi-num,
.fbi-table th.fbi-num { text-align: right; }

.fbi-items td,
.fbi-table td { padding: .6em; border-bottom: 1px solid #eee; vertical-align: middle; }

.fbi-item-label { display: flex; align-items: center; gap: .5em; margin: 0; cursor: pointer; }
.fbi-item-name { font-weight: 500; }

/* Stok kodu ve ürün bağlantısı — ürün adının altında, sönük */
.fbi-item-meta {
	display: block;
	margin-top: .25em;
	font-size: .85em;
	color: #6b6b6b;
}
.fbi-item-meta code {
	background: #f4f4f4;
	padding: 0 .35em;
	border-radius: 3px;
	font-size: .95em;
}
.fbi-qty { width: 80px; text-align: right; }
.fbi-qty:disabled { opacity: .45; }

/* --- İlerleme adımları --- */
.fbi-steps {
	list-style: none;
	margin: 0 0 1.4em;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: .4em;
}
.fbi-step {
	flex: 1 1 120px;
	padding: .55em .7em;
	font-size: .85em;
	text-align: center;
	border-radius: 4px;
	background: #f2f2f2;
	color: #777;
}
.fbi-step-done { background: #e5f3e8; color: #256029; }
.fbi-step-current { background: #1f5f8b; color: #fff; font-weight: 600; }

/* --- Durum rozeti --- */
.fbi-badge {
	display: inline-block;
	padding: .2em .6em;
	border-radius: 999px;
	font-size: .82em;
	background: #f0f0f0;
	color: #444;
	white-space: nowrap;
}
.fbi-badge-onaylandi { background: #e5f3e8; color: #256029; }
.fbi-badge-tamamlandi { background: #d9ead9; color: #1e4620; }
.fbi-badge-reddedildi { background: #fbe6e6; color: #8a1f1f; }
.fbi-badge-vazgecildi { background: #eee; color: #666; }
.fbi-badge-alindi,
.fbi-badge-inceleniyor,
.fbi-badge-odeme_bekliyor { background: #fdf3e0; color: #8a5a00; }

/* --- Onay sonrası gönderim talimatı kutusu --- */
.fbi-box {
	border: 1px solid #d9d9d9;
	border-left: 4px solid #1f5f8b;
	border-radius: 0;
	padding: 1em 1.2em;
	margin-bottom: 1.4em;
	background: #fafafa;
}
.fbi-box h3 { margin-top: 0; }
.fbi-code {
	display: inline-block;
	padding: .15em .5em;
	background: #fff;
	border: 1px solid #ccc;
	font-family: monospace;
	font-size: 1.05em;
	letter-spacing: .04em;
}
.fbi-instructions { margin-top: .6em; white-space: pre-line; }

/* --- Fotoğraflar --- */
.fbi-preview,
.fbi-gallery { display: flex; flex-wrap: wrap; gap: .6em; margin: .6em 0 1.2em; }
.fbi-preview img,
.fbi-gallery img {
	width: 110px;
	height: 110px;
	object-fit: cover;
	border: 1px solid #ddd;
	border-radius: 4px;
	display: block;
}

/* Gönderilmeden önce seçimden çıkarma düğmesi.
   Tema kendi buton stillerini dayattığı için seçici gücü yükseltildi ve
   konumlandırma özellikleri sabitlendi; aksi halde düğme normal akışa düşüp
   resmin altında görünüyordu. */
.fbi-preview .fbi-preview-item {
	position: relative !important;
	display: inline-block !important;
	width: 110px;
	height: 110px;
	line-height: 0;
}

.fbi-preview .fbi-preview-item img {
	width: 110px;
	height: 110px;
	margin: 0 !important;
	display: block;
}

.fbi-preview .fbi-preview-item .fbi-preview-remove {
	position: absolute !important;
	top: 5px !important;
	right: 5px !important;
	width: 26px !important;
	height: 26px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: rgba(0, 0, 0, .62) !important;
	color: #fff !important;
	font-size: 17px !important;
	font-weight: 400 !important;
	line-height: 26px !important;
	text-align: center !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	box-shadow: none !important;
	cursor: pointer;
	z-index: 5;
	transition: background .15s ease;
}

.fbi-preview .fbi-preview-item .fbi-preview-remove:hover,
.fbi-preview .fbi-preview-item .fbi-preview-remove:focus {
	background: #b32d2e !important;
	color: #fff !important;
}

.fbi-preview-count { flex-basis: 100%; margin: .2em 0 0 !important; }

.fbi-actions { margin-top: 1.6em; display: flex; align-items: center; gap: 1em; flex-wrap: wrap; }
.fbi-cancel { color: #777; }
.fbi-order-actions { margin-top: 1.2em; }

.fbi-link-button {
	background: none;
	border: none;
	padding: 0;
	color: #8a1f1f;
	text-decoration: underline;
	cursor: pointer;
	font-size: .9em;
}
.fbi-withdraw { margin-top: 1.6em; }

/* --- Yazışma --- */
.fbi-thread { margin: .8em 0 1.4em; }

.fbi-msg {
	border: 1px solid #e3e3e3;
	border-radius: 6px;
	padding: .7em .9em;
	margin-bottom: .7em;
	max-width: 85%;
}
.fbi-msg-me { margin-left: auto; background: #f2f7fb; border-color: #d6e4ef; }
.fbi-msg-them { background: #fafafa; }

.fbi-msg-head {
	display: flex;
	justify-content: space-between;
	gap: 1em;
	font-size: .85em;
	color: #6b6b6b;
	margin-bottom: .35em;
}
.fbi-msg-head strong { color: #333; }
.fbi-msg-body { white-space: pre-line; }

.fbi-msg-files { display: flex; flex-wrap: wrap; gap: .5em; margin-top: .6em; align-items: center; }
.fbi-msg-files img {
	width: 84px;
	height: 84px;
	object-fit: cover;
	border: 1px solid #ddd;
	border-radius: 4px;
}

.fbi-msg-form { margin-top: 1em; }
.fbi-msg-form textarea { width: 100%; max-width: 100%; box-sizing: border-box; }

/* Dosya seçme kutusu dar ekranda satıra sığmıyordu; açıklamayı her zaman
   alt satıra alıp kutuyu genişliğe sabitliyoruz. */
.fbi-msg-form input[type="file"] {
	max-width: 100%;
	width: 100%;
	box-sizing: border-box;
}
.fbi-msg-form input[type="file"] + .fbi-muted {
	display: block;
	margin-top: .35em;
}

@media (max-width: 600px) {
	.fbi-msg { max-width: 100%; }
	.fbi-msg-head { flex-direction: column; gap: .1em; }
	.fbi-msg-form .button { width: 100%; }
	.fbi-msg-files img { width: 72px; height: 72px; }
}

/* --- WooCommerce "Siparişlerim" mobil görünümü ---
   Tema, dar ekranda sipariş numarası hücresini gizliyor; geriye Tarih/Durum/
   Toplam kalıyor ve müşteri hangi siparişe baktığını anlayamıyor. Hücreyi geri
   açıyoruz. Etiket ("Sipariş") WooCommerce'in data-title değerinden geliyor. */
@media (max-width: 768px) {
	.woocommerce-orders-table td.woocommerce-orders-table__cell-order-number,
	.woocommerce-orders-table .woocommerce-orders-table__cell-order-number,
	td.woocommerce-orders-table__cell-order-number {
		display: block !important;
		visibility: visible !important;
	}

	.woocommerce-orders-table td.woocommerce-orders-table__cell-order-number a {
		font-weight: 600;
	}
}

/* --- Mobil --- */
/* Uzun ürün adları ve tablolar dar ekranda sayfayı yatay kaydırtıyordu.
   Tablo genişliği sabitlenip metin kırılıyor, dar ekranda ise satırlar
   blok haline gelip alt alta diziliyor. */
.fbi-items,
.fbi-table { table-layout: fixed; }

.fbi-items td,
.fbi-table td,
.fbi-items th,
.fbi-table th { word-wrap: break-word; overflow-wrap: anywhere; }

@media (max-width: 600px) {
	.fbi-form select,
	.fbi-form textarea,
	.fbi-form input[type="file"] { max-width: 100%; width: 100%; box-sizing: border-box; }

	.fbi-step { flex-basis: 100%; }

	/* Ürün seçim tablosu: başlık gizlenir, her satır kart gibi görünür. */
	.fbi-items thead { display: none; }
	.fbi-items,
	.fbi-items tbody,
	.fbi-items tr,
	.fbi-items td { display: block; width: 100%; }
	.fbi-items tr {
		border: 1px solid #e3e3e3;
		border-radius: 4px;
		padding: .6em;
		margin-bottom: .7em;
	}
	.fbi-items td { border: 0; padding: .25em 0; text-align: left; }
	.fbi-items td.fbi-num { text-align: left; }
	.fbi-items td:nth-child(2)::before { content: "Birim fiyat: "; color: #6b6b6b; }
	.fbi-items td:nth-child(3)::before { content: "Adet: "; color: #6b6b6b; }
	.fbi-qty { width: 90px; }

	/* Talep listesi/detay tabloları da alt alta. */
	.fbi-table thead { display: none; }
	.fbi-table,
	.fbi-table tbody,
	.fbi-table tr,
	.fbi-table td,
	.fbi-table th { display: block; width: 100%; }
	.fbi-table tr {
		border: 1px solid #e3e3e3;
		border-radius: 4px;
		padding: .6em;
		margin-bottom: .7em;
	}
	.fbi-table td { border: 0; padding: .2em 0; text-align: left; }
	.fbi-table td.fbi-num { text-align: left; }
	.fbi-table tfoot th { text-align: left; border: 0; }

	.fbi-preview .fbi-preview-item,
	.fbi-preview .fbi-preview-item img,
	.fbi-gallery img { width: 92px; height: 92px; }

	.fbi-actions { flex-direction: column; align-items: stretch; gap: .6em; }
	.fbi-actions .button { width: 100%; text-align: center; }
	.fbi-cancel { text-align: center; }

	.fbi-box { padding: .8em; }
	.fbi-code { word-break: break-all; }
}
