/**
 * Daft Property Feed Styles
 */

/* Main Container */
.daft-property-feed {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* List Layout */
.daft-feed-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Grid Layout */
.daft-feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* Property Card */
.daft-property-card {
    background: #ffffff;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.daft-property-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.daft-feed-list .daft-property-card {
    display: flex;
    flex-direction: row;
}

.daft-feed-grid .daft-property-card {
    display: flex;
    flex-direction: column;
}

/* Property Image */
.daft-property-image {
    position: relative;
    overflow: hidden;
    background-color: #f6f8fa;
}

.daft-feed-list .daft-property-image {
    flex: 0 0 300px;
    max-width: 300px;
}

.daft-feed-grid .daft-property-image {
    width: 100%;
    aspect-ratio: 4/3;
}

.daft-property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.daft-property-card:hover .daft-property-image img {
    transform: scale(1.05);
}

.daft-property-image a {
    display: block;
    width: 100%;
    height: 100%;
}

/* BER Rating Badge */
.daft-property-ber {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
}

.ber-rating {
    display: inline-block;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
}

/* Property Content */
.daft-property-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Property Title */
.daft-property-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.daft-property-title a {
    color: #24292e;
    text-decoration: none;
    transition: color 0.2s ease;
}

.daft-property-title a:hover {
    color: #0366d6;
}

/* Property Price */
.daft-property-price {
    font-size: 22px;
    font-weight: 700;
    color: #2ea44f;
    margin-bottom: 16px;
}

/* Property Details */
.daft-property-details {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e1e4e8;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #586069;
    font-weight: 500;
}

.detail-item svg {
    color: #6a737d;
}

/* Property Agent */
.daft-property-agent {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6a737d;
    margin-bottom: 16px;
}

.daft-property-agent svg {
    flex-shrink: 0;
}

/* Property Actions */
.daft-property-actions {
    margin-top: auto;
}

.daft-view-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0366d6;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s ease;
    text-align: center;
}

.daft-view-button:hover {
    background-color: #0256c4;
    color: #ffffff;
}

/* Feed Footer */
.daft-feed-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e1e4e8;
    text-align: center;
}

.daft-feed-count {
    font-size: 14px;
    color: #586069;
    margin: 0;
}

/* Notice Message */
.daft-feed-notice {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 16px;
    color: #856404;
    font-size: 14px;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .daft-feed-list .daft-property-card {
        flex-direction: column;
    }

    .daft-feed-list .daft-property-image {
        flex: 0 0 auto;
        max-width: 100%;
        aspect-ratio: 4/3;
    }

    .daft-feed-grid {
        grid-template-columns: 1fr;
    }

    .daft-property-title {
        font-size: 16px;
    }

    .daft-property-price {
        font-size: 18px;
    }

    .daft-property-details {
        gap: 12px;
    }

    .detail-item {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .daft-property-content {
        padding: 16px;
    }

    .daft-property-details {
        flex-direction: column;
        gap: 8px;
    }

    .daft-view-button {
        display: block;
        width: 100%;
    }
}

/* Loading State */
.daft-feed-loading {
    text-align: center;
    padding: 40px;
    color: #586069;
}

.daft-feed-loading::after {
    content: "...";
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: ".";
    }
    40% {
        content: "..";
    }
    60%, 100% {
        content: "...";
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .daft-property-card {
        background: #1e1e1e;
        border-color: #333;
    }

    .daft-property-title a {
        color: #e6e6e6;
    }

    .daft-property-title a:hover {
        color: #58a6ff;
    }

    .daft-property-details {
        border-bottom-color: #333;
    }

    .detail-item {
        color: #8b949e;
    }

    .daft-property-agent {
        color: #8b949e;
    }

    .daft-feed-footer {
        border-top-color: #333;
    }

    .daft-feed-count {
        color: #8b949e;
    }
}
