/* QR Code Generator Specific Styles */
/* TR: QR Kod Uretici'ye ozel stiller. EN: Styles specific to the QR Code Generator. */

/* Import main styles — TR: Ortak tasarim sistemi. EN: Shared design system. */
@import url('../../../assets/css/main.css');

/* TR: Sadece genislik override'i — baslik, kart ve kenar boslugu ortak main.css'ten gelir
   (marka mavisi #308fc0, 16px radius, 2.5rem padding). Bu, Birim Donusturucu ile birebir hizalar. */
/* EN: Width override only — header, card, and spacing inherit the shared main.css (brand blue
   #308fc0, 16px radius, 2.5rem padding), matching the Unit Converter exactly. */
.container {
    max-width: 600px; /* TR: odakli okuma kolonu. EN: focused reading column. */
}

/* TR: QR araci icerik akisi — Birim Donusturucu'nun .conversion-section ritmiyle
   (gap 1rem, cikti kartlari +0.5rem) hizalanir. */
/* EN: QR tool content flow — aligned with the Unit Converter's .conversion-section
   rhythm (gap 1rem, output cards +0.5rem). */
.qr-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.qr-section > .qr-preview-block,
.qr-section > .unit-info {
    margin-top: 0.5rem;
}

/* TR: Giris grubu (etiket + input/select/textarea). EN: Input group (label + input/select/textarea). */
.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    margin-bottom: 0.5rem;
    color: #64748b;
    font-size: 0.9rem;
}

.input-group input[type="text"],
.input-group input[type="tel"],
.input-group input[type="email"],
.input-group input[type="url"],
.input-group input[type="number"],
.input-group textarea,
.input-group select {
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background-color: #f8fafc;
    font-size: 1rem;
    color: #1e293b;
    font-family: inherit;
    transition: border-color 0.2s ease;
    width: 100%;
}

/* TR: Metin alani otomatik buyur — tek satirda baslar, tastikca uzar. */
/* EN: Textarea auto-grows — starts at one line, expands as it wraps. */
.input-group textarea {
    resize: none;
    min-height: 2.5rem;
    padding: 0.8rem 1rem;
    line-height: 1.5;
    overflow-y: hidden;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
    border-color: #2563eb;
    outline: none;
}

/* TR: Acilir ok — Birim Donusturucu'deki ozel SVG chevron ile birebir ayni. */
/* EN: Dropdown arrow — identical to the Unit Converter's custom SVG chevron. */
.input-group select {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px;
    padding-right: 2.75rem;
}

/* TR: Checkbox satiri (ornegin gizli ag). EN: Checkbox row (e.g. hidden network). */
.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.checkbox-row input[type="checkbox"] {
    width: 1.15rem;
    height: 1.15rem;
    accent-color: #2563eb;
    cursor: pointer;
}

.checkbox-row label {
    color: #334155;
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
}

/* ------------------------------------------------------------
   TR: Tur secici — segment kontrol, CSS-only radyo teknigiyle
   gercekten gecis yapar (JS yok). Etiketler secili panelin
   tarzini Birim Donusturucu'nun select/buton dilinden alir.
   EN: Type selector — a segmented control that actually switches
   panels via a CSS-only radio technique (no JS). Styling borrows
   from the Unit Converter's select/button language.
   ------------------------------------------------------------ */
.type-selector input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.tab-labels {
    display: flex;
    gap: 0.4rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.35rem;
}

.tab-labels label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 2.75rem;
    padding: 0.5rem 0.5rem;
    border-radius: 9px;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.2;
    color: #64748b;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.tab-labels label:hover {
    color: #2563eb;
}

#tabUrl:checked ~ .tab-labels label[for="tabUrl"],
#tabWifi:checked ~ .tab-labels label[for="tabWifi"],
#tabVcard:checked ~ .tab-labels label[for="tabVcard"] {
    background: #2563eb;
    color: #fff;
}

#tabUrl:checked ~ .tab-labels label[for="tabUrl"]:hover,
#tabWifi:checked ~ .tab-labels label[for="tabWifi"]:hover,
#tabVcard:checked ~ .tab-labels label[for="tabVcard"]:hover {
    color: #fff;
}

/* TR: Panel icerikleri — yalnizca secili sekmenin paneli gorunur. */
/* EN: Panel content — only the active tab's panel is visible. */
.type-panel {
    display: none;
    flex-direction: column;
    gap: 1rem;
}

#tabUrl:checked ~ .type-panels #panelUrl,
#tabWifi:checked ~ .type-panels #panelWifi,
#tabVcard:checked ~ .type-panels #panelVcard {
    display: flex;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ------------------------------------------------------------
   TR: Canli onizleme paneli — turetme kartiyla ayni sessiz ton.
   EN: Live preview panel — same muted tone as the derivation card.
   ------------------------------------------------------------ */
.qr-preview-block {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.qr-preview-block h3 {
    font-size: 1rem;
    color: #334155;
    text-align: center;
}

#qrPreview {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    min-height: 60px;
    min-width: 60px;
}

#qrPreview svg {
    display: block;
    width: 240px;
    max-width: 100%;
    height: auto;
}

/* TR: Boş durumdaki açık gri örnek QR — "örnektir, taranmaz" hissi için.
   EN: The light-gray sample QR in the empty state — signals "this is a sample, not scannable". */
#qrPreview.qr-ghost {
    opacity: 0.9;
    pointer-events: none;
}

.qr-sample-note {
    font-size: 0.78rem;
    color: #94a3b8;
    text-align: center;
}

.download-row {
    display: flex;
    gap: 1rem;
    width: 100%;
    max-width: 320px;
}

.btn {
    flex: 1;
    padding: 0.85rem 1.25rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
    border: 1px solid #2563eb;
}

.btn-primary:hover:not(:disabled) {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.btn-secondary {
    background: transparent;
    color: #2563eb;
    border: 1px solid #2563eb;
}

.btn-secondary:hover:not(:disabled) {
    background: #eff6ff;
}

/* ------------------------------------------------------------
   TR: "Good to know" bilgi paneli — Birim Donusturucu'nun
   .unit-info stilinin birebir aynisi.
   EN: "Good to know" info panel — identical to the Unit
   Converter's .unit-info styling.
   ------------------------------------------------------------ */
.unit-info {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
}

.unit-info h3 {
    font-size: 0.8rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.75rem;
}

.unit-info .info-item {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 0.4rem;
}

.unit-info .info-item:last-child {
    margin-bottom: 0;
}

.unit-info .info-item strong {
    color: #2563eb;
    font-weight: 600;
}

/* ------------------------------------------------------------
   TR: Mobil — tek sutun, dar ekranlarda satirlar alt alta.
   EN: Mobile — single column, rows stack on narrow screens.
   ------------------------------------------------------------ */
@media (max-width: 640px) {
    .field-row {
        grid-template-columns: 1fr;
    }

    .tab-labels label {
        font-size: 0.82rem;
        padding: 0.65rem 0.35rem;
    }

    .download-row {
        max-width: none;
        flex-direction: column;
    }
}
