/* Plant Selection Mode Styles */

/* Card styles */
.admin-plant-card,
.user-plant-card {
    position: relative !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 0.375rem !important;
    overflow: hidden !important;
    transition: all 0.2s ease-in-out !important;
    margin-bottom: 20px !important;
}

/* Card hover effects */
.admin-plant-card:hover,
.user-plant-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Selection mode styles */
body.plant-selection-mode .admin-plant-card,
body.plant-selection-mode .user-plant-card {
    cursor: pointer;
}

/* Checkbox styles */
.selection-checkbox {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    background-color: white !important;
    border: 2px solid #ddd !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 1000 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
}

/* Show checkboxes in selection mode */
body.plant-selection-mode .selection-checkbox {
    display: flex !important;
}

/* Checkbox icon */
.selection-checkbox i {
    color: transparent;
    transition: color 0.2s ease;
    font-size: 18px !important;
}

/* Selected card styles */
.admin-plant-card.selected,
.user-plant-card.selected {
    border: 2px solid #198754 !important;
    transform: scale(1.02) !important;
}

/* Selected checkbox styles */
.admin-plant-card.selected .selection-checkbox,
.user-plant-card.selected .selection-checkbox {
    background-color: #198754 !important;
    border-color: #198754 !important;
}

.admin-plant-card.selected .selection-checkbox i,
.user-plant-card.selected .selection-checkbox i {
    color: white !important;
}

/* Selection bar - Original layout as in the image */
.selection-bar {
    background-color: #198754 !important;
    color: white !important;
    border-radius: 5px !important;
    padding: 15px 20px !important;
    margin-bottom: 20px !important;
    text-align: center !important;
    width: 100% !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Ensure search controls stay above selection bar but below notifications */
.search-controls-container {
    position: relative !important;
    z-index: 100 !important;
}

.selection-header {
    margin: 0 !important;
    padding: 0 !important;
}

.selection-header h2 {
    font-size: 1.5rem !important;
    margin: 0 0 5px 0 !important;
    font-weight: 600 !important;
}

.selection-header p {
    margin: 0 !important;
    opacity: 0.8 !important;
    font-size: 1rem !important;
}

/* Selection controls - Now positioned outside of green bar */
.selection-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 10px;
    width: 100%;
}

.search-box {
    position: relative;
    flex-grow: 1;
    margin-right: 15px;
    min-width: 200px;
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.search-box input {
    padding-left: 35px;
    width: 100%;
    height: 38px;
}

.action-buttons {
    display: flex;
    gap: 10px;
    white-space: nowrap;
}

/* Category Filter Box Styles */
.category-filter-box {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.filter-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.5rem;
}

.category-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-start;
}

.category-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 70px;
    background: transparent;
}

.category-icon-item:hover {
    background-color: rgba(25, 135, 84, 0.1);
}

.category-icon-item.active {
    background-color: rgba(25, 135, 84, 0.15);
    border: 2px solid #198754;
}

.category-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-bottom: 0.25rem;
}

.icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 2px solid #198754;
    margin-bottom: 0.25rem;
}

.icon-circle i {
    font-size: 1.2rem;
    color: #198754;
}

.icon-circle.active {
    background: #198754;
}

.icon-circle.active i {
    color: white;
}

.category-icon-item span {
    font-size: 0.75rem;
    color: #666;
    text-align: center;
    font-weight: 500;
}

.category-icon-item.active span {
    color: #198754;
    font-weight: 600;
}

/* Show more button positioned below categories */
.category-more-toggle {
    width: 100%;
    text-align: center;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #dee2e6;
}

.category-more-toggle button {
    background: none;
    border: none;
    color: #198754;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: all 0.2s ease;
}

.category-more-toggle button:hover {
    color: #146c43;
    text-decoration: underline;
} 


/* Floating selection counter - ALWAYS VISIBLE AND STICKY */
.plant-selection-counter {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #198754 0%, #157347 100%);
    color: white;
    padding: 14px 24px;
    border-radius: 50px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
    font-weight: 500;
    font-size: 15px;
}

.plant-selection-counter.has-items {
    opacity: 1;
    transform: translateY(0) scale(1.02);
    pointer-events: all;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 0 8px 30px rgba(25, 135, 84, 0.5);
    }
}

.plant-selection-counter .count {
    background: rgba(255, 255, 255, 0.25);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 16px;
    min-width: 30px;
    text-align: center;
}

.plant-selection-counter .view-btn {
    background: white;
    color: #198754;
    border: none;
    padding: 8px 18px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.plant-selection-counter .view-btn:hover {
    background: #f8f9fa;
    transform: scale(1.05);
}

.plant-selection-counter .clear-btn {
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.plant-selection-counter .clear-btn:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .plant-selection-counter {
        bottom: 15px;
        right: 15px;
        padding: 12px 18px;
        font-size: 14px;
        gap: 10px;
    }
    
    .plant-selection-counter .count {
        font-size: 14px;
        padding: 3px 10px;
    }
    
    .plant-selection-counter .view-btn {
        padding: 6px 14px;
        font-size: 13px;
    }
    
    .plant-selection-counter .clear-btn {
        width: 32px;
        height: 32px;
    }
}
