/* app/css/blog-income-calculator.css */
/* Blog Income Calculator - Custom Styles */

/* Blog Input Styles */
.blog-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: white;
}

.blog-input:focus {
    outline: none;
    border-color: #f97316;
    ring: 2px solid #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.blog-input:hover {
    border-color: #fdba74;
}

/* Blog Type Buttons */
.blog-type-btn {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
    background-color: #e5e7eb;
    color: #374151;
}

.blog-type-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.blog-type-btn.active {
    background-color: #f97316;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(249, 115, 22, 0.3);
}

/* Range Slider Custom Styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: #fed7aa;
    border-radius: 0.5rem;
    height: 0.5rem;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    background: #f97316;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: #ea580c;
}

/* Checkbox Styling */
input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #d1d5db;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

input[type="checkbox"]:checked {
    background-color: #f97316;
    border-color: #f97316;
}

input[type="checkbox"]:focus {
    outline: none;
    ring: 2px solid #f97316;
}

/* Number Input Arrows Styling */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    opacity: 0.5;
}

input[type="number"]::-webkit-inner-spin-button:hover,
input[type="number"]::-webkit-outer-spin-button:hover {
    opacity: 1;
}

/* Select Dropdown Styling */
select.blog-input {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.25rem;
    padding-right: 2.5rem;
    appearance: none;
}

/* Result Container Animations */
#resultContainer {
    transition: all 0.3s ease;
}

/* Income Breakdown Bars Animation */
.bg-green-600, .bg-purple-600, .bg-blue-600, .bg-orange-600, .bg-yellow-600 {
    transition: width 0.5s ease-in-out;
}

/* Hover Effects for Cards */
.bg-white.hover\:bg-orange-50:hover {
    background-color: #fff7ed;
    transform: translateX(4px);
    transition: all 0.2s ease;
}

/* Button Hover Effects */
button:active {
    transform: scale(0.98);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Responsive Table for Projections */
@media (max-width: 768px) {
    #projectionTable {
        font-size: 0.75rem;
    }
    
    #projectionTable th,
    #projectionTable td {
        padding: 0.5rem;
    }
}

/* Error Message Animation */
#errorDisplay {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading State (Optional) */
.calculator-loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.calculator-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2rem;
    height: 2rem;
    border: 3px solid #f97316;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Tooltip Styles */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem;
    background-color: #1f2937;
    color: white;
    font-size: 0.75rem;
    border-radius: 0.25rem;
    white-space: nowrap;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

[data-tooltip]:hover:before {
    opacity: 1;
}

/* Number Formatting for Large Numbers */
.number-large {
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

/* Custom Focus Ring */
*:focus-visible {
    outline: 2px solid #f97316;
    outline-offset: 2px;
    border-radius: 0.25rem;
}

/* Disabled State for Buttons */
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Print Styles */
@media print {
    .blog-type-btn,
    button:not(.no-print),
    .bg-orange-600,
    .no-print {
        display: none !important;
    }
    
    .blog-input {
        border: none;
        background: transparent;
    }
    
    select.blog-input {
        appearance: none;
        background: transparent;
    }
}