/* Subnet Hesaplayıcı — yalnız bu sayfa (.snp). Hero: net-tools-page.css (.ntp-hero). */

/* ---- Hesaplama kartı ---- */
.snp-card {
    padding: 28px 30px 30px; border-radius: 18px; background: #fff; border: 1px solid rgb(223 232 241 / .9);
    box-shadow: 0 1px 2px rgb(6 32 51 / .05), 0 24px 48px -32px rgb(6 32 51 / .4);
}
.snp-top { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.3fr); align-items: center; column-gap: 40px; }
.snp-head { display: flex; align-items: center; gap: 18px; }
.snp-head-ic {
    flex: 0 0 56px; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 14px; color: #fff; font-size: 22px;
    background: linear-gradient(145deg, #2484c6, #175a8a); box-shadow: 0 14px 26px -14px rgb(23 90 138 / .85);
}
.snp .snp-title { margin: 0; font: 700 clamp(1.35rem, 2vw, 1.6rem)/1.2 var(--hm-display); letter-spacing: -.02em; color: var(--hm-ink); }
.snp .snp-sub { margin: 6px 0 0; font-size: 15px; line-height: 1.55; color: var(--hm-ink-2); }

.snp-form { margin: 0; min-width: 0; }
.snp-row { display: flex; gap: 12px; }
.snp-input-wrap { position: relative; flex: 1 1 auto; min-width: 0; }
.snp-input-wrap > i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: #7c93ad; font-size: 16px; pointer-events: none; }
.snp .snp-input {
    width: 100%; height: 56px; padding: 0 16px 0 46px; border: 1px solid #d3dfeb; border-radius: 11px; background: #fff;
    font: 600 18px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--hm-ink); letter-spacing: .01em;
    transition: border-color .15s, box-shadow .15s;
}
.snp .snp-input::placeholder { color: #9aabbd; font-weight: 500; }
.snp .snp-input:focus { outline: 0; border-color: var(--hm-blue-600); box-shadow: 0 0 0 4px rgb(29 110 168 / .12); }
.snp .snp-input[aria-invalid="true"] { border-color: #dc2626; box-shadow: 0 0 0 4px rgb(220 38 38 / .1); }
.snp .snp-select {
    flex: 0 0 auto; width: 14.5rem; height: 56px; padding: 0 36px 0 14px; border: 1px solid #d3dfeb; border-radius: 11px; cursor: pointer;
    font: 600 14.5px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--hm-ink);
    -webkit-appearance: none; appearance: none;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%234a5a73' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 14px center / 12px 8px no-repeat;
}
.snp .snp-select:focus { outline: 0; border-color: var(--hm-blue-600); box-shadow: 0 0 0 4px rgb(29 110 168 / .12); }
.snp .snp-btn {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 56px; min-width: 9.5rem; padding: 0 1.6rem;
    border: 0; border-radius: 11px; background: var(--hm-cta); color: #fff; font: 700 16px/1 var(--hm-display); cursor: pointer;
    box-shadow: 0 12px 22px -14px rgb(201 71 22 / .9); transition: background .15s, transform .15s;
}
.snp .snp-btn:hover { background: var(--hm-cta-h); }
.snp .snp-btn:active { transform: translateY(1px); }
.snp .snp-btn:focus-visible, .snp .snp-chip:focus-visible, .snp .snp-copy:focus-visible { outline: 2px solid var(--hm-blue-600); outline-offset: 2px; }

.snp-ex { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.snp-ex-lbl { margin-right: 4px; font-size: 13.5px; font-weight: 600; color: var(--hm-ink-2); }
.snp .snp-chip {
    padding: 6px 12px; border: 1px solid var(--hm-tint-line); border-radius: 999px; background: var(--hm-tint); cursor: pointer;
    font: 600 13px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--hm-blue-700); transition: background .15s, border-color .15s;
}
.snp .snp-chip:hover, .snp .snp-chip.is-on { border-color: var(--hm-blue-600); background: #fff; }
.snp .snp-err { margin: 10px 0 0; font-size: 14px; font-weight: 600; color: #b91c1c; }
.snp .snp-err:empty { display: none; }

/* ---- Sonuç alanı ---- */
.snp-out { margin-top: 26px; }
.snp-empty { padding: 30px 24px 32px; border: 1.5px dashed #c9d8e7; border-radius: 14px; background: #fbfdff; text-align: center; }
.snp-empty[hidden] { display: none; }
.snp-empty-art {
    display: block; width: 128px; height: 80px; margin: 0 auto 14px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='80' viewBox='0 0 128 80'%3E%3Cg fill='%23e6eff8' stroke='%23c9daec' stroke-width='1.5'%3E%3Crect x='4' y='6' width='26' height='18' rx='4'/%3E%3Crect x='35' y='6' width='26' height='18' rx='4'/%3E%3Crect x='66' y='6' width='26' height='18' rx='4'/%3E%3Crect x='97' y='6' width='26' height='18' rx='4'/%3E%3C/g%3E%3Cg fill='%2393b1d1'%3E%3Crect x='9' y='13' width='16' height='4' rx='2'/%3E%3Crect x='40' y='13' width='16' height='4' rx='2'/%3E%3Crect x='71' y='13' width='16' height='4' rx='2'/%3E%3C/g%3E%3Crect x='102' y='13' width='16' height='4' rx='2' fill='%23c3d5e8'/%3E%3Cpath d='M17 24v14M48 24v14M79 24v14M110 24v14M17 38h93' fill='none' stroke='%23c9daec' stroke-width='1.5'/%3E%3Crect x='40' y='46' width='48' height='28' rx='6' fill='%23fff' stroke='%236f95bd' stroke-width='2.5'/%3E%3Cpath d='M64 38v8' stroke='%236f95bd' stroke-width='2.5'/%3E%3Cg fill='%236f95bd'%3E%3Ccircle cx='52' cy='60' r='3'/%3E%3Ccircle cx='64' cy='60' r='3'/%3E%3Ccircle cx='76' cy='60' r='3'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}
.snp .snp-empty-t { margin: 0 0 8px; font: 800 1.25rem/1.25 var(--hm-display); color: var(--hm-ink); }
.snp .snp-empty-d { max-width: 470px; margin: 0 auto; font-size: 15px; line-height: 1.6; color: var(--hm-ink-2); }

.snp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.snp-res {
    position: relative; display: flex; flex-direction: column; min-width: 0; padding: 14px 16px 15px;
    border: 1px solid var(--hm-line); border-radius: 13px; background: #fbfdff;
}
.snp-res.is-key { border-color: var(--hm-tint-line); background: linear-gradient(160deg, #eef6fc, #fbfdff); }
.snp-res-l { display: flex; align-items: center; gap: 8px; padding-right: 40px; font-size: 13px; font-weight: 600; color: var(--hm-ink-2); }
.snp-res-l i { width: 16px; color: var(--hm-blue-600); font-size: 13px; text-align: center; }
.snp-res-v { margin-top: 8px; font: 700 19px/1.25 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--hm-ink); word-break: break-all; }
.snp-res-v.is-muted { color: #8296ad; font-family: var(--hm-display); font-size: 17px; }
.snp-res-s { margin-top: 5px; font-size: 13px; line-height: 1.45; color: var(--hm-ink-2); }
.snp .snp-copy {
    position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; display: grid; place-items: center; padding: 0;
    border: 1px solid var(--hm-line); border-radius: 9px; background: #fff; color: #5b7290; font-size: 14px; cursor: pointer;
    transition: color .15s, border-color .15s, background .15s;
}
.snp .snp-copy:hover { border-color: var(--hm-blue-600); color: var(--hm-blue-600); }
.snp .snp-copy.is-copied { border-color: #34d399; background: #ecfdf5; color: #059669; }
.snp-badge { display: inline-flex; align-self: flex-start; align-items: center; gap: 7px; margin-top: 8px; padding: 5px 11px; border-radius: 999px; font-size: 14px; font-weight: 700; }
.snp-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.snp-badge.t-public { background: #e8f3fc; color: #175a8a; }
.snp-badge.t-private { background: #ecfdf5; color: #047857; }
.snp-badge.t-special { background: #fff7ed; color: #b45309; }

/* İkili gösterim */
.snp-bin { margin-top: 12px; padding: 16px 18px 18px; border: 1px solid var(--hm-line); border-radius: 13px; background: #fff; }
.snp-bin-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.snp .snp-bin-h h3, .snp .snp-list-t { margin: 0; font: 700 16px/1.3 var(--hm-display); color: var(--hm-ink); }
.snp-legend { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--hm-ink-2); }
.snp-legend i { width: 12px; height: 12px; border-radius: 3px; }
.snp-legend i + i, .snp-legend i:nth-of-type(2) { margin-left: 10px; }
.snp-legend .is-n { background: #1d6ea8; }
.snp-legend .is-h { background: #f0a37f; }
.snp-bin-body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; align-items: center; overflow-x: auto; }
.snp-bin-k { font-size: 13px; font-weight: 700; color: var(--hm-ink-2); }
.snp-bin-v { font: 600 15px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: nowrap; letter-spacing: .04em; }
.snp-bin-v .n { color: #175a8a; }
.snp-bin-v .h { color: #c2410c; }
.snp-bin-v .d { color: #9aabbd; }

/* Ağ listesi */
.snp-list { margin-top: 12px; padding: 16px 18px 18px; border: 1px solid var(--hm-line); border-radius: 13px; background: #fff; }
.snp-list[hidden] { display: none; }
.snp-list-wrap { max-height: 360px; margin-top: 12px; overflow: auto; border: 1px solid var(--hm-line); border-radius: 10px; }
.snp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.snp-table th { position: sticky; top: 0; padding: 10px 14px; background: #f3f7fb; text-align: left; font-size: 13px; font-weight: 700; color: var(--hm-ink-2); white-space: nowrap; }
.snp-table td { padding: 9px 14px; border-top: 1px solid var(--hm-line); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--hm-ink); white-space: nowrap; }
.snp-table tr.is-cur td { background: #eef6fc; font-weight: 700; }

/* İpuçları: kartın altında dört sütun */
.cs .snp-tips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 0; margin: 20px 0 0; padding: 0; list-style: none; }
.snp-tips li { position: relative; padding: 0 18px 0 46px; font-size: 14px; line-height: 1.5; color: var(--hm-ink-2); border-left: 1px solid var(--hm-line); }
.snp-tips li i { position: absolute; left: 20px; top: 3px; font-size: 15px; color: #16a34a; }
.snp-tips li:nth-child(4n+1) { padding-left: 26px; border-left: 0; }
.snp-tips li:nth-child(4n+1) i { left: 0; }

@media (max-width: 1100px) {
    .snp-top { grid-template-columns: minmax(0, 1fr); row-gap: 20px; }
}
@media (max-width: 900px) {
    .snp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cs .snp-tips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .snp-tips li:nth-child(4n+1) { padding-left: 46px; border-left: 1px solid var(--hm-line); }
    .snp-tips li:nth-child(4n+1) i { left: 20px; }
    .snp-tips li:nth-child(2n+1) { padding-left: 26px; border-left: 0; }
    .snp-tips li:nth-child(2n+1) i { left: 0; }
}
@media (max-width: 640px) {
    .snp-card { padding: 18px 16px 18px; border-radius: 16px; }
    .snp-head-ic { flex-basis: 46px; width: 46px; height: 46px; font-size: 18px; border-radius: 12px; }
    .snp-row { flex-wrap: wrap; }
    .snp-input-wrap { flex: 1 1 100%; }
    .snp .snp-select { flex: 1 1 0; width: 0; min-width: 0; font-size: 13px; padding-right: 30px; background-position: right 10px center; }
    .snp .snp-btn { min-width: 0; padding: 0 1.2rem; }
    .snp-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .snp-res-v { font-size: 17px; }
    .snp-bin { padding: 14px; }
    .snp-bin-body { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .snp-bin-v { margin-bottom: 8px; font-size: 12.5px; letter-spacing: 0; }
    .snp-list { padding: 14px; }
    .snp-empty { padding: 24px 14px; }
    .cs .snp-tips { grid-template-columns: minmax(0, 1fr); }
    .snp-tips li, .snp-tips li:nth-child(n) { padding-left: 26px; border-left: 0; }
    .snp-tips li i, .snp-tips li:nth-child(n) i { left: 0; }
}
