/* recipients.css - Custom styles for Recipient Manager Tab */

/* Ensure variables fallback if main.css fails or is overridden */
:root {
    --primary-color: #059669;
    --primary-hover: #047857;
    --primary-light: #ecfdf5;
    --text-color: #292524;
    --text-muted: #57534e;
    --bg-secondary: #f5f5f4;
    --border-color: #e7e5e4;
    --card-bg: #ffffff;
    --radius-md: 0.75rem;
}

/* Stats Dashboard Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--card-bg, #fff);
    padding: 1.5rem;
    border-radius: var(--radius-md, 12px);
    border: 1px solid var(--border-color, #e5e7eb);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 120px;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    color: var(--text-color, #1f2937);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted, #6b7280);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Input Styling Fixes (Force style over defaults) */
.search-wrapper input.form-control {
    border-radius: 8px;
    border: 1px solid #d1d5db;
    padding: 12px 16px 12px 48px;
    /* Left padding for icon */
    font-size: 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    background-color: #fff;
}

.search-wrapper input.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.search-icon-float {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #9ca3af;
    z-index: 5;
}

/* Recipient Card Items */
#recipient-results-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.recipient-card-item {
    background-color: #fff;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: var(--radius-md, 12px);
    padding: 1.25rem;
    transition: all 0.2s ease;
    display: flex;
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
    align-items: center;
    gap: 1rem;
    position: relative;
    border-left: 4px solid transparent;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.recipient-card-item:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
    border-color: var(--primary-color);
}

/* Selected State */
.recipient-card-item.selected {
    border-left-color: var(--primary-color);
    background-color: var(--primary-light, #ecfdf5);
    border-color: var(--primary-color);
}

.recipient-avatar {
    width: 48px;
    height: 48px;
    background-color: #fff;
    color: var(--primary-color);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* Card Typography */
.card-info-main h5 {
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    font-size: 1.1rem;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Floating Bar */
.selection-bar-floating {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 900px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #047857 100%);
    color: white;
    border-radius: 16px;
    padding: 12px 24px;
    z-index: 1050;
    /* Above modals potentially */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Admin Panel Buttons */
.btn-icon-action {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: transform 0.2s;
    font-size: 1.2rem;
    padding: 0;
}

.btn-icon-action:hover {
    transform: scale(1.1);
}

/* Responsive Fixes */
@media (max-width: 768px) {
    .recipient-card-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .recipient-card-item .text-end {
        text-align: left !important;
        width: 100%;
        margin-top: 10px;
        padding-left: 0 !important;
        border-left: none !important;
        border-top: 1px solid #eee;
        padding-top: 10px;
    }

    .recipient-card-item .d-flex.justify-content-end {
        justify-content: flex-start !important;
    }
}