/* ===================================
   FitHabit - Component Styles
   =================================== */

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.5rem;
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: 500;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text-inverse);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--surface-hover);
    border-color: var(--primary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--surface-hover);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: var(--font-size-sm);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: var(--font-size-lg);
}

.btn-full {
    width: 100%;
}

/* CARDS */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-body {
    padding: var(--space-lg);
}

.card-streak {
    background: linear-gradient(135deg, var(--primary-lighter) 0%, var(--primary-light) 100%);
    border: 1px solid var(--primary-light);
}

/* INPUTS */
.input-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.input-label {
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* SELECT OPTIONS */
.select-option {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.select-option:hover {
    border-color: var(--primary-light);
    background: var(--primary-lighter);
}

.select-option.selected {
    border-color: var(--primary);
    background: var(--primary-lighter);
}

.select-option-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    color: var(--primary);
}

.select-option-check {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.select-option.selected .select-option-check {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* BADGES */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.25rem 0.75rem;
    font-size: var(--font-size-xs);
    font-weight: 500;
    border-radius: var(--radius-full);
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.badge-accent {
    background: var(--accent-light);
    color: #B45309;
}

/* PROGRESS BAR */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-light);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-full);
}

/* STEPPER */
.stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.stepper-step {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border-radius: var(--radius-full);
    background: var(--surface-hover);
    color: var(--text-tertiary);
}

.stepper-step.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.stepper-step.completed {
    background: var(--primary-light);
    color: var(--primary);
}

.stepper-line {
    width: 40px;
    height: 2px;
    background: var(--border);
}

.stepper-line.completed {
    background: var(--primary);
}

/* STREAK */
.streak-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent) 0%, #D97706 100%);
    border-radius: var(--radius-lg);
    color: white;
    font-size: 28px;
}

/* AVATAR */
.avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.avatar-lg {
    width: 72px;
    height: 72px;
    font-size: var(--font-size-2xl);
}

/* TABS */
.tabs {
    display: flex;
    background: var(--surface-hover);
    padding: 4px;
    border-radius: var(--radius-md);
}

.tab {
    flex: 1;
    padding: 0.625rem 1rem;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.tab.active {
    background: var(--surface);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

/* LIST ITEM */
.list-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--surface);
    border-radius: var(--radius-md);
}

.list-item-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    color: var(--primary);
}

/* TOGGLE */
.toggle {
    position: relative;
    width: 48px;
    height: 28px;
    background: var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
}

.toggle.active {
    background: var(--primary);
}

.toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: var(--radius-full);
    transition: transform var(--transition-fast);
}

.toggle.active::after {
    transform: translateX(20px);
}