/* ===== Custom styles that Tailwind CDN can't handle ===== */

/* Color picker */
.color-input {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    width: 36px;
    height: 36px;
    cursor: pointer;
    background: none;
    padding: 0;
}

.color-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-input::-webkit-color-swatch {
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

/* Toggle */
.toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #222;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.3s;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle input:checked+.toggle-slider {
    background: #2ecc71;
    border-color: #27ae60;
}

.toggle input:checked+.toggle-slider::before {
    transform: translateX(22px);
}

/* Input field */
.field {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 10px 12px;
    border-radius: 8px;
    font-family: 'Michroma', sans-serif;
    font-size: 12px;
    outline: none;
    transition: border-color 0.2s;
}

.field:focus {
    border-color: rgba(255, 255, 255, 0.3);
}

.field::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

/* Lap card */
.lap-card {
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 14px;
    position: relative;
    transition: border-color 0.2s;
}

.lap-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.lap-card .lap-number {
    position: absolute;
    top: -8px;
    left: 12px;
    background: #1a1a1a;
    padding: 0 6px;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 2px;
}

.lap-card .remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    background: #ff4757;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    color: white;
    opacity: 0;
    transition: opacity 0.15s;
    border: none;
    line-height: 1;
}

.lap-card:hover .remove-btn {
    opacity: 1;
}

/* Transparent checkerboard pattern for preview */
.checkerboard {
    background-image:
        linear-gradient(45deg, #1a1a1a 25%, transparent 25%),
        linear-gradient(-45deg, #1a1a1a 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #1a1a1a 75%),
        linear-gradient(-45deg, transparent 75%, #1a1a1a 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

/* Scrollbar */
aside::-webkit-scrollbar {
    width: 4px;
}

aside::-webkit-scrollbar-track {
    background: transparent;
}

aside::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}