/* Tool-specific styles */
.input-icon{
    left: 70% !important;
}
.tool-container {
    padding: 1rem 1rem;
    background: #f8f9fa;
    min-height: calc(100vh - 300px);
}

.tool-header {
    display: flex;
    flex-direction: column;
    text-align: center;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.tool-title-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.tool-icon {
   width: 64px;                  /* Box width */
    height: 64px;                 /* Box height */
    flex-shrink: 0;               /* Prevents text from squishing the box */
    
    /* Box Styling */
    background-color: #f3f4f6;    /* Light gray background (change as needed) */
    border: 1px solid #e5e7eb;    /* Subtle border */
    border-radius: 12px;          /* Smooth rounded corners */
    padding: 12px;                /* Inner spacing so icon doesn't touch box edges */
    box-sizing: border-box;       /* Ensures padding stays inside the 64x64px box */
    
    /* Centering the icon */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Optional: Subtle drop shadow */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.tool-icon img{
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;          /* Preserves natural aspect ratio */
    display: block;
}
.tool-header h1 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.tool-description {
    color:var(--text-secondary);
    margin: 0;
}

.tool-stats {
    display: flex;
    justify-content: space-evenly;
    width: 100%;
    justify-content: space-evenly;
    width: 100%;
}

.stat {
    text-align: center;
    padding: 0.4rem 1rem;
    min-width: 100px;
}

.stat-icon {
    display: block;
}

.stat-value {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Tool wrapper */
.tool-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}
.rating-section {
            background: white;
            border-radius: 15px;
            padding: 30px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
            margin-bottom: 30px;
        }
        
        .rating-summary {
            display: flex;
            align-items: center;
            gap: 15px;
            flex-wrap: wrap;
        }
        
        .rating-average {
            text-align: center;
            min-width: 120px;
        }
        
        .rating-average .number {
            font-size: 3rem;
            font-weight: 700;
            color: #1f2937;
            line-height: 1;
        }
        
        .rating-average .stars {
            font-size: 1.2rem;
            margin: 5px 0;
        }
        
        .rating-average .count {
            font-size: 0.9rem;
            color: #6b7280;
        }
        
        .rating-bars {
            flex: 1;
            min-width: 250px;
        }
        
        .rating-bar {
            display: flex;
            align-items: center;
            margin-bottom: 8px;
        }
        
        .rating-bar .label {
            width: 60px;
            text-align: right;
            font-size: 0.9rem;
            color: #374151;
        }
        
        .rating-bar .progress {
            flex: 1;
            height: 8px;
            margin: 0 10px;
            background: #e5e7eb;
            border-radius: 4px;
            overflow: hidden;
        }
        
        .rating-bar .progress-bar {
            background: linear-gradient(135deg, #f59e0b, #d97706);
            transition: width 0.3s;
        }
        
        .rating-bar .count {
            width: 30px;
            font-size: 0.85rem;
            color: #6b7280;
        }
        
        .review-btn {
            background: linear-gradient(135deg, #667eea, #764ba2);
            border: none;
            padding: 10px 25px;
            font-weight: 500;
            color: white;
            border-radius: 8px;
            transition: all 0.3s;
        }
        
        .review-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
        }
        
        .review-item {
            padding: 20px 0;
            border-bottom: 1px solid #e5e7eb;
        }
        
        .review-item:last-child {
            border-bottom: none;
        }
        
        .review-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
        }
        
        .reviewer-name {
            font-weight: 600;
            color: #1f2937;
        }
        
        .review-date {
            font-size: 0.85rem;
            color: #9ca3af;
        }
        
        .review-stars {
            color: #f59e0b;
            font-size: 0.9rem;
        }
        
        .review-text {
            color: #6b7280;
            line-height: 1.6;
        }
        
        .badge-verified {
            background: #10b981;
            color: white;
            font-size: 0.7rem;
            padding: 3px 8px;
            border-radius: 12px;
        }
        
        /* Star Rating Input */
        .star-rating-input {
            display: flex;
            flex-direction: row-reverse;
            justify-content: center;
            gap: 10px;
        }
        
        .star-rating-input input {
            display: none;
        }
        
        .star-rating-input label {
            cursor: pointer;
            font-size: 2.5rem;
            color: #ddd;
            transition: color 0.2s, transform 0.2s;
        }
        
        .star-rating-input label:hover {
            transform: scale(1.2);
        }
        
        .star-rating-input input:checked ~ label,
        .star-rating-input label:hover,
        .star-rating-input label:hover ~ label {
            color: #f59e0b;
        }
        
        /* Modal styling */
        .modal-content {
            border-radius: 15px;
            border: none;
        }
        
        .modal-header {
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
            border-radius: 15px 15px 0 0;
        }
        
        .modal-header .btn-close {
            filter: brightness(0) invert(1);
        }
@media (max-width: 992px) {
    .tool-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Input section */
.input-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.input-section h2 {
    color: #333;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #667eea;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group textarea,
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group textarea:focus,
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.char-count {
    text-align: right;
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
}

.btn-generate {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-generate:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-text,
.btn-loader {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Output section */
.output-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #667eea;
}

.output-header h2 {
    color: #333;
    margin: 0;
    font-size: 1.5rem;
}

.output-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-action {
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-action:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.output-container {
    flex: 1;
    min-height: 300px;
    max-height: 500px;
    overflow-y: auto;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.output-placeholder {
    color: #999;
    font-style: italic;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.output-placeholder p {
    margin: 0;
}

.placeholder-hint {
    font-size: 0.9rem;
    margin-top: 0.5rem !important;
    color: #adb5bd;
}

.output-meta {
    display: flex;
    gap: 1.5rem;
    padding: 1rem;
    background: #f1f3f5;
    border-radius: 6px;
    margin-top: 1rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.meta-value {
    font-weight: 600;
    color: #333;
}

/* Save options */
.save-options {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.save-options h3 {
    color: #333;
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
}

.save-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn-save {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-save:hover {
    background: #f8f9fa;
    border-color: #667eea;
    color: #667eea;
}

/* Tool tips */
.tool-tips {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.tool-tips h3 {
    color: #333;
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.tip {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.tip h4 {
    color: #333;
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.tip p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Related tools */
.related-tools {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-top: 1rem;
}

.related-tools h3 {
    color: #333;
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.related-tool {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.related-tool:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.related-tool .tool-icon {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
}

.related-tool .tool-name {
    font-weight: 500;
}

/* FAQ section */
.faq-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.faq-section h3 {
    color: #333;
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.faq-question {
    padding: 1rem;
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question::after {
    content: '▼';
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 1rem;
    color: #666;
    line-height: 1.5;
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

/* Ad containers */
.ad-container {
    margin: 2rem 0;
    text-align: center;
}

.ad-placeholder {
    width: 100%;
    padding: 3rem 1rem;
    background: linear-gradient(45deg, #f5f5f5 25%, #e0e0e0 25%, #e0e0e0 50%, #f5f5f5 50%, #f5f5f5 75%, #e0e0e0 75%, #e0e0e0);
    background-size: 40px 40px;
    border-radius: 8px;
    color: #999;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Loading animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

/* Responsive adjustments */
@media (max-width: 450px) {
    .calc-type-selector, .preset-values{
        grid-template-columns: 1fr !important;
    }
    .gst-rate-selector{
             grid-template-columns: 1fr !important;
           }    
        
}
@media (max-width: 768px) {
    .loan-type-selector {
                 grid-template-columns: none !important;
            }
    .tool-header {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .tool-stats {
        width: 100%;
        justify-content: space-between;
    }
    
    .stat {
        min-width: auto;
        flex: 1;
    }
    
    .tool-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .input-section,
    .output-section,
    .tool-tips,
    .related-tools,
    .faq-section {
        padding: 1.5rem;
    }
}



        .subtitle {
            font-size: 1.1rem;
            opacity: 0.9;
        }
        
        .content {
            display: flex;
            flex-wrap: wrap;
            padding: 0;
        }
        
        .calculator-section {
            flex: 1;
            min-width: 300px;
            padding: 30px;
            border-right: 1px solid #eee;
        }
        
        .result-section {
            flex: 1;
            min-width: 300px;
            padding: 30px;
            background-color: #f9fafc;
        }
        
        .form-group {
            margin-bottom: 25px;
        }
        
        label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: #555;
        }
        
        input[type="date"], input[type="text"] {
            padding: 2px 4px;
            border: 2px solid #ddd;
            border-radius: 8px;
            transition: border-color 0.3s;
        }
        
        input[type="date"]:focus, input[type="text"]:focus {
            border-color: #6a11cb;
            outline: none;
        }
        
        button {
            background: var(--primary);
            color: var(--bg-light);
            border: none;
            padding: 15px 25px;
            font-size: 1.1rem;
            border-radius: 8px;
            cursor: pointer;
            width: 100%;
            font-weight: 600;
            letter-spacing: 0.5px;
            transition: transform 0.3s, box-shadow 0.3s;
        }
        
        button:hover {
            background-color: var(--primary-hover);
            transform: translateY(-3px);
            box-shadow: 0 5px 15px rgba(106, 17, 203, 0.3);
        }
        
        .result-box {
            background-color: white;
            border-radius: 10px;
            padding: 25px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
            margin-top: 20px;
        }
        
        .age-display {
            text-align: center;
            padding: 20px;
            margin-bottom: 25px;
        }
        
        .age-value {
            font-size: 3.5rem;
            font-weight: 800;
            color: #6a11cb;
            line-height: 1;
        }
        
        .age-unit {
            font-size: 1.5rem;
            color: #777;
            margin-top: 10px;
        }
        
        .breakdown {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
            margin-bottom: 20px;
        }
        
        .breakdown-item {
            text-align: center;
            padding: 15px;
            background-color: #f0f4ff;
            border-radius: 8px;
        }
        
        .breakdown-value {
            font-size: 1.8rem;
            font-weight: 700;
            color: #2575fc;
        }
        
        .breakdown-label {
            font-size: 0.9rem;
            color: #666;
            margin-top: 5px;
        }
        
        .additional-info {
            background-color: #f0f8ff;
            padding: 20px;
            border-radius: 8px;
            margin-top: 20px;
        }
        
        .info-item {
            display: flex;
            justify-content: space-between;
            margin-bottom: 10px;
            padding-bottom: 10px;
            border-bottom: 1px dashed #ddd;
        }
        
        .info-label {
            font-weight: 600;
            color: #555;
        }
        
        .info-value {
            color: #2575fc;
            font-weight: 600;
        }
        
        .error {
            color: #e74c3c;
            background-color: #ffeaea;
            padding: 12px;
            border-radius: 8px;
            margin-top: 15px;
            font-weight: 600;
            display: none;
        }
        
        .current-date {
            font-size: 0.9rem;
            color: #777;
            text-align: center;
            margin-top: 20px;
            padding-top: 15px;
            border-top: 1px solid #eee;
        }
        
        footer {
            text-align: center;
            padding: 20px;
            color: var(--text-secondary);
            font-size: 0.9rem;
            border-top: 1px solid #eee;
        }
        
        @media (max-width: 768px) {
            .content {
                flex-direction: column;
            }
            
            .calculator-section {
                border-right: none;
                border-bottom: 1px solid #eee;
            }
        }