/* =====================================================
   PERCENTAGE CALCULATOR STYLES
   Basic Calculator Online - Percentage Calculator
   ===================================================== */

/* ======================= SECTION ======================= */
.pct-calculator-section {
    padding: 2rem 0 4rem;
    min-height: 60vh;
}

/* ======================= TABS ======================= */
.pct-tabs-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.pct-tabs {
    display: inline-flex;
    gap: 0.5rem;
    background: white;
    padding: 0.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.pct-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: var(--radius-lg);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pct-tab i {
    font-size: 1.125rem;
}

.pct-tab:hover {
    background: var(--bg-body);
    color: var(--text-primary);
}

.pct-tab.active {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

/* Tab Colors */
.pct-tab[data-tab="change"].active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.pct-tab[data-tab="discount"].active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.pct-tab[data-tab="tip"].active {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.pct-tab[data-tab="markup"].active {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}

/* ======================= PANELS ======================= */
.pct-panel {
    display: none;
}

.pct-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ======================= CARDS ======================= */
.pct-card {
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.pct-card:hover {
    box-shadow: var(--shadow-2xl);
    transform: translateY(-4px);
}

.pct-card-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pct-header-orange {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.pct-header-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.pct-header-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.pct-header-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.pct-header-teal {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
}

.pct-card-icon {
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.pct-card-title h3 {
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.pct-card-title p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    margin: 0.25rem 0 0;
}

.pct-card-body {
    padding: 1.5rem;
}

/* ======================= CALCULATOR BLOCKS ======================= */
.pct-calc-block {
    margin-bottom: 1.5rem;
}

.pct-calc-block:last-child {
    margin-bottom: 0;
}

.pct-calc-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.pct-calc-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.pct-calc-text {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.pct-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin: 1.5rem 0;
}

/* ======================= INPUTS ======================= */
.pct-input-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.pct-input-wrapper.full {
    width: 100%;
}

.pct-input-wrapper.has-prefix .pct-input {
    padding-left: 2rem;
}

.pct-input {
    width: 100px;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    background: white;
    transition: all var(--transition-fast);
}

.pct-input-wrapper.full .pct-input {
    width: 100%;
}

.pct-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.pct-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.pct-input-prefix {
    position: absolute;
    left: 0.875rem;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
}

.pct-input-suffix {
    position: absolute;
    right: 0.875rem;
    color: var(--text-muted);
    font-size: 0.9375rem;
    font-weight: 600;
}

/* Remove number input spinners */
.pct-input::-webkit-outer-spin-button,
.pct-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pct-input[type=number] {
    -moz-appearance: textfield;
}

/* ======================= BUTTONS ======================= */
.pct-calc-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.pct-calc-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.pct-calc-btn:active {
    transform: scale(0.95);
}

.pct-primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-top: 1rem;
}

.pct-primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.pct-primary-btn.green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.pct-primary-btn.green:hover {
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.pct-primary-btn.purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.pct-primary-btn.purple:hover {
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3);
}

.pct-primary-btn.teal {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
}

.pct-primary-btn.teal:hover {
    box-shadow: 0 8px 20px rgba(20, 184, 166, 0.3);
}

.pct-btn-group {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.pct-secondary-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: white;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pct-secondary-btn.increase:hover {
    border-color: #10b981;
    color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.pct-secondary-btn.decrease:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

/* Quick Buttons */
.pct-quick-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.pct-quick-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: white;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pct-quick-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pct-quick-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

/* ======================= FORM ======================= */
.pct-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.pct-form-group {
    margin-bottom: 0;
}

.pct-form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* Split Control */
.pct-split-control {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-body);
    border-radius: var(--radius-lg);
}

.pct-split-btn {
    width: 36px;
    height: 36px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: white;
    color: var(--text-secondary);
    font-size: 1.125rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pct-split-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pct-split-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 2rem;
    text-align: center;
}

.pct-split-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ======================= RESULTS ======================= */
.pct-result {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #86efac;
    border-radius: var(--radius-lg);
}

.pct-result-label {
    font-size: 0.875rem;
    color: #166534;
    font-weight: 500;
}

.pct-result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #166534;
}

/* Result Card */
.pct-result-card {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-body);
    border-radius: var(--radius-xl);
}

.pct-result-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.pct-result-label-sm {
    font-size: 0.8125rem;
    color: var(--text-muted);
    display: block;
    text-align: center;
    margin-bottom: 0.25rem;
}

.pct-result-big {
    font-size: 2.5rem;
    font-weight: 800;
    color: #3b82f6;
}

.pct-result-big.teal {
    color: #14b8a6;
}

.pct-result-badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
}

.pct-result-badge.increase {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.pct-result-badge.decrease {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.pct-result-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.pct-result-detail {
    text-align: center;
}

.pct-result-detail .detail-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.pct-result-detail .detail-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Discount Result */
.pct-discount-result {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #86efac;
    border-radius: var(--radius-xl);
}

.pct-discount-main {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

.pct-discount-final,
.pct-discount-savings {
    text-align: center;
}

.pct-discount-final .label,
.pct-discount-savings .label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #166534;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.pct-discount-final .value {
    font-size: 2rem;
    font-weight: 800;
    color: #166534;
}

.pct-discount-savings .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #22c55e;
}

.pct-discount-bar {
    position: relative;
    height: 12px;
    background: rgba(22, 101, 52, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.pct-discount-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #22c55e 0%, #10b981 100%);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.pct-discount-bar-label {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.625rem;
    font-weight: 700;
    color: #166534;
}

/* Tip Result */
.pct-tip-result {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border: 2px solid #c4b5fd;
    border-radius: var(--radius-xl);
}

.pct-tip-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.pct-tip-item {
    text-align: center;
    padding: 0.75rem;
}

.pct-tip-item .label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #7c3aed;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.pct-tip-item .value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #5b21b6;
}

.pct-tip-item .value.highlight {
    font-size: 1.75rem;
    font-weight: 800;
}

/* ======================= SIDEBAR ======================= */
.pct-sidebar-card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.pct-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-body);
    border-bottom: 1px solid var(--border-color);
}

.pct-sidebar-header h5 {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.pct-clear-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pct-clear-btn:hover {
    background: #fef2f2;
    color: var(--danger);
}

.pct-sidebar-body {
    padding: 1rem 1.25rem;
    max-height: 300px;
    overflow-y: auto;
}

/* Empty State */
.pct-empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.pct-empty-state i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.pct-empty-state p {
    margin: 0;
    font-size: 0.875rem;
}

/* History Items */
.pct-history-item {
    padding: 0.75rem;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: 0.5rem;
}

.pct-history-item:hover {
    background: var(--bg-body);
}

.pct-history-item:last-child {
    margin-bottom: 0;
}

.pct-history-type {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.pct-history-expr {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.125rem;
}

.pct-history-result {
    font-size: 1rem;
    font-weight: 600;
    color: #f97316;
}

/* Formulas */
.pct-formulas {
    max-height: none;
}

.pct-formula-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.pct-formula-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.formula-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

.formula-eq {
    font-size: 0.75rem;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    color: var(--primary);
    background: var(--bg-body);
    padding: 0.375rem 0.625rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.25rem;
}

.formula-eq:last-child {
    margin-bottom: 0;
}

/* Conversions */
.pct-conversions {
    max-height: none;
}

.pct-conversion-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.pct-conversion-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-body);
    border-radius: var(--radius-lg);
}

.pct-conversion-item .pct-val {
    font-size: 1rem;
    font-weight: 700;
    color: #f97316;
}

.pct-conversion-item .pct-frac {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ======================= FEATURES SECTION ======================= */
.pct-features-section {
    padding: 4rem 0 5rem;
    background: var(--bg-body);
}

.pct-section-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(249, 115, 22, 0.1);
    color: #ea580c;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.section-desc {
    font-size: 1.0625rem;
    color: var(--text-muted);
    margin: 0;
}

.pct-feature-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.75rem;
    height: 100%;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all var(--transition-normal);
}

.pct-feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.pct-feature-card .feature-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

.pct-feature-card .feature-icon.orange {
    background: rgba(249, 115, 22, 0.1);
    color: #ea580c;
}

.pct-feature-card .feature-icon.blue {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.pct-feature-card .feature-icon.green {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.pct-feature-card .feature-icon.purple {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
}

.pct-feature-card h5 {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.pct-feature-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* ======================= RESPONSIVE ======================= */
@media (max-width: 991.98px) {
    .pct-calculator-section {
        padding: 1.5rem 0 3rem;
    }

    .pct-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }

    .pct-tab {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }

    .pct-tab span {
        display: none;
    }

    .pct-tab i {
        margin: 0;
    }
}

@media (max-width: 767.98px) {
    .pct-tabs-wrapper {
        margin-bottom: 1.5rem;
    }

    .pct-calc-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .pct-calc-text {
        text-align: center;
    }

    .pct-input {
        width: 100%;
    }

    .pct-calc-btn {
        width: 100%;
        height: 48px;
    }

    .pct-form-grid {
        grid-template-columns: 1fr;
    }

    .pct-result-big {
        font-size: 2rem;
    }

    .pct-discount-main {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .pct-discount-final .value {
        font-size: 1.75rem;
    }

    .pct-tip-grid {
        grid-template-columns: 1fr;
    }

    .pct-btn-group {
        flex-direction: column;
    }

    .pct-features-section {
        padding: 3rem 0 4rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .pct-tab {
        padding: 0.5rem 0.75rem;
    }

    .pct-card-header {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .pct-card-title h3 {
        font-size: 1.125rem;
    }

    .pct-quick-btns {
        justify-content: center;
    }

    .pct-result-details {
        grid-template-columns: 1fr;
    }
}

/* ======================= SCROLLBAR ======================= */
.pct-sidebar-body::-webkit-scrollbar {
    width: 6px;
}

.pct-sidebar-body::-webkit-scrollbar-track {
    background: var(--bg-body);
    border-radius: 3px;
}

.pct-sidebar-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.pct-sidebar-body::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}