/* =============================================
   PERCENTAGE CALCULATOR — percentage.css
   Tool-specific styles only.
   Common styles are in tool.css
   ============================================= */

.pct-calc { width: 100%; display: flex; flex-direction: column; gap: 24px; }

/* Section card */
.pct-section {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: var(--shadow);
}
.pct-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--teal);
    display: inline-block;
}
.pct-desc {
    font-size: 13px;
    color: var(--text2);
    margin-bottom: 14px;
}
.pct-hint {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 12px;
    font-style: italic;
}

/* Input row */
.pct-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.pct-input {
    width: 110px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: var(--font-mono);
    color: var(--text);
    background: var(--white);
    outline: none;
    text-align: center;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.pct-input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,201,167,0.1); }
.pct-input-sm {
    width: 90px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--font-mono);
    color: var(--text);
    background: var(--white);
    outline: none;
    text-align: center;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.pct-input-sm:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,201,167,0.1); }

.pct-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--navy);
    white-space: nowrap;
}

/* Dropdown */
.pct-select {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--font-main);
    color: var(--text);
    background: var(--white);
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}
.pct-select:focus { border-color: var(--teal); }

/* Inline phrase rows */
.pct-phrase-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.pct-phrase-row:last-of-type { border-bottom: none; }
.pct-inline-btn {
    padding: 8px 16px !important;
    font-size: 13px !important;
}

/* Field group for diff */
.pct-field-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 8px;
}

/* Result box */
.pct-result-box {
    margin-top: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.pct-inline-result { margin-top: 8px; }
.pct-result-header {
    background: #16a34a;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    padding: 8px 16px;
}

/* Answer display */
.pct-ans-row {
    padding: 16px 20px 8px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.pct-ans-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pct-ans-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.pct-ans-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--teal);
    font-family: var(--font-mono);
    line-height: 1.1;
}

/* Steps */
.pct-steps {
    padding: 12px 16px 16px;
    border-top: 1px solid var(--border);
    background: var(--light);
}
.pct-steps-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
}
.pct-step {
    font-size: 14px;
    color: var(--text2);
    font-family: var(--font-mono);
    padding: 3px 0;
    line-height: 1.6;
}
.pct-step strong { color: var(--navy); }

@media (max-width: 600px) {
    .pct-row { gap: 8px; }
    .pct-input { width: 90px; }
    .pct-field-group { grid-template-columns: 1fr; }
    .pct-phrase-row { gap: 6px; }
}
