/* ==================== COMPONENTS ==================== */

/* ==================== STATS GRID ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing);
}

.stat-item {
    text-align: center;
    padding: var(--spacing);
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.stat-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 600;
}

/* ==================== CALENDAR ==================== */
#calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-header {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.calendar-month-title {
    font-size: 1.125rem;
    font-weight: 900;
    color: var(--text);
}

.calendar-nav-btn {
    background: var(--bg);
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.125rem;
    font-weight: 700;
    transition: all 0.2s;
}

.calendar-nav-btn:active {
    transform: scale(0.95);
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg);
}

.calendar-day.empty {
    background: transparent;
    cursor: default;
}

.calendar-day.has-data {
    background: var(--primary);
    color: white;
}

.calendar-day.active {
    border: 3px solid var(--primary);
    font-weight: 900;
}

.calendar-day:not(.empty):active {
    transform: scale(0.9);
}

/* ==================== CHARTS ==================== */
.chart-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chart-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.chart-label {
    width: 120px;
    font-weight: 600;
    font-size: 0.875rem;
}

.chart-bar {
    flex: 1;
    height: 32px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.chart-fill {
    height: 100%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    transition: width 0.5s ease-out;
}

/* ==================== PLAYER CARD ==================== */
.player-card {
    background: white;
    border-radius: var(--radius);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow);
}

.player-card.atilla {
    border-left: 4px solid #2ecc71;
}

.player-card.lukas {
    border-left: 4px solid #3498db;
}

.player-card.extra {
    border-left: 4px solid #9b59b6;
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing);
}

.player-name {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text);
}

.player-badge {
    background: var(--bg);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.875rem;
}

.btn-edit-player {
    background: var(--bg);
    border: none;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.125rem;
    transition: all 0.2s;
}

.btn-edit-player:active {
    transform: scale(0.9);
}

/* ==================== BALL PROGRESS ==================== */
.ball-progress {
    margin-bottom: var(--spacing);
}

.ball-count {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 8px;
}

.ball-progress-bar {
    height: 12px;
    background: var(--bg);
    border-radius: 6px;
    overflow: hidden;
}

.ball-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2ecc71 0%, #27ae60 100%);
    border-radius: 6px;
    transition: width 0.5s ease-out;
}

/* ==================== BALL FIELD ==================== */
.ball-field {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: var(--spacing);
}

.ball-slot {
    aspect-ratio: 1;
    background: var(--bg);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.ball-slot.filled {
    background: #d5f4e6;
    border-color: var(--primary);
}

.ball-slot.badge-slot {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.ball-slot.badge-slot.filled {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.ball-icon {
    opacity: 0.3;
    transition: opacity 0.3s;
}

.ball-slot.filled .ball-icon {
    opacity: 1;
    animation: ballPop 0.5s ease-out;
}

.badge-icon {
    filter: grayscale(100%);
    opacity: 0.3;
    transition: all 0.3s;
}

.badge-icon.earned {
    filter: grayscale(0%);
    opacity: 1;
    animation: badgePop 0.5s ease-out;
}

@keyframes ballPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

@keyframes badgePop {
    0% { transform: scale(0) rotate(0deg); }
    50% { transform: scale(1.3) rotate(180deg); }
    100% { transform: scale(1) rotate(360deg); }
}

/* ==================== TRIGGER GRID ==================== */
.trigger-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
}

.trigger-card {
    background: var(--bg);
    padding: var(--spacing);
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    font-size: inherit;
}

.trigger-card:active {
    transform: scale(0.95);
    border-color: var(--primary);
}

.trigger-icon {
    font-size: 2rem;
    display: block;
}

.trigger-label {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--text);
}

/* ==================== TIMELINE ==================== */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.timeline-entry {
    background: var(--bg);
    padding: 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.timeline-entry:active {
    transform: scale(0.98);
}

.timeline-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 600;
}

.timeline-main {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 4px;
}

.timeline-details {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* ==================== TIMER ==================== */
.timer-card,
.time-card {
    background: white;
    border-radius: var(--radius);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow);
}

.session-tracker {
    text-align: center;
}

.session-status {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 8px;
}

.session-display {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 16px;
    font-variant-numeric: tabular-nums;
}

.session-buttons {
    display: flex;
    gap: 12px;
}

.btn-time {
    flex: 1;
    padding: 16px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-time:active {
    transform: scale(0.95);
}

.btn-start {
    background: var(--success);
    color: white;
}

.btn-stop {
    background: var(--danger);
    color: white;
}

.timer-display {
    font-size: 4rem;
    font-weight: 900;
    text-align: center;
    color: var(--primary);
    margin-bottom: 24px;
    font-variant-numeric: tabular-nums;
}

.timer-type-switch {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.timer-type-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--border);
    background: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s;
}

.timer-type-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.timer-type-btn:active {
    transform: scale(0.95);
}

.timer-activities {
    margin-bottom: 24px;
}

.timer-activities-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.timer-activities-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.timer-activity-card {
    padding: 12px;
    background: var(--bg);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.timer-activity-card:active {
    transform: scale(0.95);
}

.timer-activity-card.selected {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.timer-controls {
    display: flex;
    gap: 8px;
}

.btn-timer {
    flex: 1;
    padding: 16px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-timer:active {
    transform: scale(0.95);
}

.btn-timer-start {
    background: var(--success);
    color: white;
}

.btn-timer-pause {
    background: var(--warning);
    color: white;
}

.btn-timer-stop {
    background: var(--danger);
    color: white;
}

.time-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    text-align: center;
}

.time-summary-item {
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.time-summary-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary);
}

.time-summary-label {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 600;
}

/* ==================== HELP/HILFE ==================== */
.emergency-btn {
    width: 100%;
    padding: 24px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border: none;
    border-radius: var(--radius);
    color: white;
    font-size: 1.25rem;
    font-weight: 900;
    cursor: pointer;
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(231, 76, 60, 0.3);
}

.emergency-btn:active {
    transform: scale(0.98);
}

.emergency-icon {
    font-size: 3rem;
}

.emergency-text {
    text-align: left;
    line-height: 1.3;
}

.step-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.step-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.step-content strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text);
}

.step-content p {
    font-size: 0.875rem;
    color: var(--text-light);
    margin: 0;
}

.warning-box,
.success-box {
    padding: 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    font-size: 0.875rem;
    line-height: 1.6;
}

.warning-box {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
}

.success-box {
    background: #d4edda;
    border-left: 4px solid #28a745;
}

.contact-item {
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.contact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.contact-name {
    font-weight: 700;
    font-size: 1rem;
}

.contact-type {
    background: var(--primary);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.contact-title {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

.contact-links {
    display: flex;
    gap: 8px;
}

.contact-link {
    padding: 8px 12px;
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.contact-link:active {
    transform: scale(0.95);
}

.contact-detail {
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--text-light);
    font-style: italic;
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.empty-state-text {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 600;
}

.empty-state-hint {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 8px;
}


/* ==================== ABC MODAL FIX - Checkbox Grid ==================== */

.abc-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 12px 0;
}

@media (min-width: 768px) {
    .abc-checkbox-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.abc-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    user-select: none;
}

.abc-checkbox:hover {
    background: #e9ecef;
}

.abc-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
}

.abc-checkbox input[type="checkbox"]:checked {
    accent-color: var(--primary);
}

.abc-checkbox:has(input:checked) {
    background: rgba(46, 204, 113, 0.1);
    border-color: var(--primary);
    font-weight: 600;
}

.abc-select-label {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    display: block;
    color: var(--text);
}

/* Edit-Button in Timeline */
.btn-edit-log {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.btn-edit-log:hover {
    background: rgba(0, 0, 0, 0.05);
}