/* Cat Cost Calculator Styles */

.ccc-calculator-container {
    max-width: 900px;
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    position: relative;
    overflow: hidden !important;
    transition: max-height 0.5s ease-in-out;
    box-sizing: border-box;
}

.ccc-calculator-container.ccc-collapsed {
    max-height: 350px !important; /* Reduced height and added important */
}

.ccc-calculator-container.ccc-expanded {
    max-height: none !important; /* Allow it to grow naturally */
}

.ccc-expand-overlay {
    display: none;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px; /* Taller gradient for better effect */
    background: linear-gradient(to bottom, rgba(249, 249, 249, 0), rgba(249, 249, 249, 1) 70%);
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 20px;
    z-index: 999; /* Ensure it's on top */
}

.ccc-collapsed .ccc-expand-overlay {
    display: flex;
}

.ccc-expanded .ccc-expand-overlay {
    display: none;
}

#ccc-expand-btn {
    width: auto;
    padding: 10px 30px;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
}

.ccc-calculator-title {
    margin-top: 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
    border-bottom: 3px solid #ff6b6b;
    padding-bottom: 10px;
}

.ccc-calculator-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .ccc-calculator-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Input Section */
.ccc-input-section {
    background: white;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ccc-form-group {
    margin-bottom: 15px;
}

.ccc-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.ccc-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 600px) {
    .ccc-form-row {
        grid-template-columns: 1fr;
    }
}

.ccc-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.ccc-input:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.ccc-section-title {
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

/* Buttons */
.ccc-button {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.ccc-button:hover {
    background: #ff5252;
}

.ccc-button:active {
    transform: scale(0.98);
}

.ccc-button-secondary {
    background: #6c757d;
    margin-top: 5px;
}

.ccc-button-secondary:hover {
    background: #5a6268;
}

/* Results Section */
.ccc-results-section {
    background: white;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ccc-results-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.ccc-tab-btn {
    padding: 10px 15px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.ccc-tab-btn:hover {
    color: #333;
}

.ccc-tab-btn.ccc-tab-active {
    color: #ff6b6b;
    border-bottom-color: #ff6b6b;
}

.ccc-tab-content {
    display: none;
}

.ccc-tab-content.ccc-tab-active {
    display: block;
}

.ccc-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.ccc-result-item:last-child {
    border-bottom: none;
}

.ccc-result-label {
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.ccc-result-value {
    font-size: 18px;
    font-weight: 700;
    color: #ff6b6b;
}

/* Chart Container */
.ccc-chart-container {
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 6px;
    position: relative;
    height: 300px;
}

#ccc-breakdown-chart {
    max-height: 300px;
}

/* Breakdown Section */
.ccc-breakdown {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.ccc-breakdown h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.ccc-breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 13px;
    color: #666;
}

.ccc-breakdown-item strong {
    color: #333;
}

.ccc-breakdown-category {
    margin-bottom: 15px;
    padding: 10px;
    background: #f9f9f9;
    border-left: 3px solid #ff6b6b;
    border-radius: 3px;
}

.ccc-breakdown-category-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 600px) {
    .ccc-calculator-container {
        padding: 15px;
    }
    
    .ccc-calculator-title {
        font-size: 20px;
    }
    
    .ccc-input-section,
    .ccc-results-section {
        padding: 15px;
    }
    
    .ccc-result-value {
        font-size: 16px;
    }
    
    .ccc-results-tabs {
        flex-wrap: wrap;
    }
    
    .ccc-tab-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}
