/**
 * Offer Module Styles
 * Trulia-inspired design for property offers
 */

/* ==========================================
 * GENERAL OFFER STYLES
 * ========================================== */

.offer-container {
    background: #f8f9fa;
    min-height: 100vh;
    padding: 2rem 0;
}

/* ==========================================
 * OFFER CARDS (Used in lists/grids)
 * ========================================== */

.offer-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
}

.offer-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.offer-match-percentage {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10;
}

.offer-match-percentage.high-match {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.offer-match-percentage.medium-match {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.offer-match-percentage.low-match {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* ==========================================
 * OFFER STATS & METRICS
 * ========================================== */

.offer-stats {
    display: flex;
    gap: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    margin-bottom: 2rem;
}

.offer-stat-item {
    flex: 1;
    text-align: center;
}

.offer-stat-value {
    font-size: 2rem;
    font-weight: 700;
    display: block;
    margin-bottom: 0.5rem;
}

.offer-stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* ==========================================
 * MATCH INDICATORS
 * ========================================== */

.match-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
}

.match-indicator.excellent {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.match-indicator.good {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.match-indicator.fair {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.match-indicator.poor {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

/* Match progress bar */
.match-progress-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin: 1rem 0;
}

.match-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.match-progress-fill.high {
    background: linear-gradient(90deg, #11998e 0%, #38ef7d 100%);
}

.match-progress-fill.medium {
    background: linear-gradient(90deg, #f093fb 0%, #f5576c 100%);
}

.match-progress-fill.low {
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
}

/* ==========================================
 * OFFER STATUS BADGES
 * ========================================== */

.offer-status-badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.813rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.offer-status-badge.status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.offer-status-badge.status-viewed {
    background: #cfe2ff;
    color: #084298;
    border: 1px solid #b6d4fe;
}

.offer-status-badge.status-accepted {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.offer-status-badge.status-rejected {
    background: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

/* ==========================================
 * OFFER TIMELINE
 * ========================================== */

.offer-timeline {
    position: relative;
    padding-left: 2rem;
}

.offer-timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e9ecef;
}

.offer-timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.offer-timeline-item::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 0.25rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #0d6efd;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #e9ecef;
}

.offer-timeline-content {
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* ==========================================
 * OFFER COMPARISON
 * ========================================== */

.offer-comparison-table {
    width: 100%;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.offer-comparison-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.offer-comparison-table td {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.offer-comparison-table tr:last-child td {
    border-bottom: none;
}

.offer-comparison-highlight {
    background: #f8f9ff;
    font-weight: 600;
    color: #0d6efd;
}

/* ==========================================
 * OFFER ACTIONS
 * ========================================== */

.offer-action-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.offer-action-btn {
    flex: 1;
    min-width: 120px;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.offer-action-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.offer-action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.offer-action-btn.success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.offer-action-btn.success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(17, 153, 142, 0.4);
}

.offer-action-btn.danger {
    background: #dc3545;
    color: white;
}

.offer-action-btn.danger:hover {
    background: #bb2d3b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.offer-action-btn.outline {
    background: transparent;
    border: 2px solid #0d6efd;
    color: #0d6efd;
}

.offer-action-btn.outline:hover {
    background: #0d6efd;
    color: white;
}

/* ==========================================
 * OFFER FILTERS
 * ========================================== */

.offer-filters {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
}

.offer-filter-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.offer-filter-label {
    font-weight: 600;
    color: #495057;
    margin-right: 0.5rem;
}

.offer-filter-select {
    min-width: 200px;
    padding: 0.5rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    transition: all 0.3s ease;
}

.offer-filter-select:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* ==========================================
 * OFFER EMPTY STATES
 * ========================================== */

.offer-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: #fff;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
}

.offer-empty-icon {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 1.5rem;
}

.offer-empty-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 1rem;
}

.offer-empty-text {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

/* ==========================================
 * OFFER NOTIFICATIONS
 * ========================================== */

.offer-notification {
    display: flex;
    align-items: start;
    gap: 1rem;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    border-left: 4px solid #0d6efd;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.offer-notification:hover {
    background: #f8f9fa;
    transform: translateX(4px);
}

.offer-notification-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    flex-shrink: 0;
}

.offer-notification-content {
    flex: 1;
}

.offer-notification-title {
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.25rem;
}

.offer-notification-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.offer-notification-time {
    font-size: 0.75rem;
    color: #adb5bd;
}

/* ==========================================
 * VENDOR INFO CARD
 * ========================================== */

.vendor-info-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    margin-bottom: 1.5rem;
}

.vendor-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.vendor-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.vendor-avatar-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
}

.vendor-details h5 {
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.vendor-details .badge {
    font-size: 0.75rem;
}

.vendor-contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.vendor-contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.vendor-contact-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #0d6efd;
    color: white;
    font-size: 0.875rem;
}

/* ==========================================
 * RESPONSIVE DESIGN
 * ========================================== */

@media (max-width: 992px) {
    .offer-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .offer-stat-item {
        border-bottom: 1px solid rgba(255,255,255,0.2);
        padding-bottom: 1rem;
    }
    
    .offer-stat-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
    
    .offer-action-buttons {
        flex-direction: column;
    }
    
    .offer-action-btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .offer-card {
        padding: 1rem;
    }
    
    .offer-match-percentage {
        position: static;
        display: inline-block;
        margin-bottom: 1rem;
    }
    
    .vendor-header {
        flex-direction: column;
        text-align: center;
    }
    
    .offer-filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .offer-filter-select {
        width: 100%;
    }
}

/* ==========================================
 * ANIMATIONS
 * ========================================== */

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.offer-card,
.offer-property-card {
    animation: slideInUp 0.3s ease forwards;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.offer-notification.new {
    animation: pulse 1s ease 3;
}

/* ==========================================
 * LOADING STATES
 * ========================================== */

.offer-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.offer-skeleton-card {
    height: 300px;
    margin-bottom: 1.5rem;
}

.offer-skeleton-text {
    height: 20px;
    margin-bottom: 0.75rem;
}

.offer-skeleton-text.short {
    width: 60%;
}

/* ==========================================
 * PRINT STYLES
 * ========================================== */

@media print {
    .offer-action-buttons,
    .offer-filters,
    .btn,
    button {
        display: none !important;
    }
    
    .offer-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .offer-match-percentage {
        background: #000 !important;
        color: #fff !important;
    }
}