/* ============================================================
   GLOBAL RESET + BASE
============================================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

body {
    background: #f5f5f5;
    color: #222;
    line-height: 1.5;
}

/* ============================================================
   NAVIGATION BAR
============================================================ */
.admin-nav {
    background: #004a99;
    color: white;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-nav .nav-links {
    display: flex;
    gap: 20px;
}

.admin-nav .nav-links a {
    color: white;
    text-decoration: none;
    font-size: 15px;
}

.admin-nav .nav-links a.active {
    background-color: #2a2f36;
    padding: 6px 10px;
    border-radius: 4px;
    font-weight: 600;
}

/* ============================================================
   PAGE CONTAINERS
============================================================ */
.admin-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

h1, h2, h3 {
    margin-bottom: 15px;
}

/* ============================================================
   BUTTONS — UNIVERSAL, CONSISTENT, SUBSTANTIAL
============================================================ */
button {
    all: unset;
    display: inline-block;
    background-color: #2d6cdf;
    color: white;
    padding: 7px 14px;      /* smaller */
    font-size: 14px;        /* slightly smaller */
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    min-width: 80px;        /* smaller default width */
    text-align: center;
    transition: background-color 0.15s ease, transform 0.1s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

button:hover {
    background-color: #1f54b8;
}

button:active {
  transform: scale(0.97);
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Secondary (Cancel) */
button.secondary {
    background-color: #777;
}
button.secondary:hover {
    background-color: #555;
}

/* Danger (Delete) */
button.danger {
    background-color: #d9534f;
}
button.danger:hover {
    background-color: #c9302c;
}

/* ============================================================
   DATE ROW
============================================================ */
.date-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.date-row label {
    font-weight: bold;
    white-space: nowrap;
}

/* ============================================================
   COMPACT, CENTERED TABLE
============================================================ */
.admin-table {
    width: auto !important;        /* shrink to content */
    margin: 0 auto !important;     /* center */
    border-collapse: collapse;
    background: white;
    border-radius: 6px;
}

.admin-table th,
.admin-table td {
    padding: 6px 12px;
    text-align: center;
    white-space: nowrap;
    font-size: 15px;
}

.admin-table th {
    background: #004a99;
    color: white;
    border-bottom: 2px solid #ccc;
}

.admin-table td {
    border-bottom: 1px solid #eee;
}

.admin-table tr:hover {
    background: #f0f7ff;
}

.admin-table button {
    min-width: auto;       /* remove global min width */
    padding: 5px 10px;     /* tighter */
    font-size: 13px;       /* smaller */
}

/* Bold the # and Tee Time values */
.admin-table td:nth-child(1),
.admin-table td:nth-child(2) {
    font-weight: 700;
}

/* ============================================================
   MODAL
============================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.45);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-box {
    display: flex;
    flex-direction: column;
    background: white;
    padding: 25px;
    border-radius: 8px;
    width: 420px;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 0 12px rgba(0,0,0,0.2);
}

.modal-box h3 {
  text-align: center;
  width: 100%;
  margin-bottom: 15px;
}

.modal-box button {
    min-width: 90px;       /* smaller than global */
    padding: 7px 14px;
    font-size: 14px;
}

.modal-box > div:last-child {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

#modalTeeTimes {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}

#existingBlock {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  display: inline-block;
}

.tee-time-row {
    display: flex;
    gap: 12px;
    margin-bottom: 6px;
    align-items: center;
    justify-content: center;   /* centers the row contents */
    width: 100%;
}

.tee-time-row:hover {
  background: #f7faff;
  border-radius: 4px;
}

.tee-time-row input {
    width: 120px;
}

/* ============================================================
   TOAST
============================================================ */
#toast {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: #333;
    color: #fff;
    padding: 12px 20px;
    border-radius: 6px;
    opacity: 0;
    transition: opacity .3s;
    z-index: 99999;
}

#toast.show {
    opacity: 1;
}
