/**
 * ATLAS Mobile Property Details CSS - Phase 3 Day 3
 * Full-screen property details modal styles
 * 
 * @author Tunahan Bağcacıer
 * @version 1.0.0
 */

/* Mobile Property Details Modal */
.mobile-property-details {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: white;
    z-index: var(--z-modal);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mobile-property-details.atlas-active {
    transform: translateX(0);
}

/* Header */
.mobile-property-details .property-details-header {
    position: sticky;
    top: 0;
    background: white;
    padding: var(--space-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    z-index: 1;
}

.mobile-property-details .details-back {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: var(--text-lg);
    min-width: var(--touch-target);
    height: var(--touch-target);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.mobile-property-details .details-back:hover {
    background: var(--background-secondary);
}

.mobile-property-details .details-actions {
    display: flex;
    gap: var(--space-sm);
}

.mobile-property-details :is(.details-share, .details-favorite) {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: var(--text-lg);
    min-width: var(--touch-target);
    height: var(--touch-target);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.mobile-property-details .details-favorite.favorited {
    color: var(--primary-color);
}

.mobile-property-details :is(.details-share, .details-favorite):hover {
    background: var(--background-secondary);
}

/* Content */
.mobile-property-details .property-details-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Hero Section */
.mobile-property-details .property-hero-section {
    position: relative;
}

.mobile-property-details .property-image-gallery {
    position: relative;
    height: 250px;
    background: var(--background-secondary);
}

.mobile-property-details .gallery-main-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.mobile-property-details .gallery-main-image {
    position: relative;
    width: 100%;
    height: 100%;
}

.mobile-property-details .gallery-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    transform-origin: center center;
}

.mobile-property-details .image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), transparent 30%, transparent 70%, rgba(0,0,0,0.3));
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: var(--space-md);
    pointer-events: none;
}

.mobile-property-details .image-counter {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: var(--text-sm);
    font-weight: 600;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    backdrop-filter: blur(8px);
}

.mobile-property-details .zoom-toggle {
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    border-radius: 50%;
    min-width: var(--touch-target);
    height: var(--touch-target);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    pointer-events: all;
    transition: background 0.2s ease;
}

.mobile-property-details .zoom-toggle:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Gallery Navigation */
.mobile-property-details .gallery-navigation {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 var(--space-md);
    pointer-events: none;
}

.mobile-property-details :is(.gallery-prev, .gallery-next) {
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    border-radius: 50%;
    min-width: var(--touch-target);
    height: var(--touch-target);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    pointer-events: all;
    transition: background 0.2s ease;
}

.mobile-property-details :is(.gallery-prev, .gallery-next):hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Thumbnails */
.mobile-property-details .gallery-thumbnails {
    padding: var(--space-md);
    border-bottom: 1px solid var(--border-color);
}

.mobile-property-details .thumbnails-scroll {
    display: flex;
    gap: var(--space-sm);
    overflow-x: auto;
    padding: var(--space-xs) 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.mobile-property-details .thumbnails-scroll::-webkit-scrollbar {
    display: none;
}

.mobile-property-details .thumbnail-item {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid transparent;
    background: transparent;
    padding: 0;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.mobile-property-details .thumbnail-item.active {
    border-color: var(--primary-color);
}

.mobile-property-details .thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Price Section */
.mobile-property-details .property-price-section {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: var(--space-lg) var(--space-md) var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.mobile-property-details .property-price {
    font-size: var(--text-xl);
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.mobile-property-details .property-type-badge {
    background: var(--primary-color);
    color: white;
    font-size: var(--text-sm);
    font-weight: 600;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
}

/* Info Section */
.mobile-property-details .property-info-section {
    padding: var(--space-lg) var(--space-md);
}

.mobile-property-details .property-title-section {
    margin-bottom: var(--space-lg);
}

.mobile-property-details .property-title {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    line-height: 1.3;
}

.mobile-property-details .property-location {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-secondary);
    font-size: var(--text-md);
}

.mobile-property-details .property-location i {
    color: var(--primary-color);
    font-size: var(--text-sm);
}

/* Features Grid */
.mobile-property-details .property-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    padding: var(--space-lg);
    background: var(--background-secondary);
    border-radius: var(--radius-lg);
}

.mobile-property-details .feature-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.mobile-property-details .feature-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color-light);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-md);
}

.mobile-property-details .feature-content {
    flex: 1;
}

.mobile-property-details .feature-value {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
    display: block;
}

.mobile-property-details .feature-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    display: block;
}

/* Description Section */
.mobile-property-details .property-description {
    margin-bottom: var(--space-xl);
}

.mobile-property-details .property-description h3 {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.mobile-property-details .description-content {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.mobile-property-details .description-toggle {
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    transition: color 0.2s ease;
}

.mobile-property-details .description-toggle:hover {
    color: var(--primary-color-dark);
}

.mobile-property-details .description-toggle i {
    transition: transform 0.3s ease;
}

/* Amenities Section */
.mobile-property-details .property-amenities {
    margin-bottom: var(--space-xl);
}

.mobile-property-details .property-amenities h3 {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.mobile-property-details .amenities-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

.mobile-property-details .amenity-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: var(--background-secondary);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
}

.mobile-property-details .amenity-item i {
    color: var(--success-color);
    font-size: var(--text-xs);
}

/* Location Section */
.mobile-property-details .property-location-section {
    margin-bottom: var(--space-xl);
}

.mobile-property-details .property-location-section h3 {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.mobile-property-details .location-address {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}

.mobile-property-details .location-address i {
    color: var(--primary-color);
}

.mobile-property-details .location-map-placeholder {
    height: 150px;
    background: var(--background-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.mobile-property-details .map-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    color: var(--text-secondary);
    text-align: center;
}

.mobile-property-details .map-placeholder i {
    font-size: 2rem;
    opacity: 0.5;
}

/* Agent Section */
.mobile-property-details .property-agent-section {
    margin-bottom: var(--space-xl);
}

.mobile-property-details .property-agent-section h3 {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.mobile-property-details .agent-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--background-secondary);
    border-radius: var(--radius-lg);
}

.mobile-property-details .agent-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--primary-color-light);
}

.mobile-property-details .agent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-property-details .agent-info {
    flex: 1;
}

.mobile-property-details .agent-name {
    font-size: var(--text-md);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.mobile-property-details .agent-title {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.mobile-property-details .agent-rating {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.mobile-property-details .rating-stars {
    color: #fbbf24;
    font-size: var(--text-sm);
}

.mobile-property-details .rating-text {
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.mobile-property-details .agent-actions {
    display: flex;
    gap: var(--space-sm);
}

.mobile-property-details :is(.agent-call, .agent-message) {
    background: var(--primary-color);
    border: none;
    color: white;
    border-radius: 50%;
    min-width: var(--touch-target);
    height: var(--touch-target);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.mobile-property-details :is(.agent-call, .agent-message):hover {
    background: var(--primary-color-dark);
}

/* Footer */
.mobile-property-details .property-details-footer {
    position: sticky;
    bottom: 0;
    background: white;
    border-top: 1px solid var(--border-color);
    padding: var(--space-md);
    z-index: 1;
}

.mobile-property-details .footer-actions {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-md);
}

.mobile-property-details :is(.action-favorite, .action-contact) {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    min-height: var(--touch-target);
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.mobile-property-details .action-favorite {
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-primary);
}

.mobile-property-details .action-favorite.favorited {
    background: var(--primary-color-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.mobile-property-details .action-contact {
    background: var(--primary-color);
    color: white;
    border: none;
}

.mobile-property-details .action-contact:hover {
    background: var(--primary-color-dark);
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .mobile-property-details .property-features-grid {
        grid-template-columns: 1fr;
    }
    
    .mobile-property-details .amenities-grid {
        grid-template-columns: 1fr;
    }
    
    .mobile-property-details .footer-actions {
        grid-template-columns: 1fr;
    }
    
    .mobile-property-details .action-favorite {
        order: 2;
    }
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .mobile-property-details,
    .mobile-property-details .gallery-main-image img,
    .mobile-property-details .description-toggle i {
        transition: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .mobile-property-details .property-details-header {
        border-bottom: 2px solid var(--text-primary);
    }
    
    .mobile-property-details .feature-icon {
        border: 2px solid var(--primary-color);
    }
    
    .mobile-property-details .agent-card {
        border: 1px solid var(--border-color);
    }
}

/* Focus styles */
.mobile-property-details :is(
    .details-back,
    .details-share,
    .details-favorite,
    .zoom-toggle,
    .gallery-prev,
    .gallery-next,
    .thumbnail-item,
    .description-toggle,
    .agent-call,
    .agent-message,
    .action-favorite,
    .action-contact
):focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
