/* =========================================
   Herbo Garden Visits - Frontend Styles
   ========================================= */

.hgv-widget {
    max-width: 700px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    position: relative;
}

/* Header */
.hgv-header {
    text-align: center;
    margin-bottom: 30px;
}
.hgv-title {
    color: #557b2f;
    font-size: 28px;
    margin: 0 0 10px;
}
.hgv-description {
    color: #666;
    font-size: 16px;
    margin: 0 0 16px;
    line-height: 1.5;
}

/* Pricing info */
.hgv-pricing-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}
.hgv-price-tag {
    background: #f5f9f0;
    border: 1px solid #d4e8c4;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: #333;
}
.hgv-free-tag {
    background: #fff9e6;
    border-color: #f0e0a0;
}

/* Steps */
.hgv-step {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.hgv-step h3 {
    color: #557b2f;
    font-size: 18px;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eef5e6;
}

/* Calendar Navigation */
.hgv-calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.hgv-nav-btn {
    background: #557b2f;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}
.hgv-nav-btn:hover {
    background: #446624;
}
.hgv-month-label {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    text-transform: capitalize;
}

/* Calendar Grid */
.hgv-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    background: #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
}
.hgv-cal-dow {
    background: #557b2f;
    color: #fff;
    text-align: center;
    padding: 10px 4px;
    font-size: 13px;
    font-weight: 600;
}
.hgv-cal-cell {
    background: #fff;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    cursor: default;
    transition: all 0.2s;
}
.hgv-cal-cell.hgv-empty {
    background: #fafafa;
}
.hgv-cal-cell.hgv-has-slots {
    cursor: pointer;
    background: #f0f7e6;
}
.hgv-cal-cell.hgv-has-slots:hover {
    background: #e0efcc;
    transform: scale(1.05);
}
.hgv-cal-cell.hgv-selected {
    background: #557b2f;
    color: #fff;
}
.hgv-cal-cell.hgv-selected .hgv-cal-date {
    color: #fff;
}
.hgv-cal-cell.hgv-selected .hgv-cal-slots-count {
    color: rgba(255, 255, 255, 0.9);
}
.hgv-cal-cell.hgv-past {
    opacity: 0.4;
}
.hgv-cal-date {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}
.hgv-cal-slots-count {
    font-size: 11px;
    color: #557b2f;
    margin-top: 2px;
}
.hgv-cal-cell.hgv-today .hgv-cal-date {
    background: #557b2f;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Slots List */
.hgv-slots {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}
.hgv-slot-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fdf5;
    border: 2px solid #d4e8c4;
    border-radius: 8px;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s;
}
.hgv-slot-card:hover {
    border-color: #557b2f;
    background: #f0f7e6;
    box-shadow: 0 2px 8px rgba(85, 123, 47, 0.15);
}
.hgv-slot-card.selected {
    border-color: #557b2f;
    background: #e8f2dc;
}
.hgv-slot-time {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}
.hgv-slot-remaining {
    font-size: 14px;
    color: #666;
}
.hgv-slot-remaining strong {
    color: #557b2f;
}

.hgv-selected-date {
    font-size: 16px;
    color: #555;
    margin-bottom: 16px;
}

/* Visitor Inputs */
.hgv-visitor-inputs {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}
.hgv-input-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f9f9f9;
    border-radius: 8px;
}
.hgv-input-group label {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}
.hgv-counter {
    display: flex;
    align-items: center;
    gap: 0;
}
.hgv-counter-btn {
    width: 36px;
    height: 36px;
    border: 2px solid #ddd;
    background: #fff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #333;
}
.hgv-counter-btn:first-child {
    border-radius: 6px 0 0 6px;
}
.hgv-counter-btn:last-child {
    border-radius: 0 6px 6px 0;
}
.hgv-counter-btn:hover {
    background: #557b2f;
    border-color: #557b2f;
    color: #fff;
}
.hgv-counter input {
    width: 50px;
    height: 36px;
    text-align: center;
    border: 2px solid #ddd;
    border-left: none;
    border-right: none;
    font-size: 16px;
    font-weight: 700;
    background: #fff;
    -moz-appearance: textfield;
}
.hgv-counter input::-webkit-inner-spin-button,
.hgv-counter input::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

/* Capacity Warning */
.hgv-capacity-warning {
    background: #fff3e0;
    border: 1px solid #ffcc80;
    color: #e65100;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
}

/* Price Summary */
.hgv-price-summary {
    background: #f5f9f0;
    border: 1px solid #d4e8c4;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}
.hgv-price-line {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 15px;
    color: #555;
}
.hgv-price-total {
    border-top: 2px solid #c4dbb0;
    padding-top: 10px;
    margin-top: 6px;
    font-size: 18px;
    color: #333;
}

/* Slot summary */
.hgv-slot-summary {
    background: #f0f7e6;
    padding: 12px 16px;
    border-radius: 6px;
    color: #333;
    margin-bottom: 20px;
    font-size: 15px;
}

/* Buttons */
.hgv-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s;
}
.hgv-btn-primary {
    background: #557b2f;
    color: #fff;
}
.hgv-btn-primary:hover {
    background: #446624;
}
.hgv-btn-primary:disabled {
    background: #aaa;
    cursor: not-allowed;
}
.hgv-btn-secondary {
    background: #f0f0f0;
    color: #333;
}
.hgv-btn-secondary:hover {
    background: #e0e0e0;
}
.hgv-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

/* Loading */
.hgv-loading {
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 15px;
    grid-column: 1 / -1;
}

/* Overlay */
.hgv-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    z-index: 100;
}
.hgv-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #557b2f;
    border-radius: 50%;
    animation: hgv-spin 0.8s linear infinite;
    margin-bottom: 12px;
}
@keyframes hgv-spin {
    to { transform: rotate(360deg); }
}

/* No slots message */
.hgv-no-slots {
    text-align: center;
    color: #888;
    padding: 24px;
    font-size: 15px;
}

/* Responsive */
@media (max-width: 600px) {
    .hgv-widget {
        margin: 16px;
    }
    .hgv-step {
        padding: 16px;
    }
    .hgv-title {
        font-size: 22px;
    }
    .hgv-pricing-info {
        flex-direction: column;
        align-items: center;
    }
    .hgv-slot-card {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    .hgv-actions {
        flex-direction: column;
    }
    .hgv-actions .hgv-btn {
        width: 100%;
        text-align: center;
    }
    .hgv-cal-dow {
        font-size: 11px;
        padding: 6px 2px;
    }
    .hgv-cal-cell {
        min-height: 40px;
        padding: 4px 2px;
    }
    .hgv-cal-date {
        font-size: 13px;
    }
    .hgv-cal-slots-count {
        font-size: 9px;
    }
    .hgv-input-group {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
}
