/* Modern Property Status Badges */

.property-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 15;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
    animation: statusFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 24px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid transparent;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    min-width: 100px;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.status-badge i {
    font-size: 0.8rem;
    opacity: 0.9;
}

.status-text {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Status Variants */
.status-pending {
    background: linear-gradient(135deg, 
        rgba(255, 243, 205, 0.95), 
        rgba(255, 234, 167, 0.95));
    color: #92400E; /* Improved contrast from #B45309 */
    border-color: rgba(245, 158, 11, 0.3);
    animation: pendingPulse 3s infinite;
}

.status-approved {
    background: linear-gradient(135deg, 
        rgba(209, 250, 229, 0.95), 
        rgba(167, 243, 208, 0.95));
    color: #065F46; /* Improved contrast from #047857 */
    border-color: rgba(16, 185, 129, 0.3);
}

.status-rejected {
    background: linear-gradient(135deg, 
        rgba(254, 242, 242, 0.95), 
        rgba(252, 165, 165, 0.95));
    color: #991B1B; /* Improved contrast from #B91C1C */
    border-color: rgba(239, 68, 68, 0.3);
    animation: rejectedShake 0.5s ease-in-out;
}

.status-unknown {
    background: linear-gradient(135deg, 
        rgba(248, 250, 252, 0.95), 
        rgba(226, 232, 240, 0.95));
    color: #334155; /* Improved contrast from #475569 */
    border-color: rgba(148, 163, 184, 0.3);
}

/* Hover Effects */
.status-badge:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.status-pending:hover {
    background: linear-gradient(135deg, 
        rgba(255, 243, 205, 1), 
        rgba(255, 234, 167, 1));
    color: #92400E; /* Darker for better contrast */
    border-color: rgba(245, 158, 11, 0.6);
}

.status-approved:hover {
    background: linear-gradient(135deg, 
        rgba(209, 250, 229, 1), 
        rgba(167, 243, 208, 1));
    color: #065F46; /* Darker green for better contrast */
    border-color: rgba(16, 185, 129, 0.6);
}

.status-rejected:hover {
    background: linear-gradient(135deg, 
        rgba(254, 242, 242, 1), 
        rgba(252, 165, 165, 1));
    color: #991B1B; /* Darker red for better contrast */
    border-color: rgba(239, 68, 68, 0.6);
}

.status-unknown:hover {
    background: linear-gradient(135deg, 
        rgba(248, 250, 252, 1), 
        rgba(226, 232, 240, 1));
    color: #334155; /* Darker gray for better contrast */
    border-color: rgba(148, 163, 184, 0.6);
}

/* Active States for Better Interaction Feedback */
.status-badge:active {
    transform: translateY(0) scale(0.98);
    transition: transform 0.1s ease;
}

.status-pending:active {
    background: linear-gradient(135deg, 
        rgba(245, 158, 11, 0.8), 
        rgba(217, 119, 6, 0.8));
    color: #fff;
}

.status-approved:active {
    background: linear-gradient(135deg, 
        rgba(16, 185, 129, 0.8), 
        rgba(5, 150, 105, 0.8));
    color: #fff;
}

.status-rejected:active {
    background: linear-gradient(135deg, 
        rgba(239, 68, 68, 0.8), 
        rgba(220, 38, 38, 0.8));
    color: #fff;
}

.status-unknown:active {
    background: linear-gradient(135deg, 
        rgba(107, 114, 128, 0.8), 
        rgba(75, 85, 99, 0.8));
    color: #fff;
}

/* Enhanced Contrast Utility Classes */
.status-badge.high-contrast {
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    border-width: 2px;
    border-style: solid;
}

.status-badge.high-contrast.status-pending {
    background: #F59E0B !important;
    color: #000 !important;
    border-color: #92400E !important;
}

.status-badge.high-contrast.status-approved {
    background: #059669 !important;
    color: #fff !important;
    border-color: #064E3B !important;
}

.status-badge.high-contrast.status-rejected {
    background: #DC2626 !important;
    color: #fff !important;
    border-color: #7F1D1D !important;
}

.status-badge.high-contrast.status-unknown {
    background: #6B7280 !important;
    color: #fff !important;
    border-color: #374151 !important;
}

/* Improved text contrast specifically for icons */
.status-badge i {
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

/* Additional hover improvements for better readability */
.status-badge:hover i {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.status-badge:hover .status-text {
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

/* Animations */
@keyframes statusFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pendingPulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
        transform: scale(1.02);
    }
}

@keyframes rejectedShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .status-indicator {
        top: 8px;
        right: 8px;
    }
    
    .status-badge {
        font-size: 0.65rem;
        padding: 6px 12px;
        min-width: 85px;
    }
    
    .status-badge i {
        font-size: 0.7rem;
    }
    
    .status-text {
        display: none;
    }
    
    .status-badge::after {
        content: attr(data-status-short);
    }
}

@media (max-width: 480px) {
    .status-badge {
        padding: 4px 8px;
        min-width: auto;
        border-radius: 16px;
    }
    
    .status-badge i {
        margin-right: 0 !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .status-pending {
        background: linear-gradient(135deg, 
            rgba(120, 53, 15, 0.9), 
            rgba(146, 64, 14, 0.9));
        color: #FCD34D;
    }
    
    .status-approved {
        background: linear-gradient(135deg, 
            rgba(6, 78, 59, 0.9), 
            rgba(5, 150, 105, 0.9));
        color: #A7F3D0;
    }
    
    .status-rejected {
        background: linear-gradient(135deg, 
            rgba(127, 29, 29, 0.9), 
            rgba(153, 27, 27, 0.9));
        color: #FCA5A5;
    }
    
    .status-unknown {
        background: linear-gradient(135deg, 
            rgba(51, 65, 85, 0.9), 
            rgba(71, 85, 105, 0.9));
        color: #CBD5E1;
    }
}

/* High Contrast Support */
@media (prefers-contrast: high) {
    .status-badge {
        border-width: 3px;
        font-weight: 700;
        text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
    }
    
    .status-pending {
        background: #FCD34D !important;
        color: #000 !important;
        border-color: #92400E !important;
    }
    
    .status-pending:hover {
        background: #F59E0B !important;
        color: #000 !important;
        border-color: #78350F !important;
    }
    
    .status-approved {
        background: #10B981 !important;
        color: #fff !important;
        border-color: #065F46 !important;
    }
    
    .status-approved:hover {
        background: #059669 !important;
        color: #fff !important;
        border-color: #064E3B !important;
    }
    
    .status-rejected {
        background: #EF4444 !important;
        color: #fff !important;
        border-color: #991B1B !important;
    }
    
    .status-rejected:hover {
        background: #DC2626 !important;
        color: #fff !important;
        border-color: #7F1D1D !important;
    }
    
    .status-unknown {
        background: #9CA3AF !important;
        color: #000 !important;
        border-color: #374151 !important;
    }
    
    .status-unknown:hover {
        background: #6B7280 !important;
        color: #fff !important;        border-color: #1F2937 !important;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .status-badge,
    .status-indicator {
        animation: none;
        transition: none;
    }
    
    .status-badge:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .status-indicator {
        position: static;
        display: inline-block;
        margin: 0 0 10px 0;
    }
    
    .status-badge {
        background: #fff !important;
        color: #000 !important;
        border: 2px solid #000 !important;
        box-shadow: none !important;
    }
}

/* Focus Management for Accessibility */
.status-badge:focus {
    outline: 3px solid rgba(59, 130, 246, 0.8);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2), 0 6px 20px rgba(0, 0, 0, 0.2);
}

.status-badge:focus:not(:focus-visible) {
    outline: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Enhanced focus states for each status type */
.status-pending:focus {
    outline-color: rgba(245, 158, 11, 0.8);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2), 0 6px 20px rgba(0, 0, 0, 0.2);
}

.status-approved:focus {
    outline-color: rgba(16, 185, 129, 0.8);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2), 0 6px 20px rgba(0, 0, 0, 0.2);
}

.status-rejected:focus {
    outline-color: rgba(239, 68, 68, 0.8);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2), 0 6px 20px rgba(0, 0, 0, 0.2);
}

.status-unknown:focus {
    outline-color: rgba(148, 163, 184, 0.8);
    box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.2), 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* RTL Support */
[dir="rtl"] .status-indicator {
    right: auto;
    left: 12px;
}

[dir="rtl"] .status-badge i {
    margin-right: 0;
    margin-left: 4px;
}

/* Loading State */
.status-badge.loading {
    opacity: 0.7;
    pointer-events: none;
}

.status-badge.loading::after {
    content: "";
    width: 12px;
    height: 12px;
    border: 2px solid currentColor;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
