/**
 * Property Badges Stylesheet
 * Frontend styles for displaying badges on property images
 */

/* Wrapper for thumbnail with badge */
.property-thumbnail-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    overflow: hidden;
}

/* Base badge styles */
.property-badge {
    position: absolute;
    display: inline-block;
    padding: 8px 20px;
    background-color: #D4915E;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border-radius: 0;
    letter-spacing: 0.5px;
    line-height: 1.4;
    white-space: nowrap;
}

/* Position variants */
.property-badge-top-left {
    top: 0;
    left: 0;
}

.property-badge-top-right {
    top: 0;
    right: 0;
}

.property-badge-top-center {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.property-badge-bottom-left {
    bottom: 0;
    left: 0;
}

.property-badge-bottom-right {
    bottom: 0;
    right: 0;
}

/* Hover effects */
.property-thumbnail-wrapper:hover .property-badge {
    opacity: 0.95;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .property-badge {
        font-size: 12px;
        padding: 6px 15px;
    }
}

@media (max-width: 480px) {
    .property-badge {
        font-size: 11px;
        padding: 5px 12px;
    }
}

/* Optional: Add animation on page load */
@keyframes badgeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.property-badge-top-left,
.property-badge-top-right,
.property-badge-top-center {
    animation: badgeSlideIn 0.4s ease-out;
}

@keyframes badgeSlideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.property-badge-bottom-left,
.property-badge-bottom-right {
    animation: badgeSlideUp 0.4s ease-out;
}

/* Fix for top-center position with animation */
.property-badge-top-center {
    animation: badgeSlideIn 0.4s ease-out;
}

/* Ensure images scale properly */
.property-thumbnail-wrapper img {
    display: block;
    width: 100%;
    height: auto;
}

/* Alternative ribbon style (optional) */
.property-badge.ribbon-style {
    padding: 8px 25px 8px 15px;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
}

.property-badge.ribbon-style-left {
    padding: 8px 15px 8px 25px;
    clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%);
}

/* Corner fold effect (optional) */
.property-badge.corner-fold::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

.property-badge-top-right.corner-fold::after {
    right: 0;
    top: 100%;
    border-width: 8px 8px 0 0;
    border-color: rgba(0, 0, 0, 0.2) transparent transparent transparent;
}

.property-badge-top-left.corner-fold::after {
    left: 0;
    top: 100%;
    border-width: 8px 0 0 8px;
    border-color: rgba(0, 0, 0, 0.2) transparent transparent transparent;
}

/* Support for Elementor and page builders */
.elementor-widget-container .property-thumbnail-wrapper,
.et_pb_module .property-thumbnail-wrapper,
.vc_column_container .property-thumbnail-wrapper {
    position: relative;
}
