/* Zyklusversteher - Components */

/* Cards */
.card {
    background: var(--zv-bg-card);
    border-radius: var(--zv-radius);
    border: 1px solid var(--zv-border-light);
    box-shadow: var(--zv-shadow-sm);
    padding: 20px;
    transition: box-shadow var(--zv-transition);
}

.card:hover {
    box-shadow: var(--zv-shadow);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--zv-radius-sm);
    font-family: var(--zv-font);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--zv-transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--zv-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--zv-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--zv-shadow);
}

.btn-secondary {
    background: var(--zv-secondary);
    color: white;
}

.btn-secondary:hover {
    background: var(--zv-secondary-dark);
}

.btn-outline {
    background: transparent;
    border-color: var(--zv-border);
    color: var(--zv-text-secondary);
}

.btn-outline:hover {
    border-color: var(--zv-primary);
    color: var(--zv-primary);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Form Elements */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--zv-text-secondary);
}

.form-input,
.form-select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--zv-border);
    border-radius: var(--zv-radius-sm);
    font-family: var(--zv-font);
    font-size: 0.9375rem;
    color: var(--zv-text);
    background: var(--zv-bg-card);
    transition: border-color var(--zv-transition);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--zv-primary);
    box-shadow: 0 0 0 3px rgba(192, 108, 132, 0.15);
}

.form-input::placeholder {
    color: var(--zv-text-muted);
}

/* Chips */
.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--zv-radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid var(--zv-border);
    background: var(--zv-bg-card);
    color: var(--zv-text-secondary);
    transition: all var(--zv-transition);
}

.chip:hover {
    border-color: var(--zv-primary-light);
    color: var(--zv-primary);
}

.chip.active {
    background: var(--zv-primary);
    border-color: var(--zv-primary);
    color: white;
}

/* Slider */
.severity-slider {
    display: flex;
    align-items: center;
    gap: 12px;
}

.severity-slider input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    height: 6px;
    border-radius: 3px;
    background: var(--zv-border);
    outline: none;
}

.severity-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--zv-primary);
    cursor: pointer;
    box-shadow: var(--zv-shadow-sm);
}

.severity-value {
    font-weight: 700;
    font-size: 1.125rem;
    min-width: 24px;
    text-align: center;
}

/* Phase Ring (Dashboard) */
.phase-ring {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.phase-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.phase-ring .ring-bg {
    fill: none;
    stroke: var(--zv-border);
    stroke-width: 8;
}

.phase-ring .ring-progress {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.phase-ring .ring-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.phase-ring .day-number {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

.phase-ring .day-label {
    font-size: 0.75rem;
    color: var(--zv-text-muted);
    font-weight: 600;
}

/* Calendar */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-header-cell {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--zv-text-muted);
    padding: 8px 0;
}

.calendar-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--zv-radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--zv-transition);
    position: relative;
}

.calendar-cell:hover {
    background: var(--zv-bg-hover);
}

.calendar-cell.today {
    border: 2px solid var(--zv-primary);
}

.calendar-cell.other-month {
    color: var(--zv-text-muted);
    opacity: 0.5;
}

.calendar-cell.predicted {
    border-style: dashed;
}

.calendar-cell .dots {
    display: flex;
    gap: 3px;
    position: absolute;
    bottom: 4px;
}

.calendar-cell .dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
}

/* Mood Emojis */
.mood-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.mood-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    border-radius: var(--zv-radius);
    cursor: pointer;
    border: 2px solid var(--zv-border-light);
    background: var(--zv-bg-card);
    transition: all var(--zv-transition);
}

.mood-option:hover {
    border-color: var(--zv-primary-light);
    transform: translateY(-2px);
}

.mood-option.active {
    border-color: var(--zv-primary);
    background: var(--zv-phase-menstruation-bg);
}

.mood-option .emoji {
    font-size: 1.75rem;
}

.mood-option .label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--zv-text-secondary);
}

/* Tip Card */
.tip-card {
    background: linear-gradient(135deg, var(--zv-phase-menstruation-bg), var(--zv-bg-card));
    border-radius: var(--zv-radius-lg);
    padding: 20px;
    border-left: 4px solid var(--zv-primary);
}

.tip-card.follikel {
    background: linear-gradient(135deg, var(--zv-phase-follikel-bg), var(--zv-bg-card));
    border-left-color: var(--zv-phase-follikel);
}

.tip-card.ovulation {
    background: linear-gradient(135deg, var(--zv-phase-ovulation-bg), var(--zv-bg-card));
    border-left-color: var(--zv-phase-ovulation);
}

.tip-card.luteal {
    background: linear-gradient(135deg, var(--zv-phase-luteal-bg), var(--zv-bg-card));
    border-left-color: var(--zv-phase-luteal);
}

.tip-card h4 {
    margin-bottom: 8px;
}

.tip-card p {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--zv-text-secondary);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--zv-text);
    color: white;
    padding: 12px 24px;
    border-radius: var(--zv-radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Loading */
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--zv-border);
    border-top-color: var(--zv-primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

.loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--zv-text-muted);
}

.empty-state .icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.empty-state h3 {
    color: var(--zv-text-secondary);
    margin-bottom: 8px;
}

/* Grid utils */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

@media (max-width: 768px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .mood-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Spacing utils */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.text-center { text-align: center; }
