/**
 * DeMV Platform - Enhanced Rental Cards CSS
 * Cyberpunk-styled rental cards with advanced glow effects and dynamic styling
 */

/* Enhanced Rental Card Styling */
.rental-card {
    background-color: rgba(18, 18, 30, 0.8);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    border: 1px solid rgba(0, 243, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.rental-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 243, 255, 0.4);
    border: 1px solid rgba(0, 243, 255, 0.6);
}

.rental-card:hover .rental-card-glow {
    opacity: 1;
}

.rental-card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    pointer-events: none;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4), 0 0 40px rgba(0, 243, 255, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rental-image-container {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.rental-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.rental-card:hover .rental-image {
    transform: scale(1.08);
}

.rental-type {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 2;
}

/* Type-specific styling */
.rental-type.electric {
    background: linear-gradient(135deg, rgba(0, 255, 170, 0.8), rgba(0, 255, 170, 0.4));
    color: #000;
    border-color: rgba(0, 255, 170, 0.6);
    box-shadow: 0 0 15px rgba(0, 255, 170, 0.5);
}

.rental-type.hybrid {
    background: linear-gradient(135deg, rgba(0, 200, 255, 0.8), rgba(0, 200, 255, 0.4));
    color: #000;
    border-color: rgba(0, 200, 255, 0.6);
    box-shadow: 0 0 15px rgba(0, 200, 255, 0.5);
}

.rental-type.suv {
    background: linear-gradient(135deg, rgba(255, 153, 0, 0.8), rgba(255, 153, 0, 0.4));
    color: #000;
    border-color: rgba(255, 153, 0, 0.6);
    box-shadow: 0 0 15px rgba(255, 153, 0, 0.5);
}

.rental-type.truck {
    background: linear-gradient(135deg, rgba(255, 51, 51, 0.8), rgba(255, 51, 51, 0.4));
    color: #000;
    border-color: rgba(255, 51, 51, 0.6);
    box-shadow: 0 0 15px rgba(255, 51, 51, 0.5);
}

.rental-type.sports {
    background: linear-gradient(135deg, rgba(255, 0, 128, 0.8), rgba(255, 0, 128, 0.4));
    color: #000;
    border-color: rgba(255, 0, 128, 0.6);
    box-shadow: 0 0 15px rgba(255, 0, 128, 0.5);
}

.rental-type.sedan {
    background: linear-gradient(135deg, rgba(153, 102, 255, 0.8), rgba(153, 102, 255, 0.4));
    color: #000;
    border-color: rgba(153, 102, 255, 0.6);
    box-shadow: 0 0 15px rgba(153, 102, 255, 0.5);
}

.rental-details {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    background: linear-gradient(180deg, rgba(18, 18, 30, 0.9) 0%, rgba(18, 18, 30, 1) 100%);
    position: relative;
    overflow: hidden;
}

.rental-details::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.5), transparent);
}

.rental-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 0.5px;
    line-height: 1.2;
    position: relative;
    display: inline-block;
}

.rental-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(0, 243, 255, 0.8), transparent);
}

.rental-price {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #00f3ff;
    text-shadow: 0 0 8px rgba(0, 243, 255, 0.5);
    position: relative;
    display: inline-block;
}

.price-period {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-left: 0.25rem;
}

.rental-location {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rental-location i {
    color: #ff2a6d;
    text-shadow: 0 0 5px rgba(255, 42, 109, 0.5);
}

.rental-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.feature {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    background-color: rgba(108, 99, 255, 0.2);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(108, 99, 255, 0.3);
    transition: all 0.3s ease;
}

.feature:hover {
    background-color: rgba(108, 99, 255, 0.3);
    border-color: rgba(108, 99, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 0 8px rgba(108, 99, 255, 0.4);
}

.rental-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
    position: relative;
}

.rental-actions::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(108, 99, 255, 0.3), transparent);
}

.rental-actions .btn {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.rental-actions .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
}

.rental-actions .btn:hover::before {
    left: 100%;
}

.rental-actions .btn-primary {
    background: linear-gradient(135deg, #00f3ff, #00a3ff);
    border: none;
    color: #000;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.rental-actions .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.6);
    background: linear-gradient(135deg, #00f3ff, #0080ff);
}

.rental-actions .btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.rental-actions .btn-secondary {
    background: rgba(30, 30, 45, 0.8);
    border: 1px solid rgba(108, 99, 255, 0.3);
    color: #fff;
}

.rental-actions .btn-secondary:hover {
    background: rgba(108, 99, 255, 0.2);
    border-color: rgba(108, 99, 255, 0.6);
    transform: translateY(-3px);
    box-shadow: 0 0 15px rgba(108, 99, 255, 0.4);
}

.rental-actions .btn-secondary:active {
    transform: translateY(1px);
    box-shadow: 0 0 5px rgba(108, 99, 255, 0.3);
}

.rental-actions .btn-secondary.active {
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.4), rgba(108, 99, 255, 0.2));
    border-color: rgba(108, 99, 255, 0.8);
    color: #fff;
    box-shadow: 0 0 15px rgba(108, 99, 255, 0.5), inset 0 0 10px rgba(108, 99, 255, 0.2);
    transform: translateY(-2px);
}

/* Rental meta information layout */
.rental-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    position: relative;
}

.rental-meta .rental-year-type {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rental-meta .rental-year {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(30, 30, 45, 0.6);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(108, 99, 255, 0.2);
}

.rental-meta .rental-type {
    position: relative;
    bottom: auto;
    right: auto;
    font-size: 0.8rem;
    padding: 4px 8px;
}

.rental-meta .rental-location {
    margin-bottom: 0;
    flex: 1;
    font-size: 0.85rem;
}

.rental-meta .rental-price {
    display: none;
}

/* Rental header modifications */
.rental-header {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rental-header .rental-title {
    margin-bottom: 0;
    flex: 1;
}

.rental-header .rental-price {
    display: block;
    margin-bottom: 0;
    text-align: right;
}

/* List view specific styles */
.rental-listings.list-view .rental-card {
    flex-direction: row;
    height: 200px;
}

.rental-listings.list-view .rental-image-container {
    width: 300px;
    height: 100%;
    flex-shrink: 0;
}

.rental-listings.list-view .rental-details {
    flex: 1;
    padding: 1rem;
}

.rental-listings.list-view .rental-features {
    margin-bottom: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .rental-listings.list-view .rental-card {
        flex-direction: column;
        height: auto;
    }
    
    .rental-listings.list-view .rental-image-container {
        width: 100%;
        height: 200px;
    }
}

/* Comparison UI Enhancements */
.pulse-highlight {
    animation: pulse-glow 1s ease-in-out;
    color: #00f3ff !important;
    text-shadow: 0 0 8px rgba(0, 243, 255, 0.8);
}

@keyframes pulse-glow {
    0% {
        transform: scale(1);
        color: #fff;
        text-shadow: 0 0 0 rgba(0, 243, 255, 0);
    }
    50% {
        transform: scale(1.05);
        color: #00f3ff;
        text-shadow: 0 0 12px rgba(0, 243, 255, 1);
    }
    100% {
        transform: scale(1);
        color: #00f3ff;
        text-shadow: 0 0 8px rgba(0, 243, 255, 0.8);
    }
}

.ready-to-compare {
    position: relative;
    overflow: hidden;
}

.ready-to-compare::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 243, 255, 0.2),
        transparent
    );
    animation: loading-sweep 1.5s infinite;
}

@keyframes loading-sweep {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Floating Compare Button Enhancements */
.floating-compare-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #00f3ff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(0, 243, 255, 0.5);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 243, 255, 0.5);
    font-size: 1.5rem;
}

.floating-compare-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(0, 243, 255, 0.7);
}

.floating-compare-btn .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff2a6d;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.floating-compare-btn.active {
    animation: pulse-compare 2s infinite;
}

@keyframes pulse-compare {
    0% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(0, 243, 255, 0.5);
    }
    50% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 243, 255, 0.8);
    }
    100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(0, 243, 255, 0.5);
    }
}
