/* Minimal CSS for reward preview functionality only */
.reward-image-placeholder {
    transition: all 0.3s ease;
}

.reward-image-placeholder:hover {
    background: rgba(156, 163, 175, 0.2);
    border-color: #6b7280;
}

.reward-image-placeholder img {
    object-fit: cover;
}

.reward-data {
    display: none;
}

/* Suntronics form control styling */
.form-control {
    background-color: #fff;
    border: 1px solid #D6D3CD;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 16px;
    color: #000;
    transition: border-color 0.2s ease;
}

.form-control:hover {
    border-color: #91c148;
}

.form-control:focus {
    border-color: #91c148;
    box-shadow: none;
    outline: none;
    color: #000;
}

/* Hover preview frame */
.reward-preview-frame {
    position: fixed;
    z-index: 9999;
    background: #fff;
    border: 2px solid #9ca3af;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 12px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    max-width: 600px;
}

.reward-preview-frame.visible {
    opacity: 1;
    pointer-events: auto;
}

.preview-cards-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.preview-card {
    position: relative;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    max-width: 200px;
}

.preview-card img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1.586/1;
    object-fit: cover;
}

.preview-card-tag {
    position: absolute;
    top: 4px;
    left: 4px;
    background: #91c148;
    color: #fff;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.6rem;
    font-weight: 700;
    z-index: 1;
}

.preview-card-name {
    padding: 4px 6px;
    font-size: 0.65rem;
    font-weight: 600;
    color: #333;
    text-align: center;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.preview-card.selected {
    border: 2px solid #91c148;
    box-shadow: 0 0 0 2px rgba(145, 193, 72, 0.2);
}

.preview-card:hover {
    border-color: #91c148;
}

/* Close button for preview frame */
.preview-close-btn {
    position: absolute;
    top: 6px;
    right: 8px;
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    display: none;
    z-index: 10;
}

.preview-close-btn:hover {
    color: #0f172a;
    background: #f1f5f9;
}

/* Mobile: center preview frame in viewport */
@media (max-width: 768px) {
    .preview-close-btn {
        display: block;
    }

    .reward-preview-frame {
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: min(380px, calc(100vw - 32px)) !important;
        max-width: 90vw !important;
        max-height: 85vh !important;
        overflow-y: auto !important;
        padding: 32px 14px 14px 14px !important;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35) !important;
        border-radius: 12px !important;
    }
}

/* ===== Referral Cards ===== */
@keyframes referralSlideUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.referral-card {
    background: #fff;
    border-radius: 24px;
    border: 1px solid #f1f5f9;
    padding: 28px 24px 22px;
    box-shadow: 0 4px 16px rgba(2, 6, 23, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: referralSlideUp 0.45s ease both;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.referral-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(2, 6, 23, 0.12);
}

/* Top row: date badge + status badge */
.referral-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 6px;
}

.referral-card-status-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Date badge */
.referral-date-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 6px 12px;
    min-width: 48px;
}

.referral-date-day {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1;
}

.referral-date-month {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    font-weight: 600;
    margin-top: 2px;
}

/* Status badges */
.referral-status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.status-verstuurd {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.status-afspraak {
    background: #fefce8;
    color: #ca8a04;
    border: 1px solid #fef08a;
}

.status-offerte {
    background: #fdf4ff;
    color: #9333ea;
    border: 1px solid #e9d5ff;
}

.status-in-behandeling {
    background: #fff7ed;
    color: #ea580c;
    border: 1px solid #fed7aa;
}

.status-compleet {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.status-default {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

/* Card body content */
.referral-card-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.referral-card-contact {
    font-size: 0.85rem;
    color: #64748b;
}

.referral-card-divider {
    border-top: 1px solid #f1f5f9;
    margin: 4px 0;
}

.referral-card-reward {
    font-size: 0.88rem;
    font-weight: 600;
    color: #16a34a;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.referral-amount-badge {
    display: inline-block;
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 2px 8px;
    font-size: 0.8rem;
    font-weight: 700;
}

.referral-card-code {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: auto;
    padding-top: 4px;
    font-family: monospace;
    letter-spacing: 0.3px;
}

/* Empty state */
.referrals-empty {
    background: #fff;
    border-radius: 24px;
    border: 1px dashed #e2e8f0;
    padding: 60px 40px;
    color: #94a3b8;
}

.referrals-empty .fa {
    color: #cbd5e1;
    display: block;
    margin-bottom: 16px;
}

/* Staggered animation for cards */
.col-md-6:nth-child(1) .referral-card { animation-delay: 0.05s; }
.col-md-6:nth-child(2) .referral-card { animation-delay: 0.10s; }
.col-md-6:nth-child(3) .referral-card { animation-delay: 0.15s; }
.col-md-6:nth-child(4) .referral-card { animation-delay: 0.20s; }
.col-md-6:nth-child(5) .referral-card { animation-delay: 0.25s; }
.col-md-6:nth-child(6) .referral-card { animation-delay: 0.30s; }

/* Download button next to status badge */
.referral-download-btn {
    font-size: 0.75rem;
    padding: 4px 10px;
    font-weight: 600;
}
