/* ===== CRG Solar Calculator - shadcn/ui Inspired Styles ===== */

/* Step transitions */
.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
    animation: calcFadeIn 0.2s ease-out;
}

@keyframes calcFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Progress bar animation */
.progress-fill {
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Selection card hover & active states */
.selection-card {
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.selection-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.check-icon {
    display: none !important;
}

.selection-card.selected .check-icon {
    display: flex !important;
}

/* Native range slider styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 9999px;
    background: hsl(220 9% 93.5%);
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 9999px;
    background: hsl(148 100% 26.1%);
    border: 3px solid white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    cursor: grab;
    transition: transform 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.15);
}

input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 9999px;
    background: hsl(148 100% 26.1%);
    border: 3px solid white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    cursor: grab;
}

input[type="range"]::-moz-range-track {
    height: 8px;
    border-radius: 9999px;
    background: hsl(220 9% 93.5%);
}

input[type="range"]:focus {
    box-shadow: none;
}

/* Input focus ring */
input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 133, 26, 0.2);
    border-color: hsl(148 100% 26.1%) !important;
}

input[type="range"]:focus {
    box-shadow: none;
    border-color: transparent !important;
}

/* Bounce animation for mobile indicator */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

.animate-bounce {
    animation: bounce 1.5s ease-in-out infinite;
}

/* Loading spinner */
.loading-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Progress bar loading animation */
.progress-loading {
    background: linear-gradient(90deg, hsl(148 100% 26.1%) 0%, hsl(148 80% 45%) 50%, hsl(148 100% 26.1%) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Badge component */
.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

/* Tier card styling */
.tier-card {
    transition: all 0.2s ease;
}

.tier-card.active {
    border-color: hsl(148 100% 26.1%);
    background-color: rgba(0, 133, 26, 0.1);
    box-shadow: 0 0 0 1px rgba(0, 133, 26, 0.3);
}

/* Select dropdown styling */
select {
    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.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 2.5rem;
}
