:root { /* Remove this block if vars are only in clay-theme.css */
    /* Keep only layout-specific variables if needed */
}

/* Inherit farm-container styles from farm-ui.css if loaded after, or define here */
.farm-container { /* Define base container if farm-ui.css isn't guaranteed */
    display: flex;
    flex-direction: column;
    height: calc(100vh - 5rem); /* Adjusted height */
    background-color: var(--clay-darkest);
    color: var(--clay-text-primary);
    box-sizing: border-box;
    padding: 1.5rem;
}

#ranch-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    background-color: var(--clay-dark);
    padding: 1rem;
    border-radius: 0.75rem;
    box-shadow: var(--clay-shadow);
    border: 1px solid var(--clay-border);
    flex-shrink: 0;
}

/* Back button and Buy Pen button styles inherit from theme */

#ranch-stats {
    display: flex;
    gap: 1.5rem;
    font-weight: 500;
    color: var(--clay-text-secondary);
    font-size: 0.9rem;
}

#ranch-pens-grid {
    flex-grow: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); /* Use auto-fill */
    gap: 1rem; /* Adjusted gap */
    overflow-y: auto;
    padding: 1rem;
    background-color: var(--clay-dark); /* Add background */
    border-radius: 0.75rem;
    border: 1px solid var(--clay-border);
}

/* Reusing .farm-plot styles - ensure farm-ui.css is loaded or copy relevant styles */
.farm-plot {
    aspect-ratio: 1 / 1;
    background: var(--gradient-surface);
    border: 1px solid var(--clay-border);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0.75rem;
    text-align: center;
    box-shadow: var(--clay-shadow);
    position: relative;
    padding-bottom: 25px; /* Adjust if needed */
    color: var(--clay-text-secondary);
}

/* REMOVED HOVER EFFECT FOR FARM PLOT
.farm-plot:hover {
    transform: translateY(-3px);
    border-color: var(--clay-focus);
    box-shadow: var(--clay-shadow-heavy);
} */

/* REMOVED HOVER EFFECT FOR EMPTY PLOT
.farm-plot.empty:hover {
    background: var(--gradient-raised);
} */

.farm-plot img {
    width: 50%; /* Keep size */
    height: 50%; /* Keep size */
    object-fit: contain;
    margin-bottom: 0.5rem;
}
.farm-plot span { /* Target text */
    font-size: 0.8rem;
    font-weight: 500;
}

/* Progress bar styles inherit from farm-ui.css or define here */
.progress-bar-container {
    position: absolute;
    bottom: 8px;
    left: 10%;
    width: 80%;
    height: 6px; /* Adjusted height */
    background-color: var(--clay-darker);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid var(--clay-border);
}

.progress-bar {
    height: 100%;
    background: var(--gradient-accent);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.action-tag { /* Reusing harvest-tag style */
    /* Styles handled by clay-theme.css */
    position: absolute;
    bottom: 20px; /* Adjust position */
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
}


#ranch-footer {
    background-color: var(--clay-dark);
    padding: 1rem; /* Increased padding */
    box-shadow: 0 -4px 12px var(--clay-shadow);
    margin-top: 1.5rem;
    border-top: 1px solid var(--clay-border);
    border-radius: 0.75rem; /* Add rounding */
}

#animal-selection-container {
    display: grid;
    grid-template-columns: 3fr 1fr; /* Adjust ratio */
    gap: 1rem; /* Increased gap */
}

#animal-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); /* Adjusted min size */
    gap: 0.75rem; /* Adjusted gap */
    max-height: 185px; /* Adjusted height */
    overflow-y: auto;
    padding: 0.75rem;
    background-color: var(--clay-darker);
    border-radius: 0.5rem;
    border: 1px solid var(--clay-border);
}

/* Reusing .seed-item styles - ensure farm-ui.css is loaded or copy */
.seed-item { /* Assuming .seed-item is used for animals */
    background: var(--gradient-surface);
    border: 1px solid var(--clay-border);
    border-radius: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    aspect-ratio: 1 / 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* REMOVED HOVER EFFECT FOR SEED ITEM */
.seed-item.selected {
    border-color: var(--clay-focus);
    transform: scale(1.05);
    box-shadow: 0 0 8px var(--clay-glow);
}

.seed-item img {
    width: 90%;
    height: 90%;
    object-fit: contain;
}

#animal-details-container {
    background-color: var(--clay-darker);
    border: 1px solid var(--clay-border);
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: left;
    color: var(--clay-text-secondary);
}

/* Reusing .seed-details-header styles */
.seed-details-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--clay-border);
}

#animal-details-container h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--clay-text-primary);
}

#animal-details-container img {
    max-width: 30px;
    margin: 0;
}

#animal-details-container p {
    margin: 0.3rem 0;
    font-size: 0.85rem;
}
#animal-details-container p strong {
    color: var(--clay-text-tertiary);
}

.pen-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    bottom: auto; /* Ensure no conflict with progress bar */
    left: auto;
    width: auto;
    display: flex;
    gap: 5px;
    z-index: 5; /* Ensure buttons are clickable */
}

.pen-action-btn {
    /* Styles handled by clay-theme.css */
    padding: 0;
    width: 28px; /* Adjusted size */
    height: 28px; /* Adjusted size */
    font-size: 0; /* Hide text if any */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pen-action-btn svg { /* Style SVG inside */
    width: 14px;
    height: 14px;
}

.butcher-btn {
    /* Styles handled by clay-theme.css (danger button) */
}
.collect-btn {
    /* Styles handled by clay-theme.css (success equivalent) */
    background: var(--clay-success);
    color: white; /* Ensure icon is visible */
    border-color: #388E3C;
}
/* REMOVED HOVER EFFECT FOR COLLECT BUTTON
.collect-btn:hover {
    background: #388E3C;
} */
