/* Custom CSS for Vegetable Yield Calculator */
/* Brand Color Definition */
:root {
    --vyc-brand-color: #b6bc67;
    --vyc-brand-color-dark: #9da35a; /* Slightly darker for hover */
    --vyc-light-bg: #f9fafb; /* Light background for sections */
    --vyc-border-color: #e5e7eb;
    --vyc-text-color: #374151;
    --vyc-heading-color: #1f2937;
    --vyc-info-bg: #e0f2fe; /* Light blue info background */
    --vyc-info-text: #0c4a6e; /* Dark blue info text */
}

.veg-yield-calculator {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    color: var(--vyc-text-color);
    line-height: 1.6;
}

.vyc-header {
    text-align: center;
    margin-bottom: 30px;
    color: var(--vyc-brand-color);
    font-size: 2.25rem; /* text-3xl */
    font-weight: 700; /* font-bold */
}

.vyc-section-title {
    font-size: 1.25rem; /* text-xl */
    font-weight: 600; /* font-semibold */
    margin-bottom: 15px;
    color: var(--vyc-heading-color);
    border-bottom: 2px solid var(--vyc-border-color);
    padding-bottom: 8px;
}

.vyc-grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

@media (min-width: 768px) { /* md breakpoint */
    .vyc-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

.vyc-input-group {
    display: flex;
    flex-direction: column;
}

.vyc-label {
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--vyc-heading-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.vyc-input, .vyc-select {
    padding: 12px;
    border: 1px solid var(--vyc-border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
    -webkit-appearance: none; /* Remove default select arrow */
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23b6bc67%22%20d%3D%22M287%2C114.7L154.2%2C247.5c-4.7%2C4.7-12.3%2C4.7-17%2C0L5.4%2C114.7c-4.7-4.7-4.7-12.3%2C0-17l17-17c4.7-4.7%2C12.3-4.7%2C17%2C0l106.6%2C106.6c4.7%2C4.7%2C12.3%2C4.7%2C17%2C0l106.6-106.6c4.7-4.7%2C12.3-4.7%2C17%2C0l17%2C17C291.7%2C102.4%2C291.7%2C110%2C287%2C114.7z%22%2F%3E%3C%2Fsvg%3E'); /* Custom arrow */
    background-repeat: no-repeat;
    background-position: right 12px top 50%;
    background-size: 12px auto;
}

.vyc-input:focus, .vyc-select:focus {
    outline: none;
    border-color: var(--vyc-brand-color);
    box-shadow: 0 0 0 3px rgba(182, 188, 103, 0.2); /* Adjusted for brand color */
}

.vyc-unit-toggle {
    display: flex;
    background-color: var(--vyc-light-bg);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--vyc-border-color);
    margin-left: 10px;
}

.vyc-unit-button {
    padding: 6px 12px;
    font-size: 0.875rem;
    background-color: transparent;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    color: var(--vyc-text-color);
    font-weight: 500;
}

.vyc-unit-button.active {
    background-color: var(--vyc-brand-color);
    color: #ffffff;
    font-weight: 600;
}

.vyc-results-panel, .vyc-recommendation-panel, .vyc-ai-tips-panel {
    background-color: var(--vyc-light-bg);
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
    border: 1px solid var(--vyc-border-color);
}

.vyc-results-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #e0e0e0;
}

.vyc-results-item:last-child {
    border-bottom: none;
}

.vyc-results-label {
    font-weight: 600;
    color: var(--vyc-heading-color);
}

.vyc-results-value {
    font-weight: 700;
    color: var(--vyc-brand-color);
}

.vyc-recommendation-panel p, .vyc-ai-tips-panel p {
    font-size: 0.95rem;
    color: var(--vyc-text-color);
}

/* Message Box Styling */
.vyc-message-box {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none; /* Hidden by default */
    opacity: 0;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    font-size: 0.95rem;
    font-weight: 500;
    min-width: 250px;
    text-align: center;
}

.vyc-message-box.show {
    display: block;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.vyc-message-box.info {
    background-color: var(--vyc-info-bg);
    color: var(--vyc-info-text);
}

.vyc-message-box.error {
    background-color: #fee2e2; /* Light red */
    color: #991b1b; /* Dark red */
}

.vyc-message-box.success {
    background-color: #dcfce7; /* Light green */
    color: #166534; /* Dark green */
}

/* AI Tips Button & Loading */
.vyc-ai-button {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background-color: var(--vyc-brand-color);
    color: #ffffff;
    font-size: 1.125rem; /* text-lg */
    font-weight: 700; /* font-bold */
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.vyc-ai-button:hover {
    background-color: var(--vyc-brand-color-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.vyc-ai-button.loading {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.vyc-spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #ffffff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
