/* CalWhat Calculator Platform - StudentLoanCalculator 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;
        transition: all 0.3s ease;
        background: white;
        font-family: 'Roboto Mono', monospace;
        font-weight: 500;
    }

    .form-input:focus {
        outline: none;
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }

    .input-row {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }


    .result-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
        margin-top: 20px;
    }

    .result-item {
        background: white;
        padding: 15px;
        border-radius: 10px;
        text-align: center;
        border: 2px solid transparent;
        transition: all 0.3s ease;
    }

    .result-item:hover {
        border-color: #667eea;
        transform: translateY(-2px);
    }

    .result-label {
        font-size: 0.9rem;
        color: #718096;
        margin-bottom: 5px;
    }

    .result-value {
        font-size: 1.5rem;
        font-weight: 700;
        color: #2d3748;
        font-family: 'Roboto Mono', monospace;
    }

    .result-value.highlight {
        color: #667eea;
        font-size: 1.8rem;
    }

    .chart-container {
        position: relative;
        height: 400px;
        margin-top: 20px;
    }

    .repayment-schedule {
        margin-top: 20px;
        max-height: 400px;
        overflow-y: auto;
    }

    .schedule-table {
        width: 100%;
        border-collapse: collapse;
    }

    .schedule-table thead {
        position: sticky;
        top: 0;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        z-index: 10;
    }

    .schedule-table th,
    .schedule-table td {
        padding: 12px;
        text-align: center;
        border-bottom: 1px solid #e2e8f0;
    }

    .schedule-table tbody tr:hover {
        background-color: #f7fafc;
    }

    .schedule-table tbody tr.grace-period {
        background-color: #fef5e7;
    }

    .suggestions {
        background: linear-gradient(135deg, #fef5e7 0%, #fdebd0 100%);
        padding: 20px;
        border-radius: 15px;
        margin-top: 20px;
        border-left: 4px solid #f39c12;
    }

    .suggestions h3 {
        color: #d68910;
        margin-bottom: 15px;
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 1.1rem;
    }

    .suggestions ul {
        list-style: none;
        padding: 0;
    }

    .suggestions li {
        padding: 8px 0;
        color: #7c6d2c;
        display: flex;
        align-items: start;
        gap: 10px;
    }

    .suggestions li:before {
        content: "→";
        color: #f39c12;
        font-weight: bold;
        flex-shrink: 0;
    }

    @keyframes fadeInDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* 多筆貸款管理樣式 */
    .loan-item {
        background: white;
        padding: 15px;
        border-radius: 10px;
        margin-bottom: 10px;
        border: 2px solid #e2e8f0;
        transition: all 0.3s ease;
    }

    .loan-item:hover {
        border-color: #667eea;
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
    }

    .loan-item-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
    }

    .loan-item-title {
        font-weight: 600;
        color: #2d3748;
        font-size: 1rem;
    }

    .btn-remove-loan {
        background: #ef4444;
        color: white;
        border: none;
        padding: 5px 10px;
        border-radius: 6px;
        cursor: pointer;
        font-size: 0.85rem;
        transition: all 0.3s ease;
    }

    .btn-remove-loan:hover {
        background: #dc2626;
        transform: scale(1.05);
    }

    .loan-inputs {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .loan-input-group {
        display: flex;
        flex-direction: column;
    }

    .loan-input-label {
        font-size: 0.8rem;
        color: #718096;
        margin-bottom: 4px;
    }

    .loan-input {
        padding: 8px;
        border: 2px solid #48bb78;
        border-radius: 8px;
        font-size: 0.9rem;
        font-weight: 500;
        font-family: 'Roboto Mono', monospace;
    }

    .loan-input:focus {
        outline: none;
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }

    /* Alert 樣式 */
    .alert-success {
        background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
        border-left: 4px solid #28a745;
        padding: 15px;
        border-radius: 10px;
        margin-bottom: 15px;
    }

    .alert-success h5 {
        color: #155724;
        margin-bottom: 8px;
        font-size: 1rem;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .alert-success p {
        color: #155724;
        margin: 0;
        font-size: 0.9rem;
        line-height: 1.5;
    }

    /* 模板按鈕樣式 */
    .template-btn {
        background: white;
        border: 2px solid #667eea;
        color: #667eea;
        padding: 10px;
        border-radius: 10px;
        cursor: pointer;
        transition: all 0.3s ease;
        font-size: 0.85rem;
        font-weight: 600;
        text-align: center;
    }

    .template-btn:hover {
        background: #667eea;
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    }

    .template-btn .template-icon {
        font-size: 1.5rem;
        margin-bottom: 5px;
    }

    .template-btn .template-amount {
        font-size: 0.75rem;
        opacity: 0.8;
        margin-top: 5px;
    }

    @media (max-width: 768px) {
        .page-header h1 {
            font-size: 2rem;
        }

        .input-row {
            grid-template-columns: 1fr;
        }

        .result-grid {
            grid-template-columns: 1fr;
        }

        .chart-container {
            height: 300px;
        }

        .schedule-table {
            font-size: 0.85rem;
        }

        .schedule-table th,
        .schedule-table td {
            padding: 8px 4px;
        }

        .loan-inputs {
            grid-template-columns: 1fr;
        }
    }