/* Percentage Calculator — style.css v1.0 */

.pctc-wrap {
    max-width: 640px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1a1a;
}

/* Header */
.pctc-header { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.pctc-icon   {
    width: 46px; height: 46px; border-radius: 12px;
    background: linear-gradient(135deg,#6366F1,#8B5CF6);
    color: #fff; font-size: 22px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.pctc-title  {
    font-size: 22px !important; font-weight: 600 !important;
    margin: 0 0 3px !important; padding: 0 !important;
    border: none !important; color: #1a1a1a !important;
}
.pctc-sub { font-size: 13px; color: #666; margin: 0; }

/* Each calculator block */
.pctc-block {
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 12px;
    transition: border-color .15s, box-shadow .15s;
}
.pctc-block:hover { border-color: #c4b5fd; box-shadow: 0 2px 8px rgba(99,102,241,.08); }

/* Block label */
.pctc-block-label {
    font-size: 13px; font-weight: 600; color: #374151;
    margin-bottom: 12px;
}
.pctc-hl { color: #6366F1; }

/* Inline form */
.pctc-inline-form {
    display: flex; align-items: center;
    flex-wrap: wrap; gap: 8px;
}

.pctc-text {
    font-size: 14px; color: #555; white-space: nowrap;
}

/* Input wrapper */
.pctc-iw { position: relative; display: inline-flex; }
.pctc-iw input[type="number"] {
    width: 100px; text-align: center;
    padding: 8px 28px 8px 10px;
    border: 1.5px solid #d0d0d0; border-radius: 8px;
    font-size: 15px; font-weight: 500;
    color: #1a1a1a; background: #fff;
    outline: none; transition: border-color .15s;
    -moz-appearance: textfield;
}
.pctc-iw input::-webkit-inner-spin-button,
.pctc-iw input::-webkit-outer-spin-button { -webkit-appearance: none; }
.pctc-iw input:focus { border-color: #6366F1; box-shadow: 0 0 0 3px rgba(99,102,241,.12); }
.pctc-suf {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    font-size: 12px; color: #888; pointer-events: none;
}

/* +/− toggle */
.pctc-op-toggle {
    display: flex; border: 1.5px solid #d0d0d0;
    border-radius: 8px; overflow: hidden;
}
.pctc-opbtn {
    padding: 8px 14px; font-size: 16px; font-weight: 600;
    border: none; border-right: 1px solid #d0d0d0;
    background: #fff; color: #555; cursor: pointer;
    transition: background .13s, color .13s;
}
.pctc-opbtn:last-child { border-right: none; }
.pctc-opbtn:hover:not(.act) { background: #f5f3ff; }
.pctc-opbtn.act { background: #6366F1; color: #fff; }

/* Result row */
.pctc-result-row {
    margin-top: 12px; padding-top: 12px;
    border-top: 1px solid #e8e8e8;
    display: flex; align-items: flex-start; gap: 14px;
    flex-wrap: wrap;
    animation: pctc-in .2s ease;
}
@keyframes pctc-in { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:translateY(0); } }

.pctc-answer {
    font-size: 22px; font-weight: 700; color: #4F46E5;
    white-space: nowrap;
}
.pctc-formula {
    font-size: 12px; color: #888; line-height: 1.6;
    border-left: 3px solid #e0e7ff;
    padding-left: 10px;
}
.pctc-formula strong { color: #555; }

/* Change badges */
.pctc-badge {
    display: inline-block; padding: 2px 10px; border-radius: 12px;
    font-size: 12px; font-weight: 700; margin-left: 8px;
}
.pctc-badge-increase { background: #dcfce7; color: #166534; }
.pctc-badge-decrease { background: #fee2e2; color: #991b1b; }
.pctc-badge-neutral  { background: #f3f4f6; color: #374151; }

/* Progress-bar style visual */
.pctc-bar-wrap { width: 100%; margin-top: 8px; }
.pctc-bar-track {
    height: 8px; background: #e8e8e8; border-radius: 4px; overflow: hidden;
}
.pctc-bar-fill {
    height: 100%; border-radius: 4px;
    background: linear-gradient(90deg,#6366F1,#8B5CF6);
    transition: width .5s ease;
}
.pctc-bar-labels {
    display: flex; justify-content: space-between;
    font-size: 11px; color: #aaa; margin-top: 3px;
}

/* Reset */
.pctc-reset-btn {
    display: block; width: 100%; margin-top: 6px; padding: 9px;
    font-size: 13px; color: #999; background: none;
    border: 1px solid #e8e8e8; border-radius: 8px;
    cursor: pointer; transition: background .13s;
}
.pctc-reset-btn:hover { background: #f5f5f5; color: #333; }

/* Responsive */
@media (max-width: 480px) {
    .pctc-iw input[type="number"] { width: 80px; font-size: 14px; }
    .pctc-answer { font-size: 18px; }
    .pctc-inline-form { gap: 6px; }
}
