/* CalWhat Calculator Platform - CostToOwnACar Specific Styles */
/* This file contains calculator-specific styles */

    .input-group-custom {
        margin-bottom: 12px;
    }

    .input-label {
        font-weight: 500;
        color: #4a5568;
        margin-bottom: 8px;
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 0.95rem;
        position: relative;
    }

    .tooltip-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background: #667eea;
        color: white;
        font-size: 0.7rem;
        cursor: help;
        margin-left: 5px;
        position: relative;
    }

    .tooltip-icon:hover .tooltip-text {
        visibility: visible;
        opacity: 1;
    }

    .tooltip-text {
        visibility: hidden;
        opacity: 0;
        position: absolute;
        z-index: 1000;
        bottom: 125%;
        left: 50%;
        transform: translateX(-50%);
        background-color: #2d3748;
        color: white;
        text-align: center;
        padding: 8px 12px;
        border-radius: 8px;
        font-size: 0.85rem;
        white-space: nowrap;
        transition: opacity 0.3s;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        font-weight: 400;
    }

    .tooltip-text::after {
        content: "";
        position: absolute;
        top: 100%;
        left: 50%;
        margin-left: -5px;
        border-width: 5px;
        border-style: solid;
        border-color: #2d3748 transparent transparent transparent;
    }

    .input-wrapper {
        position: relative;
    }

    .form-input {
        width: 100%;
        padding: 10px 12px;
        border: 2px solid #48bb78;
        border-radius: 12px;
        font-size: 1rem;
        font-family: 'Roboto Mono', monospace;
        transition: all 0.3s ease;
        background: #f0fff4;
    }

        .form-input:focus {
            outline: none;
            border-color: #38a169;
            box-shadow: 0 0 0 4px rgba(72, 187, 120, 0.2);
            transform: translateY(-2px);
        }

    .input-range {
        font-size: 0.75rem;
        color: #2d3748;
        margin-top: 4px;
    }

    .form-input.error {
        border-color: #ef4444;
        animation: shake 0.5s ease;
    }

    @keyframes shake {
        0%, 100% {
            transform: translateX(0);
        }

        25% {
            transform: translateX(-10px);
        }

        75% {
            transform: translateX(10px);
        }
    }

    .input-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    @media (max-width: 768px) {
        .input-row {
            grid-template-columns: 1fr;
        }
    }

    .result-card {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
    }

    @media (min-width: 992px) {
        .result-card {
            position: sticky;
            top: 20px;
        }
    }

    .result-main {
        text-align: center;
        padding: 20px 0;
    }

    .result-label {
        font-size: 1.2rem;
        font-weight: 500;
        opacity: 0.95;
        margin-bottom: 10px;
    }

    .result-value {
        font-family: 'Roboto Mono', monospace;
        font-size: 3rem;
        font-weight: 700;
        margin-bottom: 30px;
        animation: pulse 0.5s ease;
    }

    @keyframes pulse {
        0%, 100% {
            transform: scale(1);
        }

        50% {
            transform: scale(1.05);
        }
    }

    .result-divider {
        border: 0;
        height: 2px;
        background: rgba(255, 255, 255, 0.3);
        margin: 20px 0;
    }

    .result-details {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        padding: 12px;
        margin-top: 15px;
    }

    .result-item {
        display: flex;
        justify-content: space-between;
        padding: 6px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

        .result-item:last-child {
            border-bottom: none;
        }

    .result-item-label {
        font-size: 0.9rem;
        opacity: 0.9;
    }

    .result-item-value {
        font-family: 'Roboto Mono', monospace;
        font-weight: 600;
    }

    .chart-container {
        position: relative;
        height: 350px;
        margin: 10px 0;
    }

    .btn-container {
        display: flex;
        gap: 15px;
        flex-wrap: wrap;
        margin-top: 20px;
    }

  

    .btn-primary-custom {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
    }

        .btn-primary-custom:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
        }

    .btn-secondary-custom {
        background: transparent;
        border: 2px solid #667eea;
        color: #667eea;
    }

        .btn-secondary-custom:hover {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            transform: translateY(-3px);
        }




    @keyframes fadeInDown {
        from {
            opacity: 0;
            transform: translateY(-30px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .accordion-button:not(.collapsed) {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
    }

    .accordion-button:focus {
        box-shadow: none;
    }

    @media (max-width: 768px) {
        .page-header h1 {
            font-size: 2rem;
        }

        .result-value {
            font-size: 2rem;
        }

        .glass-card {
            padding: 20px;
        }

        .btn-container {
            flex-direction: column;
        }

        .btn-custom {
            width: 100%;
        }
    }

    .spinner {
        display: none;
        border: 3px solid rgba(255, 255, 255, 0.3);
        border-top: 3px solid white;
        border-radius: 50%;
        width: 20px;
        height: 20px;
        animation: spin 1s linear infinite;
    }

    @keyframes spin {
        0% {
            transform: rotate(0deg);
        }

        100% {
            transform: rotate(360deg);
        }
    }

    .loading .spinner {
        display: inline-block;
    }

    /* 快速範本樣式 */
    .template-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 15px;
        margin-top: 15px;
    }

    .template-btn {
        background: white;
        border: 2px solid #e2e8f0;
        border-radius: 12px;
        padding: 20px 15px;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        text-align: center;
    }

        .template-btn:hover {
            border-color: #667eea;
            background: linear-gradient(135deg, rgba(102,126,234,0.05) 0%, rgba(118,75,162,0.05) 100%);
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(102,126,234,0.15);
        }

        .template-btn i {
            font-size: 2rem;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .template-btn span {
            font-weight: 600;
            color: #2d3748;
            font-size: 0.95rem;
        }

        .template-btn small {
            color: #718096;
            font-size: 0.8rem;
        }

    /* 長期持有成本對比樣式 */
    .ownership-comparison {
        margin-top: 25px;
        padding: 20px;
        background: linear-gradient(135deg, rgba(102,126,234,0.05) 0%, rgba(118,75,162,0.05) 100%);
        border-radius: 12px;
        border: 2px solid rgba(102,126,234,0.2);
    }

    .comparison-title {
        font-size: 1.1rem;
        font-weight: 600;
        color: #2d3748;
        margin-bottom: 15px;
        display: flex;
        align-items: center;
        gap: 10px;
    }

        .comparison-title i {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

    .comparison-row {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 15px;
    }

    .comparison-item {
        background: white;
        padding: 15px;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }

        .comparison-item .year-label {
            font-size: 0.85rem;
            color: #718096;
            font-weight: 500;
            margin-bottom: 5px;
        }

        .comparison-item .year-cost {
            font-size: 1.5rem;
            font-weight: 700;
            color: #2d3748;
            margin-bottom: 5px;
        }

        .comparison-item .avg-cost {
            font-size: 0.9rem;
            color: #667eea;
            font-weight: 600;
        }

        .comparison-item .badge {
            margin-top: 8px;
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 600;
        }

    .comparison-recommendation {
        margin-top: 15px;
        padding: 12px 15px;
        background: white;
        border-radius: 8px;
        border-left: 4px solid #48bb78;
        font-size: 0.9rem;
        color: #2d3748;
    }

        .comparison-recommendation i {
            color: #48bb78;
            margin-right: 8px;
        }

    @media (max-width: 768px) {
        .template-grid {
            grid-template-columns: repeat(2, 1fr);
        }

        .comparison-row {
            grid-template-columns: 1fr;
        }
    }