/* styles.css */

/* Importing Google Fonts and Tabler Icons */
@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@200;300;400;500;600;700;800&display=swap");
@import url("https://cdn.jsdelivr.net/npm/@tabler/icons-webfont@latest/tabler-icons.min.css");

/* Base Styles */
body {
    margin: 0;
    font-size: 15px;
    overflow-x: hidden;
    font-family: Nunito, sans-serif;
    color: rgb(55, 65, 81);
}

/* Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem;
}

/* Navigation Styles */
nav {
    background-color: #2563eb;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav a {
    margin-right: 1rem;
    text-decoration: none;
    color: white;
    font-weight: 600;
}

nav a:hover {
    text-decoration: underline;
}

nav .nav-left, nav .nav-right {
    display: flex;
    align-items: center;
}

/* Updated Logged-in User Styles */
nav .nav-right {
    color: white;
    font-weight: bold;
}

nav .nav-right a {
    color: white;
    margin-left: 0.5rem;
    font-weight: normal;
}

nav .nav-right a:hover {
    text-decoration: underline;
}

/* Heading Styles */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
}

/* Button Styles */
button, .btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-size: 1rem;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

button:hover, .btn:hover {
    background-color: #1d4ed8;
}

button:disabled, .btn:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

.btn-edit {
    background-color: #4CAF50; /* Green */
    color: white;
}

.btn-edit:hover {
    background-color: #45a049;
}

.btn-delete {
    background-color: #f44336; /* Red */
    color: white;
}

.btn-delete:hover {
    background-color: #da190b;
}

.btn-submit {
    background-color: orange;
    color: white;
}

.btn-submit-warning {
    background-color: #f44336;
    color: white;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    table-layout: auto;
}

table th, table td {
    border: 1px solid #e5e7eb;
    padding: 0.75rem;
    text-align: center;
    font-size: 0.875rem;
    word-break: break-word;
    height: 60px;
}

table th {
    background-color: #f9fafb;
    font-weight: 600;
}

/* Form Styles */
input[type="text"], input[type="number"], input[type="password"], select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #6b7280;
    border-radius: 0.375rem;
    font-size: 1rem;
    margin-bottom: 1rem;
}

input[type="text"]:focus, input[type="number"]:focus, input[type="password"]:focus, select:focus {
    border-color: #2563eb;
    outline: none;
}

/* Race Bib Style */
.race-bib {
    width: 60px;
    height: 45px;
    border: 1px solid black;
    background-color: #d32f2f;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    font-weight: bold;
    margin: 0 auto;
    border-radius: 5px;
}

/* Alert Styles */
.alert {
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Additional Styles */
a.btn {
    text-decoration: none;
}

footer {
    text-align: center;
    padding: 1rem;
    background-color: #f9fafb;
    margin-top: 2rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.actions-cell {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.actions-cell .btn {
    padding: 0.5rem;
    margin: 0 2px;
    white-space: nowrap;
    min-width: 70px;
}

/* Responsive adjustments */
@media screen and (max-width: 767px) {
    .actions-cell {
        flex-direction: column;
    }
    .actions-cell .btn {
        width: 100%;
    }
    th, td {
        font-size: 14px;
    }
}

.btn:disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
}

/* Race Card Style */
.race-card {
    background-color: #fae600;
    color: black;
    font-weight: bold;
    padding: 10px;
    text-align: center;
    display: inline-block;
    min-width: 50px;
}
