/**
 * BME Property Comparison Styles
 * Version: 1.0.0
 */

/* Floating Comparison Widget */
.bme-comparison-widget {
    position: fixed;
    z-index: 9999;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 300px;
    max-width: 400px;
    transition: all 0.3s ease;
}

.bme-comparison-widget.bottom-right {
    bottom: 20px;
    right: 20px;
}

.bme-comparison-widget.bottom-left {
    bottom: 20px;
    left: 20px;
}

.bme-comparison-widget.top-right {
    top: 20px;
    right: 20px;
}

.bme-comparison-widget.top-left {
    top: 20px;
    left: 20px;
}

.bme-comparison-widget.collapsed {
    min-height: auto;
}

.bme-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #0073aa;
    color: white;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
}

.bme-widget-title {
    font-weight: 600;
    font-size: 14px;
}

.bme-widget-count {
    font-size: 12px;
    opacity: 0.9;
}

.bme-widget-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    transition: background-color 0.3s ease;
}

.bme-widget-toggle:hover {
    background: rgba(255,255,255,0.1);
}

.bme-widget-content {
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.bme-widget-properties {
    margin-bottom: 15px;
}

.bme-widget-property {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.bme-widget-property:last-child {
    border-bottom: none;
}

.bme-widget-property img {
    width: 50px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    background: #f5f5f5;
}

.bme-widget-property-info {
    flex: 1;
    min-width: 0;
}

.bme-widget-price {
    font-weight: 600;
    color: #0073aa;
    font-size: 14px;
}

.bme-widget-address {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bme-widget-remove {
    background: #dc3232;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.bme-widget-remove:hover {
    background: #a02424;
    transform: scale(1.1);
}

.bme-widget-actions {
    display: flex;
    gap: 8px;
}

.bme-widget-actions .bme-btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 12px;
    text-align: center;
}

.bme-widget-empty {
    text-align: center;
    color: #666;
    font-style: italic;
    margin: 10px 0;
}

/* Main Comparison Container */
.bme-comparison-container {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.bme-comparison-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e5e5;
}

.bme-comparison-header h3 {
    margin: 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.bme-no-comparison {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.bme-no-comparison h3 {
    color: #333;
    margin-bottom: 20px;
}

.bme-no-comparison p {
    margin-bottom: 15px;
    font-size: 16px;
}

.bme-no-comparison a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
}

.bme-no-comparison a:hover {
    text-decoration: underline;
}

/* Comparison Table */
.bme-comparison-table-wrapper {
    overflow-x: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.bme-comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.bme-comparison-table th,
.bme-comparison-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}

.bme-comparison-table th {
    background: #f8f9fa;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.bme-comparison-feature {
    background: #f8f9fa;
    min-width: 150px;
    font-weight: 600;
    position: sticky;
    left: 0;
    z-index: 11;
    border-right: 1px solid #e5e5e5;
}

.bme-comparison-property {
    min-width: 250px;
    max-width: 300px;
}

.bme-property-header {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bme-property-image {
    width: 100%;
    height: 120px;
    overflow: hidden;
    border-radius: 6px;
    background: #f5f5f5;
}

.bme-property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bme-property-info {
    text-align: center;
}

.bme-property-price {
    font-size: 18px;
    font-weight: 700;
    color: #0073aa;
    margin-bottom: 5px;
}

.bme-property-address {
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.3;
}

.bme-property-mls {
    font-size: 12px;
    color: #666;
}

.bme-remove-property {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220, 50, 50, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
}

.bme-property-header:hover .bme-remove-property {
    opacity: 1;
}

.bme-remove-property:hover {
    background: #dc3232;
    transform: scale(1.1);
}

.bme-feature-label {
    background: #f9f9f9;
    font-weight: 600;
    color: #333;
    position: sticky;
    left: 0;
    z-index: 2;
    border-right: 1px solid #e5e5e5;
}

.bme-feature-value {
    color: #555;
    font-size: 14px;
}

/* Compare Button States */
.bme-compare-btn {
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bme-compare-btn:hover {
    background: white;
    transform: scale(1.1);
}

.bme-compare-btn.active {
    background: #46b450;
    color: white;
}

.bme-compare-btn.active:hover {
    background: #3e9b47;
}

/* Notification */
.bme-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    padding: 12px 20px;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    display: none;
}

.bme-notification.success {
    background: #46b450;
}

.bme-notification.error {
    background: #dc3232;
}

/* Buttons */
.bme-btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
}

.bme-btn-primary {
    background: #0073aa;
    color: white;
}

.bme-btn-primary:hover {
    background: #005a87;
    color: white;
}

.bme-btn-secondary {
    background: #f7f7f7;
    color: #333;
    border: 1px solid #ddd;
}

.bme-btn-secondary:hover {
    background: #e5e5e5;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .bme-comparison-widget {
        min-width: 250px;
        max-width: 300px;
    }
    
    .bme-comparison-table th,
    .bme-comparison-table td {
        padding: 10px;
    }
    
    .bme-comparison-property {
        min-width: 200px;
        max-width: 250px;
    }
}

@media (max-width: 768px) {
    .bme-comparison-widget {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        min-width: auto;
    }
    
    .bme-comparison-widget.bottom-left,
    .bme-comparison-widget.top-left,
    .bme-comparison-widget.top-right {
        left: 10px;
        right: 10px;
    }
    
    .bme-comparison-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
        text-align: center;
    }
    
    .bme-comparison-table-wrapper {
        border-radius: 0;
        margin: 0 -20px;
    }
    
    .bme-comparison-container {
        padding: 15px;
        margin: 15px 0;
        border-radius: 0;
    }
    
    .bme-feature-label {
        position: static;
        font-size: 13px;
    }
    
    .bme-comparison-property {
        min-width: 180px;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .bme-widget-actions {
        flex-direction: column;
    }
    
    .bme-property-image {
        height: 100px;
    }
    
    .bme-comparison-table th,
    .bme-comparison-table td {
        padding: 8px;
        font-size: 12px;
    }
    
    .bme-comparison-property {
        min-width: 150px;
        max-width: 180px;
    }
    
    .bme-property-price {
        font-size: 16px;
    }
    
    .bme-property-address {
        font-size: 13px;
    }
}

/* Print Styles */
@media print {
    .bme-comparison-widget,
    .bme-remove-property,
    .bme-widget-remove,
    #bme-print-comparison {
        display: none !important;
    }
    
    .bme-comparison-table {
        font-size: 12px;
    }
    
    .bme-comparison-table th,
    .bme-comparison-table td {
        padding: 6px;
        border: 1px solid #000;
    }
    
    .bme-property-image {
        height: 80px;
    }
}