/* Import Manrope Font */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@200;300;400;500;600;700;800&display=swap');

/* Reset and base styles with high specificity */
.tyfc-calculator-wrapper[data-tyfc="true"] {
    all: initial !important;
    font-family: 'Manrope', sans-serif !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] *,
.tyfc-calculator-wrapper[data-tyfc="true"] *::before,
.tyfc-calculator-wrapper[data-tyfc="true"] *::after {
    box-sizing: border-box !important;
    font-family: 'Manrope', sans-serif !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-calculator-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 20px !important;
    font-family: 'Manrope', sans-serif !important;
    min-height: 100vh !important;
    position: relative !important;
    z-index: 1 !important;
    background: transparent !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-main-content {
    display: flex !important;
    gap: 30px !important;
    background-color: white !important;
    padding: 24px !important;
    flex-wrap: wrap !important;
    border-radius: 16px !important;
    margin: 0 auto !important;
    box-shadow: 3px 3px 20px rgba(0, 0, 0, 0.09) !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-calculator-section {
    flex: 1 !important;
    min-width: 400px !important;
    background: white !important;
    padding: 5px !important;
    border-radius: 16px !important;
    border: 1px solid #e0e0e0 !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-results-section {
    flex: 1 !important;
    min-width: 400px !important;
    background: #D8EBFD !important;
    padding: 30px !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
    border: 1px solid #e0e0e0 !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-student-form {
    background: white !important;
    padding: 0 24px !important;
    margin-bottom: 20px !important;
    position: relative !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-student-form.active {
    border-color: #007cba !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-student-header-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    margin-bottom: 24px !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-student-header {
    flex: 1 !important;
    background: #dbeeff !important;
    border-radius: 12px !important;
    padding: 12px 24px !important;
    display: flex !important;
    align-items: center !important;
    font-weight: 600 !important;
    color: #174573 !important;
    font-size: 16px !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-remove-student {
    background: #f3f4f6 !important;
    color: #222 !important;
    border: none !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    font-size: 22px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: none !important;
    margin-left: 8px !important;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-remove-student:hover {
    background: #e0e0e0 !important;
    color: #d32f2f !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-student-number {
    font-weight: 600 !important;
    color: #1976d2 !important;
    font-size: 16px !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-form-group {
    margin-bottom: 24px !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-form-group label {
    display: block !important;
    margin-bottom: 8px !important;
    font-weight: 600 !important;
    color: #333 !important;
    font-size: 14px !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-form-group select, 
.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-form-group input {
    width: 100% !important;
    padding: 14px 16px !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-family: 'Manrope', sans-serif !important;
    transition: all 0.2s ease !important;
    background: white !important;
    color: #333 !important;
    box-sizing: border-box !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-form-group select:focus, 
.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-form-group input:focus {
    outline: none !important;
    border-color: #007cba !important;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1) !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-plan-details {
    background: #f8f9fa !important;
    padding: 16px !important;
    border-radius: 8px !important;
    margin-top: 15px !important;
    display: none !important;
    border: 1px solid #e9ecef !important;
    text-align: center !important;
    color: #007cba !important;
    font-weight: 600 !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-plan-details.show {
    display: block !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-date-range {
    display: flex !important;
    gap: 12px !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-date-range input {
    flex: 1 !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-btn-row {
    display: flex !important;
    gap: 20px !important;
    margin: 25px 25px 73px !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: 'Manrope', sans-serif !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    border-radius: 999px !important;
    padding: 0 32px !important;
    height: 48px !important;
    min-width: 180px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    line-height: 1 !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-btn-outline {
    background: #fff !important;
    color: #1890ff !important;
    border: 2px solid #1890ff !important;
    width: 100% !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-btn-outline:hover {
    background: #e6f2ff !important;
    color: #007cba !important;
    border-color: #007cba !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-btn-solid {
    background: #1890ff !important;
    color: #fff !important;
    border: 2px solid #1890ff !important;
    width: 100% !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-form-group select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
    padding-right: 40px !important;
    position: relative !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-btn-solid:hover {
    background: #007cba !important;
    border-color: #007cba !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-btn .tyfc-btn-icon {
    font-size: 22px !important;
    margin-right: 10px !important;
    display: flex !important;
    align-items: center !important;
}

/* Remove old button styles for add/calculate */
.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-add-student-btn,
.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-calculate-btn { 
    display: none !important; 
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-result-card {
    background: white !important;
    padding: 24px !important;
    margin-bottom: 20px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
    border: 1px solid #e9ecef !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-result-card.discounted {
    border-left-color: #28a745 !important;
    background: #f8fff9 !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-result-header {
    font-weight: 600 !important;
    color: #007cba !important;
    margin-bottom: 16px !important;
    font-size: 16px !important;
    background: #e3f2fd !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    border: 1px solid #bbdefb !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-fee-breakdown {
    margin-bottom: 20px !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-fee-item {
    display: flex !important;
    justify-content: space-between !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
    font-size: 14px !important;
    color: #333 !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-fee-item:last-child {
    border-bottom: none !important;
    font-weight: 600 !important;
    color: #007cba !important;
    font-size: 16px !important;
    padding-top: 16px !important;
    margin-top: 12px !important;
    border-top: 2px solid #e9ecef !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-discount-applied {
    color: #28a745 !important;
    font-weight: 600 !important;
    text-align: center !important;
    margin-top: 15px !important;
    padding: 12px !important;
    background: #d4edda !important;
    border-radius: 8px !important;
    border: 1px solid #c3e6cb !important;
    font-size: 14px !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-error {
    color: #dc3545 !important;
    font-size: 12px !important;
    margin-top: 8px !important;
    font-weight: 500 !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-total-summary {
    background: #007cba !important;
    color: white !important;
    padding: 24px !important;
    border-radius: 12px !important;
    text-align: center !important;
    margin-top: 20px !important;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3) !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-total-summary h3 {
    margin: 0 0 8px 0 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-total-summary .total-amount {
    font-size: 28px !important;
    font-weight: 700 !important;
    margin: 8px 0 !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-total-summary .total-info {
    font-size: 14px !important;
    opacity: 0.9 !important;
    margin-top: 8px !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-result-outer-card {
    background: #D8EBFD !important;
    padding: 0 25px !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-result-outer-card .tyfc-result-table-row:nth-child(1){
    border-bottom: 0 !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-result-student-pill {
    background: #fff !important;
    color: #174573 !important;
    font-weight: 600 !important;
    font-size: 18px !important;
    border-radius: 10px !important;
    padding: 10px 24px !important;
    margin-bottom: 24px !important;
    margin-top: 30px !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03) !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-result-table-row {
    display: flex !important;
    align-items: center !important;
    border-bottom: 1px solid #FFFFFF !important;
    padding: 10px 0 !important;
    font-size: 16px !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-result-key {
    color: #174573 !important;
    font-weight: 500 !important;
    text-align: left !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-result-value {
    flex: 2 !important;
    color: #222 !important;
    font-weight: 500 !important;
    text-align: right !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-result-final-row {
    border-bottom: 1px solid #FFFFFF !important;
    font-weight: 700 !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-result-final-amount {
    color: #222 !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-total-summary-pill {
    background: #174573 !important;
    color: #fff !important;
    border-radius: 20px !important;
    padding: 32px 32px 20px 32px !important;
    margin-top: 32px !important;
    margin-bottom: 0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
    max-width: 98% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-total-summary-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-total-summary-row-top {
    margin-bottom: 18px !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-total-summary-row-bottom {
    font-size: 1.25rem !important;
    font-weight: 400 !important;
    opacity: 1 !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-total-summary-note-left {
    text-align: left !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-total-summary-note-right {
    text-align: right !important;
}

/* Additional Services Styles */
.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-additional-services {
    margin-top: 20px !important;
    padding: 15px !important;
    background: #f8f9fa !important;
    border-radius: 5px !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-toggle-group {
    margin: 10px 0 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 5px 0 !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-toggle-group .toggle-label-price {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-toggle-group .service-price {
    color: #007cba !important;
    font-weight: bold !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .additional-services-header {
    background: #f8f9fa !important;
    font-weight: bold !important;
    padding: 5px 10px !important;
    margin-top: 10px !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .additional-service {
    padding-left: 20px !important;
    color: #666 !important;
}

/* Slider Toggle Button Styles */
.tyfc-calculator-wrapper[data-tyfc="true"] .switch {
    position: relative !important;
    display: inline-block !important;
    width: 60px !important;
    height: 34px !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .switch input {
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .slider {
    position: absolute !important;
    cursor: pointer !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background-color: #ccc !important;
    transition: .4s !important;
    border-radius: 34px !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] .slider:before {
    position: absolute !important;
    content: "" !important;
    height: 26px !important;
    width: 26px !important;
    left: 4px !important;
    bottom: 4px !important;
    background-color: white !important;
    transition: .4s !important;
    border-radius: 50% !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] input:checked + .slider {
    background-color: #007cba !important;
}

.tyfc-calculator-wrapper[data-tyfc="true"] input:checked + .slider:before {
    transform: translateX(26px) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-main-content {
        flex-direction: column !important;
    }
    
    .tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-date-range {
        flex-direction: column !important;
    }
    
    .tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-calculator-section,
    .tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-results-section {
        min-width: 100% !important;
    }
    
    .tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-btn-row {
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    .tyfc-calculator-wrapper[data-tyfc="true"] .tyfc-student-header-row {
        flex-direction: column !important;
        gap: 15px !important;
    }
}