/* ============================================
   Trikotwäsche Module Styles
   ============================================ */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 0;
}

/* Theme Colors */
:root {
    --fco-primary: #b32d06;
    --fco-primary-dark: #8a2205;
    --fco-background: #f5f5f5;
    --fco-white: #ffffff;
    --fco-text: #333;
    --fco-text-light: #666;
    --fco-border: #e0e0e0;
    --fco-border-light: #eee;
    --fco-hover: #f8f9fa;
    --fco-danger: #dc3545;
    --fco-danger-hover: #c82333;
}

/* Container */
.container {
    max-width: 1000px;
    margin: 20px auto;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.add-player-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .add-player-section {
        flex-direction: row;
    }
}

.add-player-section input {
    flex: 1;
}

.add-player-section button {
    padding: 14px 24px;
    background: var(--fco-primary, #b32d06);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s;
    min-height: 48px;
}

.add-player-section button:hover {
    background: var(--fco-primary-dark, #8a2205);
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

@media (min-width: 768px) {
    table {
        font-size: 16px;
    }
}

thead {
    background: var(--fco-primary, #b32d06);
}

th {
    padding: 12px 8px;
    text-align: left;
    font-weight: bold;
    color: white;
    border-bottom: 2px solid var(--fco-primary-dark, #8a2205);
    font-size: 14px;
}

@media (min-width: 768px) {
    th {
        padding: 15px;
        font-size: 16px;
    }
}

.sortable-header {
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.sortable-header:hover {
    background: var(--fco-primary-dark, #8a2205);
}

.sort-button {
    background: none;
    border: none;
    color: white;
    font-size: inherit;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 100%;
    text-align: left;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}

.sort-button:active {
    opacity: 0.7;
}

#nameSortIndicator,
#washSortIndicator {
    display: inline-block;
    margin-left: 5px;
    font-size: 0.9em;
}

tbody tr {
    border-bottom: 1px solid var(--fco-border-light, #eee);
    transition: background 0.2s;
}

tbody tr:hover {
    background: var(--fco-hover, #f8f9fa);
}

td {
    padding: 12px 8px;
    vertical-align: top;
}

@media (min-width: 768px) {
    td {
        padding: 15px;
    }
}

.player-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--fco-text, #333);
    font-size: 14px;
    flex-wrap: wrap;
}

@media (min-width: 768px) {
    .player-name {
        font-size: 16px;
    }
}

.wash-count {
    color: var(--fco-text-light, #666);
    font-size: 0.9em;
    font-weight: normal;
}

/* Action Buttons */
.add-wash-btn {
    background: var(--fco-primary, #b32d06);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
}

.add-wash-btn:hover {
    background: var(--fco-primary-dark, #8a2205);
    transform: scale(1.05);
}

.delete-player-btn {
    background: var(--fco-danger, #dc3545);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
}

.delete-player-btn:hover {
    background: var(--fco-danger-hover, #c82333);
    transform: scale(1.1);
}

.wash-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wash-date-item {
    background: #fce8ec;
    padding: 6px 10px;
    border-radius: 5px;
    border-left: 3px solid var(--fco-primary, #b32d06);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

@media (min-width: 768px) {
    .wash-date-item {
        padding: 8px 12px;
        font-size: 14px;
    }
}

.wash-date-item strong {
    color: var(--fco-primary, #b32d06);
}

.delete-wash-btn {
    background: #f44336;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
}

.delete-wash-btn:hover {
    background: #d32f2f;
    transform: scale(1.1);
}

/* Overlay Styles */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.overlay.active {
    display: flex;
}

.overlay-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: calc(100% - 20px);
    margin: 10px;
}

.overlay-content h2 {
    margin-bottom: 20px;
    color: var(--fco-primary);
    border-bottom: 2px solid var(--fco-border);
    padding-bottom: 10px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--fco-text);
}

.form-group input {
    width: 100%;
    padding: 14px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
    min-height: 48px;
}

.form-group input:focus {
    outline: none;
    border-color: var(--fco-primary);
}

.form-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.form-buttons button {
    padding: 14px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s;
    min-height: 48px;
    flex: 1;
}

@media (min-width: 768px) {
    .form-buttons button {
        flex: initial;
    }
}

.btn-primary,
.form-buttons button[type="submit"] {
    background: var(--fco-primary);
    color: white;
}

.btn-primary:hover,
.form-buttons button[type="submit"]:hover {
    background: var(--fco-primary-dark);
}

.btn-secondary,
.form-buttons button[type="button"] {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover,
.form-buttons button[type="button"]:hover {
    background: #5a6268;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
}
