/* fktps.css — FKT Portfolio Scorer */

.fktps-wrap {
    font-family: 'Georgia', serif;
    max-width: 860px;
    margin: 2rem auto;
    color: #1a1a1a;
}

/* ── Tabs ── */

.fktps-tabs {
    display: flex;
    gap: .25rem;
    border-bottom: 2px solid #e0d8ce;
    margin-bottom: 1.25rem;
}

.fktps-tab {
    background: transparent;
    border: none;
    padding: .6rem 1.2rem;
    font-family: sans-serif;
    font-size: .9rem;
    color: #7a6555;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color .15s, border-color .15s;
}

.fktps-tab:hover { color: #4a3728; }

.fktps-tab.active {
    color: #4a3728;
    border-bottom-color: #4a3728;
    font-weight: bold;
}

.fktps-tab-panel { display: none; }
.fktps-tab-panel.active { display: block; }

.fktps-intro {
    font-family: sans-serif;
    font-size: .88rem;
    color: #666;
    line-height: 1.55;
    margin: 0 0 1rem;
}

.fktps-intro code {
    background: #f0ebe3;
    padding: .1rem .35rem;
    border-radius: 3px;
    font-size: .82rem;
    color: #4a3728;
}

/* ── Table (form mode) ── */

.fktps-table-wrap {
    overflow-x: auto;
    border: 1px solid #d8cfc4;
    border-radius: 6px;
}

.fktps-table {
    width: 100%;
    border-collapse: collapse;
    font-family: sans-serif;
    font-size: .85rem;
    min-width: 720px;
}

.fktps-table thead {
    background: #f5f0ea;
}

.fktps-table th {
    text-align: left;
    padding: .6rem .6rem;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #5a4a3a;
    font-weight: bold;
    border-bottom: 1px solid #d8cfc4;
    white-space: nowrap;
}

.fktps-th-hint {
    display: block;
    font-weight: normal;
    text-transform: none;
    letter-spacing: 0;
    color: #aaa;
    font-size: .68rem;
}

.fktps-table td {
    padding: .4rem .5rem;
    border-bottom: 1px solid #ede7de;
    vertical-align: middle;
}

.fktps-table tbody tr:last-child td {
    border-bottom: none;
}

.fktps-table input,
.fktps-table select {
    width: 100%;
    padding: .4rem .5rem;
    border: 1px solid #d0c6ba;
    border-radius: 3px;
    font-family: inherit;
    font-size: .85rem;
    background: #fff;
    box-sizing: border-box;
    color: #1a1a1a;
}

.fktps-table input:focus,
.fktps-table select:focus {
    outline: none;
    border-color: #4a3728;
    box-shadow: 0 0 0 2px rgba( 74, 55, 40, .12 );
}

.fktps-table .fktps-col-name  { min-width: 150px; }
.fktps-table .fktps-col-r     { width: 80px; }
.fktps-table .fktps-col-time  { width: 130px; }

.fktps-row-remove {
    background: transparent;
    border: none;
    color: #b06050;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    padding: .2rem .4rem;
    border-radius: 3px;
}

.fktps-row-remove:hover {
    background: #f3dcdc;
    color: #7b241c;
}

.fktps-btn-add {
    margin-top: .75rem;
    background: transparent;
    border: 1px dashed #b0a090;
    color: #4a3728 !important;
}

.fktps-btn-add:hover {
    background: #f5f0ea;
    border-color: #4a3728;
}

/* ── Upload zone (CSV mode) ── */

.fktps-upload-zone {
    border: 2px dashed #b0a090;
    border-radius: 6px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    background: #faf8f5;
    transition: border-color .2s, background .2s;
    cursor: pointer;
}

.fktps-upload-zone.drag-over {
    border-color: #4a3728;
    background: #f0ebe3;
}

.fktps-upload-icon {
    font-size: 2.6rem;
    line-height: 1;
    color: #7a6555;
    margin-bottom: .3rem;
}

.fktps-upload-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin: 0 0 .2rem;
}

.fktps-upload-or {
    color: #888;
    margin: .15rem 0;
    font-size: .85rem;
}

.fktps-upload-hint {
    font-size: .78rem;
    color: #999;
    margin: .6rem 0 0;
}

.fktps-file-chosen {
    margin: .75rem 0 0;
    font-family: sans-serif;
    font-size: .85rem;
    color: #4a3728;
    font-weight: bold;
}

/* ── Buttons ── */

.fktps-btn {
    display: inline-block;
    padding: .5rem 1.4rem;
    background: #4a3728;
    color: #fff !important;
    border-radius: 4px;
    cursor: pointer;
    font-size: .9rem;
    font-family: inherit;
    border: none;
    text-decoration: none;
    transition: background .15s;
}

.fktps-btn:hover { background: #2e2018; }

.fktps-btn-submit {
    padding: .65rem 2rem;
    font-size: 1rem;
}

.fktps-btn-link {
    display: inline-block;
    margin-top: 1rem;
    background: transparent;
    border: none;
    color: #4a3728;
    cursor: pointer;
    font-family: sans-serif;
    font-size: .85rem;
    text-decoration: underline;
    padding: 0;
}

.fktps-btn-link:hover { color: #2e2018; }

.fktps-actions-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.fktps-params-note {
    font-family: sans-serif;
    font-size: .8rem;
    color: #888;
}

/* ── Progress ── */

.fktps-progress {
    text-align: center;
    padding: 2rem 1rem;
}

.fktps-bar-track {
    height: 6px;
    background: #e0d8ce;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.fktps-bar {
    height: 100%;
    width: 0%;
    background: #4a3728;
    border-radius: 3px;
    transition: width .3s ease;
    animation: fktps-pulse 1.4s ease-in-out infinite;
}

@keyframes fktps-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .55; }
}

.fktps-progress-label {
    font-size: .9rem;
    color: #666;
    margin: 0;
}

/* ── Error ── */

.fktps-error {
    background: #fdf0f0;
    border-left: 4px solid #c0392b;
    padding: 1rem 1.25rem;
    border-radius: 4px;
    color: #7b241c;
    font-size: .95rem;
    margin-top: 1rem;
}

/* ── Results ── */

.fktps-results-inner {
    border: 1px solid #d8cfc4;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 1.5rem;
}

/* Three-dimension header */

.fktps-dims {
    display: grid;
    grid-template-columns: repeat( 3, 1fr );
    background: #4a3728;
    color: #fff;
}

.fktps-dim {
    padding: 1.75rem 1.5rem;
    text-align: center;
    border-right: 1px solid rgba( 255, 255, 255, .15 );
}

.fktps-dim:last-child { border-right: none; }

.fktps-dim-value {
    font-size: 2.6rem;
    font-weight: bold;
    line-height: 1;
    letter-spacing: -.02em;
}

.fktps-dim-name {
    font-size: .9rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-top: .5rem;
}

.fktps-dim-desc {
    font-size: .75rem;
    opacity: .7;
    margin-top: .35rem;
    font-family: sans-serif;
    line-height: 1.4;
}

@media ( max-width: 560px ) {
    .fktps-dims { grid-template-columns: 1fr; }
    .fktps-dim {
        border-right: none;
        border-bottom: 1px solid rgba( 255, 255, 255, .15 );
    }
    .fktps-dim:last-child { border-bottom: none; }
}

/* Sections */

.fktps-section {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e8e0d6;
}

.fktps-section:last-child { border-bottom: none; }

.fktps-section-title {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #7a6555;
    margin: 0 0 1rem;
    font-family: sans-serif;
    font-weight: bold;
}

/* Stats grid */

.fktps-stats-grid {
    display: grid;
    grid-template-columns: repeat( auto-fill, minmax( 150px, 1fr ) );
    gap: .75rem 1.5rem;
}

.fktps-stat-item { display: flex; flex-direction: column; }

.fktps-stat-label {
    font-size: .72rem;
    color: #888;
    font-family: sans-serif;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.fktps-stat-value {
    font-size: 1.05rem;
    font-weight: bold;
    margin-top: .1rem;
    font-variant-numeric: tabular-nums;
}

/* Per-FKT result table */

.fktps-result-table {
    width: 100%;
    border-collapse: collapse;
    font-family: sans-serif;
    font-size: .85rem;
}

.fktps-result-table th {
    text-align: right;
    padding: .4rem .6rem;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #888;
    border-bottom: 1px solid #d8cfc4;
}

.fktps-result-table th:first-child,
.fktps-result-table th:nth-child(2) { text-align: left; }

.fktps-result-table td {
    padding: .4rem .6rem;
    border-bottom: 1px solid #ede7de;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.fktps-result-table td:first-child {
    text-align: left;
    color: #aaa;
}

.fktps-result-table td:nth-child(2) {
    text-align: left;
    font-weight: bold;
    color: #1a1a1a;
}

.fktps-result-table td.fktps-a-col {
    font-weight: bold;
    color: #4a3728;
}

.fktps-result-table tbody tr:last-child td { border-bottom: none; }

/* Notes / limitations */

.fktps-notes {
    font-size: .82rem;
    font-family: sans-serif;
    color: #666;
    line-height: 1.6;
    background: #faf8f5;
}

.fktps-notes ol { margin: 0; padding-left: 1.4rem; }
.fktps-notes li { margin-bottom: .5rem; }
.fktps-notes strong { color: #4a3728; }

/* Warnings */

.fktps-warnings {
    background: #fdf8ee;
    border-left: 4px solid #d0a020;
}

.fktps-warnings ul {
    margin: 0;
    padding-left: 1.4rem;
    font-family: sans-serif;
    font-size: .82rem;
    color: #7a6020;
}

/* Actions */

.fktps-result-actions {
    padding: 1.25rem 2rem;
    background: #f5f0ea;
    border-top: 1px solid #d8cfc4;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.fktps-btn-download {
    background: transparent;
    border: 2px solid #4a3728;
    color: #4a3728 !important;
    padding: .45rem 1.2rem;
    font-size: .875rem;
}

.fktps-btn-download:hover {
    background: #4a3728;
    color: #fff !important;
}

.fktps-btn-reset {
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: .85rem;
    font-family: inherit;
    padding: 0;
    text-decoration: underline;
}

.fktps-btn-reset:hover { color: #333; }

.fktps-actions-note {
    font-size: .78rem;
    color: #aaa;
    font-family: sans-serif;
    margin-left: auto;
}

@media ( max-width: 560px ) {
    .fktps-section { padding: 1.25rem 1rem; }
    .fktps-result-actions { padding: 1rem; }
}

/* ---------------------------------------------------------------------------
   Shared unit toggle
   Identical block in every plugin in the suite, so the control looks and
   behaves the same wherever it appears.
   --------------------------------------------------------------------------- */

.fkt-units {
	display: flex;
	align-items: center;
	gap: .4rem;
	justify-content: flex-end;
	margin: 0 0 1rem;
	font-family: Georgia, "Times New Roman", serif;
}

.fkt-units-label {
	font-size: .82rem;
	color: #8a8178;
	margin-right: .2rem;
	letter-spacing: .02em;
}

.fkt-units-btn {
	font-family: Georgia, "Times New Roman", serif;
	font-size: .85rem;
	line-height: 1;
	padding: .42rem .85rem;
	border: 1px solid #cfc7bd;
	background: #fff;
	color: #6b6259;
	cursor: pointer;
	border-radius: 3px;
	transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.fkt-units-btn + .fkt-units-btn { margin-left: -1px; }

.fkt-units-btn:hover {
	border-color: #4a3728;
	color: #4a3728;
}

.fkt-units-btn.is-on {
	background: #4a3728;
	border-color: #4a3728;
	color: #fff;
	cursor: default;
}

.fkt-units-btn:focus-visible {
	outline: 2px solid #4a3728;
	outline-offset: 2px;
}

@media (max-width: 480px) {
	.fkt-units { justify-content: flex-start; }
}
