/* =========================================================
   Seller Cost Guide Tools - Frontend styles v0.1.4
========================================================= */

.scg-tool {
    margin: 34px 0;
    padding: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.07);
    overflow: hidden;
}

/* Header */

.scg-tool__header {
    padding: 30px 34px 24px;
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.14), transparent 30%),
        linear-gradient(135deg, #f8fafc 0%, #ffffff 62%, #f0fdf4 100%);
    border-bottom: 1px solid #e2e8f0;
}

.scg-tool__kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 12px;
    color: #166534;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.scg-tool__intro {
    width: 100%;
    max-width: none;
    margin: 0;
    color: #475569;
    font-size: 1rem;
    line-height: 1.55;
}

/* Form */

.scg-tool__form {
    padding: 30px 34px 32px;
}

.scg-tool__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.scg-field label {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.scg-field input,
.scg-field select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    color: #0f172a;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.scg-field input:focus,
.scg-field select:focus {
    outline: 3px solid rgba(34, 197, 94, 0.18);
    border-color: #22c55e;
    background: #ffffff;
}

.scg-tool__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
    align-items: center;
}

.scg-tool__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 18px;
    color: #0f172a;
    background: #F5F5F5;
    border: 1px solid #A6A6A6;
    border-radius: 9px;
    cursor: pointer;
    font-size: 0.94rem;
    font-weight: 850;
    line-height: 1.2;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.scg-tool__button:hover,
.scg-tool__button:focus {
    background: #0A0D0B;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.scg-tool__auto-note {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin: 0;
    padding: 10px 14px;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    font-size: 0.9rem;
    font-weight: 700;
}

/* Results */

.scg-results {
    margin: 0;
    padding: 30px 34px 34px;
    background: #0f172a;
    border-top: 1px solid #1e293b;
    color: #ffffff;
}

.scg-results__header {
    margin-bottom: 22px;
}

.scg-results__header h3 {
    margin-top: 0;
    margin-bottom: 7px;
    color: #ffffff;
    font-size: 1.45rem;
    letter-spacing: -0.02em;
}

.scg-results__header p {
    width: 100%;
    max-width: none;
    margin-bottom: 0;
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.55;
}

.scg-results__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.scg-result-card {
    padding: 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(226, 232, 240, 0.16);
    border-radius: 14px;
}

.scg-result-card span {
    display: block;
    margin-bottom: 8px;
    color: #cbd5e1;
    font-size: 0.82rem;
    font-weight: 750;
}

.scg-result-card strong {
    display: block;
    color: #ffffff;
    font-size: 1.55rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.scg-result-card--highlight {
    background: #dcfce7;
    border-color: #86efac;
    box-shadow: inset 5px 0 0 #22c55e;
}

.scg-result-card--highlight span {
    color: #166534;
}

.scg-result-card--highlight strong {
    color: #14532d;
}

/* Bottom area */

.scg-results__bottom {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(220px, 0.75fr);
    gap: 22px;
    margin-top: 24px;
    align-items: start;
}

.scg-results__left-col {
    min-width: 0;
}

/* Breakdown */

.scg-breakdown {
    margin-top: 0;
}

.scg-breakdown h3 {
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 1.15rem;
}

.scg-breakdown table {
    width: 100%;
    margin: 0;
    background: rgba(255, 255, 255, 0.04);
    border-collapse: collapse;
    border: 1px solid rgba(226, 232, 240, 0.16);
    border-radius: 12px;
    overflow: hidden;
}

.scg-breakdown th,
.scg-breakdown td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.12);
    text-align: left;
}

.scg-breakdown tr:last-child th,
.scg-breakdown tr:last-child td {
    border-bottom: 0;
}

.scg-breakdown th {
    color: #cbd5e1;
    font-weight: 700;
}

.scg-breakdown td {
    width: 120px;
    text-align: right;
    color: #ffffff;
    font-weight: 800;
    white-space: nowrap;
}

/* Formula */

.scg-tool__note,
.scg-tool-notice {
    margin-top: 0;
    padding: 14px 18px;
    color: #78350f;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.scg-results__bottom .scg-tool__note {
    grid-column: 1 / -1;
    justify-self: center;
    width: 100%;
    max-width: 800px;
    margin-top: 2px;
    text-align: center;
}

/* Visual summary */

.scg-visual-summary {
    min-width: 0;
}

.scg-profit-ring-card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 245px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(226, 232, 240, 0.16);
    border-radius: 16px;
}

.scg-profit-ring {
    --scg-ring-percent: 47.3;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background:
        conic-gradient(
            #86efac 0 calc(var(--scg-ring-percent) * 1%),
            #a78bfa calc(var(--scg-ring-percent) * 1%) 75%,
            rgba(255, 255, 255, 0.12) 75% 100%
        );
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.scg-profit-ring::before {
    content: "";
    width: 128px;
    height: 128px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px #e2e8f0;
    position: absolute;
}

.scg-profit-ring__inner {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 8px;
}

.scg-profit-ring__inner strong {
    display: block;
    color: #111827;
    font-size: 2.15rem;
    line-height: 1;
    letter-spacing: -0.03em;
}

.scg-profit-ring__inner span {
    display: block;
    margin-top: 8px;
    color: #475569;
    font-size: 0.95rem;
    font-weight: 700;
}

/* Assumptions */

.scg-assumptions {
    grid-column: 1 / -1;
    margin-top: 4px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(226, 232, 240, 0.16);
    border-radius: 14px;
}

.scg-assumptions__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}

.scg-assumptions__header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1rem;
}

.scg-assumptions__header span {
    color: #cbd5e1;
    font-size: 0.82rem;
    font-weight: 700;
}

.scg-assumptions ul {
    margin: 0;
    padding-left: 18px;
    color: #cbd5e1;
    font-size: 0.88rem;
    line-height: 1.55;
}

.scg-assumptions li {
    margin-bottom: 4px;
}

.scg-assumptions li:last-child {
    margin-bottom: 0;
}

/* Responsive */

@media (max-width: 900px) {
    .scg-tool__grid,
    .scg-results__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .scg-results__bottom {
        grid-template-columns: 1fr;
    }

    .scg-profit-ring-card {
        min-height: auto;
    }
}

@media (max-width: 640px) {
    .scg-tool__header,
    .scg-tool__form,
    .scg-results {
        padding: 22px;
    }

    .scg-tool__grid,
    .scg-results__grid {
        grid-template-columns: 1fr;
    }

    .scg-tool__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .scg-tool__button,
    .scg-tool__auto-note {
        width: 100%;
        justify-content: center;
    }

    .scg-profit-ring {
        width: 160px;
        height: 160px;
    }

    .scg-profit-ring::before {
        width: 114px;
        height: 114px;
    }

    .scg-profit-ring__inner strong {
        font-size: 1.9rem;
    }

	.scg-results__bottom .scg-tool__note {
    text-align: left;
    max-width: none;
	}

	.scg-assumptions__header {
		align-items: flex-start;
		flex-direction: column;
		gap: 4px;
	}
}