/**
 * Amad – Direnç Renk Kodu Hesaplayıcı.
 *
 * Yalnızca kendi Elementor container'ının/shortcode'un bulunduğu alana render
 * olur; sayfa genişliğini, sidebar'ı veya global düzeni etkilemez. Tüm
 * seçiciler .amad-rcc altında namespace'lidir.
 */

.amad-rcc {
	box-sizing: border-box;
	max-width: 100%;
	font-size: 14px;
	line-height: 1.4;
	color: #2c2c2c;
}

.amad-rcc *,
.amad-rcc *::before,
.amad-rcc *::after {
	box-sizing: border-box;
}

/* Ekran okuyucu-only sınıf artık amad-calculator-core.css'de: .amad-calc-visually-hidden. */

/* ==========================================================================
   Bant sayısı (4 / 5 / 6) segmented control.
   ========================================================================== */

.amad-rcc-bands {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 16px;
	padding: 0;
	border: 0;
}

.amad-rcc-bands__option {
	position: relative;
	display: inline-flex;
	align-items: center;
	padding: 7px 16px;
	background: #f5f5f5;
	border: 1px solid #e0e0e0;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.amad-rcc-bands__option input {
	position: absolute;
	opacity: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	cursor: pointer;
}

.amad-rcc-bands__option.is-checked,
.amad-rcc-bands__option:has( input:checked ) {
	background: #2c2c2c;
	border-color: #2c2c2c;
	color: #fff;
}

.amad-rcc-bands__option:has( input:focus-visible ) {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.amad-rcc-bands__option input:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

/* ==========================================================================
   Görsel direnç gövdesi.
   ========================================================================== */

.amad-rcc-resistor {
	display: flex;
	align-items: center;
	height: 56px;
	margin: 0 0 20px;
}

.amad-rcc-resistor__lead {
	flex: 1 1 auto;
	height: 2px;
	min-width: 16px;
	background: #9e9e9e;
}

.amad-rcc-resistor__body {
	display: flex;
	align-items: stretch;
	flex: 0 0 auto;
	width: min( 260px, 60% );
	height: 34px;
	padding: 0 10px;
	background: #e8caa0;
	border-radius: 17px;
	box-shadow: inset 0 2px 4px rgba( 0, 0, 0, 0.12 ), inset 0 -2px 3px rgba( 255, 255, 255, 0.35 );
	overflow: hidden;
}

.amad-rcc-band {
	flex: 0 0 auto;
	width: 12px;
	margin: 0 3px;
	background: #ccc;
	border-radius: 1px;
}

.amad-rcc-band--gap {
	margin-left: auto;
}

/* ==========================================================================
   Bant renk alanları (etiket + swatch seçici).
   ========================================================================== */

.amad-rcc-fields {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0 0 18px;
}

.amad-rcc-field {
	flex: 1 1 150px;
	min-width: 130px;
}

.amad-rcc-field--gap {
	margin-left: 8px;
}

.amad-rcc-field__label {
	display: block;
	margin: 0 0 5px;
	font-size: 12px;
	font-weight: 600;
	color: #555;
}

.amad-rcc-combo {
	position: relative;
}

.amad-rcc-trigger {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding: 8px 10px;
	background: #fff;
	border: 1px solid #d0d0d0;
	border-radius: 4px;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.amad-rcc-trigger:hover {
	border-color: #b0b0b0;
}

.amad-rcc-trigger:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 1px;
}

.amad-rcc-trigger__text {
	flex: 1 1 auto;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.amad-rcc-trigger__chevron {
	flex: 0 0 auto;
	width: 14px;
	height: 14px;
	color: #757575;
}

.amad-rcc-trigger[ aria-expanded="true" ] .amad-rcc-trigger__chevron {
	transform: rotate( 180deg );
}

.amad-rcc-swatch {
	flex: 0 0 auto;
	display: inline-block;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 1px solid rgba( 0, 0, 0, 0.2 );
}

.amad-rcc-swatch--light {
	border-color: rgba( 0, 0, 0, 0.35 );
}

.amad-rcc-listbox {
	position: absolute;
	z-index: 30;
	top: calc( 100% + 4px );
	left: 0;
	right: 0;
	max-height: 260px;
	overflow-y: auto;
	margin: 0;
	padding: 4px;
	list-style: none;
	background: #fff;
	border: 1px solid #d0d0d0;
	border-radius: 4px;
	box-shadow: 0 4px 14px rgba( 0, 0, 0, 0.12 );
}

.amad-rcc-option {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 7px 8px;
	border-radius: 3px;
	cursor: pointer;
}

.amad-rcc-option:hover {
	background: #f2f2f2;
}

.amad-rcc-option:focus,
.amad-rcc-option:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: -2px;
	background: #f2f2f2;
}

.amad-rcc-option.is-selected {
	font-weight: 600;
	background: #eef4fb;
}

/* ==========================================================================
   Sonuç paneli.
   ========================================================================== */

.amad-rcc-result {
	padding: 14px 16px;
	background: #f7f7f7;
	border-radius: 5px;
}

.amad-rcc-result__main {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 10px;
	margin: 0 0 10px;
}

.amad-rcc-result__label {
	flex: 1 0 100%;
	font-size: 12px;
	font-weight: 600;
	color: #777;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.amad-rcc-result__value {
	font-size: 28px;
	font-weight: 700;
	color: #1c1c1c;
}

.amad-rcc-result__full {
	font-size: 13px;
	color: #777;
}

.amad-rcc-result__row {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 4px 10px;
	padding: 6px 0 0;
	font-size: 14px;
}

.amad-rcc-result__row:first-of-type {
	padding-top: 0;
}

.amad-rcc-result__row .amad-rcc-result__label {
	flex: 0 1 auto;
	text-transform: none;
	letter-spacing: normal;
	font-size: 13px;
	font-weight: 600;
	color: #555;
}

/* ==========================================================================
   Küçük genişlikler (dar Elementor container / mobil).
   ========================================================================== */

@media ( max-width: 420px ) {
	.amad-rcc-resistor__body {
		width: 80%;
	}

	.amad-rcc-field {
		flex: 1 1 100%;
	}

	.amad-rcc-field--gap {
		margin-left: 0;
	}

	.amad-rcc-result__value {
		font-size: 24px;
	}
}
