/* Farm Activity Tracker Styles */

/* Background gradient */
body {
    position: relative;
    min-height: 100vh;
}

.grid-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent 0%, #f5f5f4 100%);
}

/* Map Container */
.map-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.map-image {
    width: 100%;
    height: auto;
    display: block;
}

.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Zone Styling */
.zone {
    pointer-events: auto;
    cursor: pointer;
    fill: rgba(0, 180, 0, 0.15);
    stroke: rgba(0, 180, 0, 0.5);
    stroke-width: 2;
    transition: fill 0.2s ease, stroke 0.2s ease;
}

.zone:hover {
    fill: rgba(0, 180, 0, 0.35);
    stroke: rgba(0, 180, 0, 0.8);
}

.zone.selected {
    fill: rgba(0, 100, 255, 0.4);
    stroke: #0066ff;
    stroke-width: 3;
}

.zone.active {
    animation: pulse 2s ease-in-out infinite;
}

.zone.active.hunting {
    fill: rgba(255, 107, 0, 0.5);
    stroke: #FF6B00;
}

.zone.active.working {
    fill: rgba(0, 136, 255, 0.5);
    stroke: #0088FF;
}

.zone.active.walking {
    fill: rgba(153, 0, 255, 0.5);
    stroke: #9900FF;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

/* Selected zones display */
.selected-zones {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

#selected-zone-names {
    color: var(--pico-primary);
}

#clear-selection {
    font-size: 0.8rem;
}

/* Button group */
.button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Current Activity Cards */
.activity-card {
    background: var(--pico-card-background-color);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.activity-card .info {
    flex: 1;
    min-width: 200px;
}

.activity-card .user-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.activity-card .activity-type {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: white;
    margin-right: 0.5rem;
}

.activity-card .zones {
    color: var(--pico-muted-color);
    font-size: 0.9rem;
}

.activity-card .checkout-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    margin: 0;
}

/* History table */
.history-table {
    width: 100%;
    font-size: 0.9rem;
}

.history-table th,
.history-table td {
    padding: 0.5rem;
}

.history-table .status-active {
    color: #22c55e;
}

.history-table .status-checked_out {
    color: var(--pico-muted-color);
}

.history-table .status-expired {
    color: #f59e0b;
}

/* Loading state */
.loading {
    color: var(--pico-muted-color);
    font-style: italic;
}

/* Empty state */
.empty-state {
    color: var(--pico-muted-color);
    text-align: center;
    padding: 2rem;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .activity-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .activity-card .checkout-btn {
        width: 100%;
        margin-top: 0.5rem;
    }

    .history-table {
        font-size: 0.8rem;
    }

    .history-table th,
    .history-table td {
        padding: 0.35rem;
    }
}

/* Section spacing */
section {
    margin-bottom: 2rem;
}

h2 {
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--pico-muted-border-color);
    padding-bottom: 0.5rem;
}
