/* Global alert container and alert styles moved from inline JS */
.alerts-container { position: fixed; top: 20px; right: 20px; z-index: 10000; display: flex; flex-direction: column; gap: 10px; }
.alert { padding: 1rem; margin-bottom: 0.5rem; border-radius: var(--border-radius-md); box-shadow: var(--shadow-md); border: 1px solid transparent; background: white; color: var(--color-text); }
.alert--error { background: var(--color-error-light); border-color: var(--color-error); color: var(--color-error); }
.alert--success { background: var(--color-success-light); border-color: var(--color-success); color: var(--color-success); }

/* Accessibility */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* Ranking Interface Styles */
.ranking {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--color-background, #fff);
    z-index: 9999;
    overflow-x: hidden;
    overflow-y: auto;
}

.ranking__header {
    position: sticky;
    top: 0;
    background: var(--color-regal-purple, #5D3FD3);
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 1;
}

.ranking__type-selector {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-background, #fff);
    border-bottom: 1px solid var(--color-gray-200);
    position: sticky;
    top: 60px;
    z-index: 1;
}

.ranking__type-selector button:not(.btn) {
    padding: 0.5rem 1rem;
    border: 2px solid var(--color-regal-purple, #5D3FD3);
    background: transparent;
    color: var(--color-regal-purple, #5D3FD3);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ranking__type-selector button.is-active:not(.btn) {
    background: var(--color-regal-purple, #5D3FD3);
    color: white;
}

.ranking__races {
    padding: 1rem;
}

.ranking__race {
    margin-bottom: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.ranking__race-header {
    background: var(--color-gray-100);
    padding: 1rem;
    border-bottom: 1px solid var(--color-gray-200);
}

.horse-selection-area {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.selection-boxes {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.selection-box {
    min-width: 120px;
    height: 80px;
    border: 2px dashed var(--color-gray-300);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: var(--color-gray-50);
}

.selection-box.empty {
    color: var(--color-gray-600);
}

.horse-field {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 1rem 0;
}

.horse {
    min-width: 100px;
    padding: 0.5rem;
    background: var(--color-background-light);
    border: 1px solid var(--color-gray-300);
    border-radius: 4px;
    cursor: move;
    -webkit-user-select: none;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.horse.dragging {
    opacity: 0.5;
}

.horse-number {
    font-weight: bold;
    color: var(--color-regal-purple, #5D3FD3);
}

.horse-name {
    font-size: 0.9em;
    text-align: center;
}

.ranking__submit {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 1rem;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

/* Alert Styles */
.alerts-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alert {
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.alert--error {
    background: var(--color-error-light);
    color: var(--color-error);
    border: 1px solid var(--color-error);
}

.alert--success {
    background: var(--color-success-light);
    color: var(--color-success);
    border: 1px solid var(--color-success);
} 