/* Purchase Order System - Botanical Professional Theme */
:root {
    --wff-purple: #5B21B6;
    --wff-lavender: #AF69EE;
    --wff-pink: #DB2777;
    --wff-bg: #FDFCFB;
    --wff-border: #e2e8f0;
    --wff-text: #374151;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--wff-bg);
    color: var(--wff-text);
}

.font-serif {
    font-family: 'Lora', serif;
}

/* --- Navigation & Buttons --- */
.btn-primary {
    background-color: var(--wff-lavender);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    box-shadow: 0 4px 6px -1px rgba(175, 105, 238, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background-color: #8B48D7;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(175, 105, 238, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--wff-pink);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
    border: 2px solid var(--wff-pink);
    transition: all 0.2s;
}

.btn-secondary:hover {
    background-color: var(--wff-pink);
    color: white;
}

/* --- Unique Filter System --- */
.botanical-filters {
    background: white;
    padding: 1.25rem 1.75rem;
    border-radius: 1.25rem;
    border: 1px solid var(--wff-border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    margin-bottom: 2.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: center;
}

.search-wrap {
    position: relative;
    flex: 1;
    min-width: 280px;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.75rem;
    border: 1.5px solid var(--wff-border);
    border-radius: 0.75rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.2s;
    background: #fcfdfe;
}

.search-input:focus {
    border-color: var(--wff-lavender);
    box-shadow: 0 0 0 3px rgba(175, 105, 238, 0.1);
}

.size-pills-container {
    display: flex;
    flex: 1;
    min-width: 0;
    align-items: center;
    gap: 0.75rem;
}

.size-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.size-pills.collapsed {
    max-height: 2.25rem;
    /* Height of one row of pills */
}

.pill-toggle {
    background: transparent;
    border: none;
    color: var(--wff-lavender);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    white-space: nowrap;
    transition: color 0.2s;
}

.pill-toggle:hover {
    color: var(--wff-purple);
}

.size-pill {
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    border: 1px solid var(--wff-border);
    background: white;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.size-pill:hover {
    border-color: var(--wff-lavender);
    color: var(--wff-lavender);
}

.size-pill.active {
    background: var(--wff-purple);
    color: white;
    border-color: var(--wff-purple);
}

.btn-clear {
    background: #f1f5f9;
    color: #64748b;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-clear:hover {
    background: #fee2e2;
    color: var(--wff-pink);
    border-color: var(--wff-pink);
}

/* --- Professional Compact Layout --- */
.pot-group {
    margin-bottom: 2.5rem;
    border: 1px solid var(--wff-border);
    border-radius: 1rem;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.pot-header {
    background: #f8fafc;
    border-bottom: 1px solid var(--wff-border);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pot-title {
    font-family: 'Lora', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--wff-purple);
}

.plant-section {
    border-bottom: 1px solid #f1f5f9;
}

.plant-section:last-child {
    border-bottom: none;
}

.plant-name {
    padding: 0.6rem 1.25rem;
    font-family: 'Lora', serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: #334155;
    background: #fcfdfe;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.variety-row {
    display: grid;
    grid-template-columns: 1fr 140px;
    padding: 0.6rem 1.5rem 0.6rem 2.75rem;
    /* Increased left padding for "tab" effect */
    align-items: center;
    border-top: 1px solid #f8fafc;
    border-left: 3px solid transparent;
    /* Placeholder for hover effect or hierarchy line */
    transition: all 0.2s;
    position: relative;
}

.variety-row::before {
    content: '';
    position: absolute;
    left: 1.75rem;
    top: 0;
    bottom: 0;
    width: 1.5px;
    background: #f1f5f9;
    /* Subtle vertical nesting line */
}

.variety-row:hover {
    background: #fcfdfe;
    border-left-color: var(--wff-lavender);
}

.variety-row:nth-child(even) {
    background: #fafbfc;
}

.variety-text {
    font-size: 0.9rem;
    color: var(--wff-text);
}

.variety-note {
    font-size: 0.75rem;
    color: #64748b;
    font-style: italic;
    margin-left: 0.5rem;
}

.qty-input {
    width: 65px;
    padding: 0.3rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    outline: none;
}

.qty-input:focus {
    border-color: var(--wff-lavender);
}

.price-tag {
    font-family: 'Lora', serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--wff-purple);
    background: #f5f3ff;
    padding: 0.1rem 0.6rem;
    border-radius: 6px;
    border: 1px solid #ddd6fe;
}

.qty-header-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* --- Sticky Footer (Mobile) / Sidebar Cart (Desktop) --- */
.order-summary-bar {
    position: sticky;
    bottom: 1rem;
    left: 0;
    right: 0;
    z-index: 50;
    background: white;
    border: 1px solid var(--wff-lavender);
    padding: 0.75rem 1.5rem;
    margin: 4rem auto 1rem auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: calc(100% - 2rem);
    max-width: 1200px;
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(175, 105, 238, 0.25), 0 8px 10px -6px rgba(175, 105, 238, 0.1);
}

/* Professional Mobile Footer Overrides */
@media (max-width: 1023px) {
    .order-summary-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: none;
        border-radius: 0;
        margin: 0;
        border: none;
        border-top: 1px solid rgba(175, 105, 238, 0.3);
        box-shadow: none;
        background: white;
        z-index: 100;
        padding: 1rem 1.5rem;
    }
}

/* Desktop Sidebar Cart */
.cart-sidebar {
    background: white;
    border: 1px solid var(--wff-border);
    border-radius: 1rem;
    padding: 1.5rem;
    position: sticky;
    top: 5.5rem;
    max-height: calc(100vh - 8rem);
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.cart-sidebar-title {
    font-family: 'Lora', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--wff-purple);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.cart-items-list {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 1.25rem;
    padding-right: 0.5rem;
}

.cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f8fafc;
}

.cart-item-info {
    font-size: 0.8rem;
    color: var(--wff-text);
    flex: 1;
    padding-right: 1rem;
}

.cart-item-qty {
    font-weight: 800;
    color: #000000;
    font-size: 0.9rem;
}

.summary-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--wff-purple);
}

.stat-value.total {
    color: #059669;
}

/* Admin Styles */
.section-card {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--wff-border);
}

.input-field {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--wff-border);
    border-radius: 0.5rem;
    outline: none;
}

/* Admin Pot Config Selection & Grouping */
.pot-row {
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.pot-row.selected {
    background-color: #f3e8ff !important;
    /* Light purple selection */
    border-left: 4px solid #AF69EE;
}

.pot-row:hover:not(.selected) {
    background-color: #f9fafb;
}

.pot-row input {
    cursor: text;
}

.btn-toggle-plants i,
.btn-toggle-plants svg {
    transition: transform 0.2s ease-in-out;
}



.plant-override-price {
    transition: border-color 0.2s, box-shadow 0.2s;
}

.plant-override-price:focus {
    border-color: var(--wff-purple);
    box-shadow: 0 0 0 2px rgba(175, 105, 238, 0.1);
}

/* Item Cross-out */
.strikethrough {
    text-decoration: line-through;
    opacity: 0.5;
    background-color: #f3f4f6 !important;
    /* Light gray background when crossed out */
}

.clickable-item {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.clickable-item:hover {
    background-color: #f9fafb;
}

/* Status Select */
.status-select {
    padding: 2px 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    background: transparent;
    cursor: pointer;
    outline: none;
}

.status-select:focus {
    border-color: var(--wff-lavender);
}

.unread-dot {
    width: 8px;
    height: 8px;
    background-color: var(--wff-pink);
    border-radius: 50%;
    display: inline-block;
}

.read-tick {
    color: #10b981;
}


/* Review Order & Checkout Styles */
.review-header {
    border-bottom: 2px solid var(--wff-lavender);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
}

.policy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.policy-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.25rem;
}

.policy-card h4 {
    color: var(--wff-purple);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.policy-text {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.5;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }
}

.review-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.disclaimer-box {
    background: #fffbeb;
    border: 1px solid #fef3c7;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.disclaimer-text {
    font-size: 0.85rem;
    color: #92400e;
    font-weight: 500;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
}

.form-group .required::after {
    content: " *";
    color: #ef4444;
}

.fulfillment-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    background: #f1f5f9;
    padding: 0.25rem;
    border-radius: 0.5rem;
}

.fulfillment-option {
    cursor: pointer;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.fulfillment-option.active {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Quick Breakdown Popover */
#quick-breakdown-popover {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 2rem;
    width: 300px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    z-index: 60;
    overflow: hidden;
    animation: slideUp 0.2s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.quick-breakdown-header {
    background: #f8fafc;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.quick-breakdown-body {
    max-height: 350px;
    overflow-y: auto;
    padding: 0.5rem 1rem;
}

.summary-stats {
    position: relative;
    /* Context for absolute popover */
}

/* Google Image Link Styles */
.google-link {
    cursor: pointer !important;
}

.google-link:hover {
    text-decoration: underline;
    color: var(--wff-purple) !important;
}

/* Global Cursor Fix */
a,
button,
[role="button"],
input[type="submit"],
input[type="button"] {
    cursor: pointer !important;
}