/* style.css - SVW Leden Portal - Opgeschoond */

/* Reset en basis styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    line-height: 1.6;
}

/* Header styles */
.header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 15px 10px;
    text-align: center;
}

.header h1 {
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.header p {
    font-size: 0.9rem;
    margin-bottom: 10px;
}

/* Container styles */
.user-info,
.scores-container,
.club-results {
    background: white;
    padding: 15px;
    margin: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* User info styles */
.welcome {
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.welcome p {
    margin-bottom: 5px;
    font-size: 0.85rem;
}

/* Profile section styling */
.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.profile-actions {
    display: flex;
    gap: 10px;
}

/* Icon buttons styling */
.icon-btn {
    background: #1e3c72;
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.2s;
}

.icon-btn:hover {
    background: #2a5298;
    transform: scale(1.1);
}

.icon-btn:active {
    transform: scale(0.95);
}

/* Layout voor user-info en modal-container */
.user-info-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin: 10px;
}

/* Modal Container Styling -zelfde stijl als user-info */
.modal-container {
    display: none;
    background: white;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
    height: fit-content;
}

.modal-container .user-info {
    margin: 0;
    padding: 0;
    box-shadow: none;
}

.modal-container .profile-header {
    padding: 15px 15px 0 15px;
    margin-bottom: 15px;
}

.modal-container form {
    padding: 0 15px 15px 15px;
}

/* Sluitknop in modal header */
.modal-container .close-modal {
    background: #dc3545;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.modal-container .close-modal:hover {
    background: #c82333;
}

/* Form styling binnen modal */
.modal-container .form-group {
    margin-bottom: 15px;
}

.modal-container .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
    font-size: 0.9rem;
}

.modal-container .form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

.modal-container .form-group input:focus {
    outline: none;
    border-color: #1e3c72;
    box-shadow: 0 0 0 2px rgba(30, 60, 114, 0.1);
}

.modal-container .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* Button styles */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    min-height: 44px;
    min-width: 44px;
}

.btn-primary {
    background: #1e3c72;
    color: white;
}

.btn-primary:hover {
    background: #2a5298;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.logout-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    margin-top: 5px;
    min-height: 44px;
}

.logout-btn:hover {
    background: #c82333;
}

.modal-container .form-actions .btn {
    min-width: 120px;
    min-height: 44px;
}

/* Table styles */
.score-table,
.club-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.8rem;
}

.score-table th,
.score-table td,
.club-table th,
.club-table td {
    padding: 6px 4px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.score-table th {
    background: #f8f9fa;
    font-weight: bold;
    font-size: 0.7rem;
}

.club-table th {
    background: #1e3c72;
    color: white;
    font-weight: bold;
    font-size: 0.75rem;
}

.club-table tr:nth-child(even) {
    background: #f8f9fa;
}

.club-table tr:hover {
    background: #e9ecef;
}

.weapon-score {
    font-weight: bold;
    color: #1e3c72;
    font-size: 0.8rem;
}

.rozen {
    color: #dc3545;
    font-weight: bold;
}

/* Score details styles - AANGEPAST: onder elkaar met achtergrond box */
.score-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 6px;
}

.shot-row {
    display: flex;
    justify-content: left;
    align-items: center;
}

.shot-value {
    font-size: 0.55rem;
    font-weight: 600;
    color: #1e3c72;
    background: white;
    padding: 3px 6px;
    border-radius: 3px;
    border: 1px solid #dee2e6;
    min-width: 22px;
    text-align: center;
    line-height: 1.2;
}

/* Week navigation styles */
.week-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.week-info {
    background: #e8f4f8;
    padding: 10px 15px;
    border-radius: 6px;
    text-align: center;
    font-weight: bold;
    font-size: 0.9rem;
    min-width: 180px;
}

.nav-arrow {
    background: #1e3c72;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.3s;
    min-height: 44px;
    min-width: 44px;
}

.nav-arrow:hover {
    background: #2a5298;
}

.nav-arrow:disabled {
    background: #cccccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.current-week-indicator {
    text-align: center;
    margin-top: 10px;
    font-size: 0.75rem;
    color: #666;
}

.current-week-link {
    display: inline-block;
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.current-week-link:hover {
    background-color: #0056b3;
    color: white;
    text-decoration: none;
}

/* Chart styles */
.charts-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 20px;
}

.chart-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.chart-title {
    text-align: center;
    margin-bottom: 10px;
    color: #1e3c72;
    font-weight: bold;
    font-size: 0.9rem;
}

.chart-container {
    position: relative;
    height: 250px;
    width: 100%;
}

/* Message styles */
.no-scores,
.message {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 15px;
    font-size: 0.9rem;
}

.message.success {
    background: #e8f5e8;
    color: #2e7d32;
    border-radius: 5px;
    margin-bottom: 20px;
}

.message.error {
    background: #ffebee;
    color: #c62828;
    border-radius: 5px;
    margin-bottom: 20px;
}

/* Login/Register message styles - Aangepast */
.error {
    background: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid #f5c6cb;
}

.success {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid #c3e6cb;
}

/* Mobile table scroll */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Heading styles */
h2 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

h3 {
    font-size: 1rem;
    margin: 15px 0 8px 0;
}

/* Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive aanpassingen voor modal */
@media (min-width: 768px) {
    .user-info-section {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .modal-container {
        margin: 0;
    }

    .modal-container .user-info {
        padding: 0;
    }
}

/* Responsive aanpassingen voor form actions */
@media (max-width: 480px) {
    .modal-container .form-actions {
        flex-direction: column;
    }

    .modal-container .form-actions .btn {
        min-width: 100%;
        width: 100%;
    }
}

/* Responsive Design */
@media (min-width: 768px) {
    .user-info-section {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .modal-container {
        margin: 0;
    }

    .modal-container .user-info {
        padding: 0;
    }

    .header {
        padding: 20px;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .user-info,
    .scores-container,
    .club-results {
        padding: 20px;
        margin: 15px;
    }

    .score-table,
    .club-table {
        font-size: 0.9rem;
    }

    .score-table th,
    .score-table td,
    .club-table th,
    .club-table td {
        padding: 8px 6px;
    }

    .score-table th {
        font-size: 0.8rem;
    }

    .weapon-score {
        font-size: 0.9rem;
    }

    /* Score details voor tablets */
    .score-details {
        padding: 10px;
        gap: 4px;
    }

    .shot-value {
        font-size: 0.75rem;
        padding: 5px 10px;
    }

    .charts-container {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .chart-container {
        height: 300px;
    }

    h2 {
        font-size: 1.4rem;
    }

    h3 {
        font-size: 1.2rem;
    }
}

/* Desktop styles */
@media (min-width: 1024px) {
    body {
        max-width: 1200px;
        margin: 0 auto;
    }

    .header {
        padding: 25px;
    }

    .user-info,
    .scores-container,
    .club-results {
        margin: 20px;
        padding: 25px;
    }

    .score-table {
        font-size: 1rem;
    }

    .score-table th,
    .score-table td {
        padding: 12px 8px;
    }

    .club-table {
        font-size: 0.9rem;
    }

    .club-table th,
    .club-table td {
        padding: 8px 6px;
    }

    /* Score details voor desktop */
    .score-details {
        padding: 12px;
        gap: 5px;
    }

    .shot-value {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    .chart-container {
        height: 350px;
    }
}

/* Voor zeer kleine schermen */
@media (max-width: 360px) {
    .score-details {
        padding: 6px;
    }

    .shot-value {
        font-size: 0.55rem;
        padding: 3px 6px;
        min-width: 20px;
    }

    .profile-actions {
        gap: 5px;
    }

    .icon-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Print styles */
@media print {

    .header,
    .logout-btn,
    .nav-arrow,
    .charts-container,
    .profile-actions {
        display: none;
    }

    body {
        background: white;
    }

    .user-info,
    .scores-container,
    .club-results {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Login/Register styles */
.login-container,
.register-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    padding: 40px;
    margin: 50px auto;
}

.register-container {
    max-width: 500px;
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo h1 {
    color: #1e3c72;
    font-size: 24px;
    margin-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: bold;
}

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

.form-group input:focus {
    outline: none;
    border-color: #1e3c72;
}

.btn {
    width: 100%;
    padding: 12px;
    background: #1e3c72;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
    min-height: 44px;
}

.btn:hover {
    background: #2a5298;
}

.links {
    text-align: center;
    margin-top: 20px;
}

.links a {
    color: #1e3c72;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
}

.links a:hover {
    text-decoration: underline;
}

/* Mobile styles voor login/register */
@media (max-width: 768px) {

    .login-container,
    .register-container {
        margin: 20px auto;
        padding: 20px;
        max-width: 90%;
    }

    .form-group input {
        padding: 10px;
        font-size: 14px;
    }

    .btn {
        padding: 10px;
        font-size: 14px;
    }

    .logo h1 {
        font-size: 1.4rem;
    }
}