/* ============================================
   Percentage Calculator UK - Styles
   ============================================ */

/* Main Container */
.percentage-calculator-uk-tool {
    min-height: 100vh;
    padding: 1.5rem 1rem;
    background: #ffffff;
}

.tool-container {
    max-width: 900px;
    margin: 0 auto;
}

/* Tool Header */
.tool-header {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #2d3748;
}

.tool-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    color: #667eea;
}

.tool-header h1 i {
    font-size: 1.6rem;
}

.tool-description {
    font-size: 0.95rem;
    color: #4a5568;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Calculator Tabs */
.calculator-tabs {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
    background: #f7fafc;
    padding: 0.4rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    overflow-x: auto;
    scrollbar-width: thin;
}

.calculator-tabs::-webkit-scrollbar {
    height: 6px;
}

.calculator-tabs::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.calc-tab {
    flex: 1;
    min-width: 85px;
    padding: 0.6rem 0.8rem;
    background: transparent;
    border: none;
    color: #4a5568;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.calc-tab i {
    font-size: 1.1rem;
}

.calc-tab:hover {
    background: #edf2f7;
    color: #667eea;
}

.calc-tab.active {
    background: #667eea;
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Calculator Panels */
.calculator-panel {
    display: none;
}

.calculator-panel.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Panel Header */
.panel-header {
    text-align: center;
    margin-bottom: 1.2rem;
    color: #2d3748;
}

.panel-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    color: #2d3748;
}

.panel-header p {
    font-size: 0.9rem;
    color: #718096;
}

/* Calculator Card */
.calculator-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    margin-bottom: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

/* Calculation Question Style */
.calc-question {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-bottom: 1.2rem;
    font-size: 1rem;
    font-weight: 500;
    color: #2d3748;
}

.calc-question.large {
    font-size: 1.05rem;
    gap: 0.8rem;
}

.question-text {
    color: #4a5568;
    font-weight: 600;
}

.inline-input {
    width: 100px;
    padding: 0.6rem 0.8rem;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    color: #2d3748;
}

.inline-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Form Inputs */
.input-group {
    margin-bottom: 1rem;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.input-label i {
    color: #667eea;
}

.form-input {
    width: 100%;
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.3s ease;
    color: #2d3748;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-select {
    width: 100%;
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #2d3748;
}

.form-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* VAT Specific Styles */
.vat-options {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.vat-rate-selector {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.vat-rate-selector label {
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
}

.vat-rate-selector label i {
    color: #667eea;
}

.custom-rate-input {
    margin-top: 0.4rem;
}

.vat-mode-selector {
    display: flex;
    gap: 0.8rem;
}

.vat-mode-btn {
    flex: 1;
    padding: 0.7rem;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.vat-mode-btn i {
    font-size: 1rem;
}

.vat-mode-btn:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.vat-mode-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Calculate Button */
.calculate-btn {
    width: 100%;
    padding: 0.8rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.calculate-btn:active {
    transform: translateY(0);
}

.calculate-btn i {
    font-size: 1rem;
}

/* Result Box */
.result-box {
    margin-top: 1.2rem;
    padding: 1.2rem;
    background: linear-gradient(135deg, #f6f8fb 0%, #e9ecef 100%);
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    animation: slideIn 0.4s ease;
}

.result-box.large {
    padding: 1.5rem;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #667eea;
    margin-bottom: 0.8rem;
    word-break: break-all;
}

.result-value.large {
    font-size: 2rem;
}

/* VAT Results */
.vat-results {
    margin-top: 1.2rem;
    animation: slideIn 0.4s ease;
}

.vat-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.vat-result-item {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    text-align: center;
    transition: all 0.3s ease;
}

.vat-result-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.vat-result-item.vat-amount-highlight {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border-color: #fc8181;
}

.vat-result-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #718096;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vat-result-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: #2d3748;
}

.vat-amount-highlight .vat-result-value {
    color: #c53030;
}

/* Change Results */
.change-result-header {
    text-align: center;
    margin-bottom: 1rem;
}

.change-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    margin-top: 0.6rem;
}

.change-indicator.increase {
    background: #c6f6d5;
    color: #22543d;
}

.change-indicator.increase::before {
    content: "↑";
    font-size: 1.2rem;
}

.change-indicator.decrease {
    background: #fed7d7;
    color: #742a2a;
}

.change-indicator.decrease::before {
    content: "↓";
    font-size: 1.2rem;
}

.change-details {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
}

.detail-label {
    font-weight: 600;
    color: #4a5568;
    font-size: 0.9rem;
}

.detail-value {
    font-size: 1rem;
    font-weight: 700;
    color: #2d3748;
}

/* Increase/Decrease Results */
.increase-result-grid,
.decrease-result-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.result-item {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    text-align: center;
}

.result-item.highlight {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border-color: #fc8181;
}

.result-item.highlight .result-value {
    color: #c53030;
}

.result-item.primary {
    background: linear-gradient(135deg, #e6f2ff 0%, #bfdbfe 100%);
    border-color: #667eea;
}

.result-item.primary .result-value {
    color: #667eea;
    font-size: 1.5rem;
}

/* Copy Button */
.copy-btn {
    padding: 0.6rem 1.2rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.copy-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.copy-btn.full-width {
    width: 100%;
    justify-content: center;
}

.copy-btn.copied {
    background: #48bb78;
}

/* Calculation Steps */
.calculation-steps {
    margin-top: 1.2rem;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.calculation-steps h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.steps-content {
    color: #4a5568;
    line-height: 1.6;
    font-size: 0.9rem;
}

.steps-content p {
    margin-bottom: 0.4rem;
}

.steps-content strong {
    color: #2d3748;
}

/* Info Box */
.info-box {
    margin-top: 1rem;
    padding: 1rem;
    background: #e6f2ff;
    border-radius: 8px;
    border-left: 3px solid #3182ce;
}

.info-box h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #2c5282;
    margin-bottom: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.info-box ul {
    list-style: none;
    padding: 0;
}

.info-box li {
    padding: 0.4rem 0;
    color: #2c5282;
    line-height: 1.5;
    font-size: 0.85rem;
}

.info-box strong {
    color: #1e4e8c;
}

/* Examples Section */
.examples-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.examples-section h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.example-item {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.example-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    border-color: #667eea;
}

.example-icon {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 0.7rem;
}

.example-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.4rem;
}

.example-description {
    font-size: 0.85rem;
    color: #718096;
    line-height: 1.4;
}

/* Related Tools Section */
.related-tools-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.related-tools-header {
    text-align: center;
    margin-bottom: 1.2rem;
}

.related-tools-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.related-tools-header p {
    color: #718096;
    font-size: 0.9rem;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.8rem;
}

.related-tool-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1.2rem;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    color: #2d3748;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.related-tool-link:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateX(3px);
}

.related-tool-link i {
    font-size: 1.1rem;
}

/* SEO Content Section */
.seo-content {
    background: white;
    margin-top: 3rem;
    padding: 3rem 1rem;
}

.seo-content .container {
    max-width: 900px;
    margin: 0 auto;
}

.seo-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1rem;
}

.seo-content h3 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #2d3748;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.seo-content h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #4a5568;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}

.seo-content p {
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.seo-content ul {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.seo-content li {
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.seo-content strong {
    color: #2d3748;
    font-weight: 600;
}

.mb-10 {
    margin-bottom: 3rem;
}

/* ============================================
   RESPONSIVE DESIGN - Mobile Optimization
   ============================================ */

@media (max-width: 768px) {
    .percentage-calculator-uk-tool {
        padding: 1rem 0.8rem;
    }

    .tool-header h1 {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 0.4rem;
    }

    .tool-header h1 i {
        font-size: 1.4rem;
    }

    .tool-description {
        font-size: 0.9rem;
    }

    .calculator-tabs {
        gap: 0.3rem;
        padding: 0.3rem;
    }

    .calc-tab {
        padding: 0.5rem 0.4rem;
        font-size: 0.7rem;
        min-width: 65px;
    }

    .calc-tab i {
        font-size: 1rem;
    }

    .calc-tab span {
        font-size: 0.65rem;
    }

    .panel-header h2 {
        font-size: 1.2rem;
        flex-direction: column;
        gap: 0.4rem;
    }

    .panel-header p {
        font-size: 0.85rem;
    }

    .calculator-card {
        padding: 1.2rem;
    }

    .calc-question {
        font-size: 0.95rem;
        gap: 0.6rem;
    }

    .calc-question.large {
        font-size: 1rem;
    }

    .inline-input {
        width: 85px;
        padding: 0.6rem 0.7rem;
        font-size: 0.95rem;
    }

    .form-input,
    .form-select {
        padding: 0.65rem 0.9rem;
        font-size: 0.9rem;
    }

    .vat-mode-selector {
        flex-direction: column;
    }

    .vat-result-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .calculate-btn {
        padding: 0.75rem 1.3rem;
        font-size: 0.9rem;
    }

    .result-value {
        font-size: 1.5rem;
    }

    .result-value.large {
        font-size: 1.7rem;
    }

    .examples-grid {
        grid-template-columns: 1fr;
    }

    .related-tools-grid {
        grid-template-columns: 1fr;
    }

    .examples-section,
    .related-tools-section {
        padding: 1.2rem;
    }

    .seo-content {
        padding: 1.5rem 1rem;
    }

    .seo-content h2 {
        font-size: 1.4rem;
    }

    .seo-content h3 {
        font-size: 1.2rem;
    }

    .seo-content h4 {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .tool-header h1 {
        font-size: 1.3rem;
    }

    .calc-question {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        font-size: 0.9rem;
    }

    .inline-input {
        width: 100%;
    }

    .calculator-card {
        padding: 1rem;
    }

    .result-box {
        padding: 1rem;
    }

    .result-value {
        font-size: 1.4rem;
        word-break: break-word;
    }

    .vat-mode-btn {
        font-size: 0.85rem;
        padding: 0.7rem;
    }
    
    .example-item {
        padding: 1rem;
    }
    
    .related-tool-link {
        padding: 0.8rem 1rem;
        font-size: 0.85rem;
    }
}

/* Print Styles */
@media print {
    .percentage-calculator-uk-tool {
        background: white;
    }

    .calculator-tabs,
    .calculate-btn,
    .copy-btn,
    .examples-section,
    .related-tools-section {
        display: none;
    }

    .calculator-card {
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }
}

