/* Layout Card Styles */
.layout-card {
    border-radius: 0.5rem;
    overflow: hidden;
}

.layout-image-container {
    position: relative;
}

.layout-image-wrapper {
    position: relative;
    overflow: hidden;
    max-height: 600px;
}

.layout-image {
    width: 100%;
    height: auto;
    display: block;
}

.favorite-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.layout-badges .badge {
    font-size: 0.85rem;
}

.layout-description {
    font-size: 1rem;
    line-height: 1.6;
}

.rating-stars .btn {
    padding: 0.25rem 0.5rem;
}

/* Social Share Buttons */
.social-share-buttons .btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-facebook {
    background-color: #3b5998;
    color: white;
}

.btn-twitter {
    background-color: #1da1f2;
    color: white;
}

.btn-reddit {
    background-color: #ff4500;
    color: white;
}

.btn-pinterest {
    background-color: #bd081c;
    color: white;
}

.btn-whatsapp {
    background-color: #25d366;
    color: white;
}

.btn-clipboard {
    background-color: #6c757d;
    color: white;
}

.social-share-buttons .btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Comments Section */
.comment-avatar {
    border: 2px solid #f8f9fa;
}

.comment-text {
    font-size: 0.95rem;
    line-height: 1.5;
}

.comment-date {
    font-size: 0.8rem;
}

.comment-divider {
    margin: 1rem 0;
    opacity: 0.1;
}

/* Similar Layouts */
.similar-layouts-card {
    border-radius: 0.5rem;
}

.similar-layout-card {
    transition: transform 0.2s;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.similar-layout-card:hover {
    transform: translateY(-3px);
}

.similar-layout-image {
    object-fit: cover;
    height: 100%;
    max-height: 120px;
}

.similar-layout-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

/* Layout Image Modal Styles */
.layout-modal-image-container {
    background-color: #f8f9fa;
    padding: 1rem;
}

.layout-modal-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

/* Mobile Optimizations */
@media (max-width: 767.98px) {
    .layout-card .card-title {
        font-size: 1.3rem;
    }

    .layout-badges {
        display: flex;
        flex-wrap: wrap;
        gap: 0.3rem;
    }

    .layout-badges .badge {
        font-size: 0.75rem;
    }

    .layout-actions .row {
        margin-bottom: 1rem;
    }

    .rating-section {
        justify-content: center !important;
    }

    .social-share-section h6 {
        text-align: center;
        margin-bottom: 1rem;
        width: 100%;
    }

    .social-share-buttons {
        justify-content: center;
        width: 100%;
    }

    .similar-layout-card .card-body {
        padding: 0.75rem;
    }

    .similar-layouts-card {
        position: static !important;
    }

    .comment-form textarea {
        min-height: 100px;
    }
}

/* Toast Notification for Copy Link */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1050;
}

.toast {
    background-color: rgba(33, 37, 41, 0.9);
    color: white;
}

/* Layout Link Button */
.layout-url-btn {
    white-space: normal;
    word-break: break-word;
    text-align: left;
    padding: 0.5rem 1rem;
}

.layout-url-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Loading indicator for comments */
.comments-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Layout List Pages (Town Hall & Builder Hall) */
.layout-filter-form label {
    font-weight: 500;
    font-size: 0.9rem;
}

.active-filters {
    margin-bottom: 1.5rem;
}

.active-filters .badge {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
}

.active-filters .badge a {
    text-decoration: none;
}

.layout-list-card {
    transition: all 0.2s ease-in-out;
    border-radius: 0.5rem;
    overflow: hidden;
}

.layout-list-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.layout-list-card .layout-image-wrapper {
    position: relative;
    overflow: hidden;
    max-height: 200px;
}

.layout-list-card .card-img-top {
    transition: transform 0.3s ease;
    object-fit: cover;
    width: 100%;
    height: 200px;
}

.layout-list-card:hover .card-img-top {
    transform: scale(1.05);
}

.layout-list-card .card-title {
    font-size: 1.15rem;
    line-height: 1.3;
    max-height: 3rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.layout-list-card .card-title a {
    color: #343a40;
}

.layout-list-card .card-title a:hover {
    color: #0d6efd;
}

/* Pagination */
.pagination {
    gap: 0.25rem;
}

.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.pagination .page-link {
    color: #0d6efd;
    border-radius: 0.25rem;
}

.pagination .page-link:hover {
    background-color: #e9ecef;
}

/* Mobile Optimizations for Layout Lists */
@media (max-width: 767.98px) {
    .layout-list-card .card-img-top {
        height: 180px;
    }

    .layout-list-card .card-title {
        font-size: 1rem;
    }

    .layout-list-card .card-body {
        padding: 1rem;
    }

    .layout-filter-form button {
        margin-top: 0.5rem;
    }

    .active-filters {
        justify-content: center;
        text-align: center;
    }

    .active-filters .badge {
        margin-bottom: 0.5rem;
    }
}

/* Dark Mode için Yorum Kartları Düzenlemeleri */
[data-bs-theme="dark"] .comment {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    padding: 1rem;
}

[data-bs-theme="dark"] .comment .text-muted {
    color: #adb5bd !important;
}

/* Görüntülenme ve rating badgeleri */
.view-badge,
.rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.view-badge .bi-eye-fill,
.rating-badge .bi-star-fill {
    font-size: 0.9rem;
    margin-right: 2px;
}

/* Dark mode için görüntülenme ve rating badgeleri stillerini düzelt */
.view-badge {
    background-color: #0dcaf0 !important;
    /* Bootstrap info rengi */
    color: #fff !important;
}

.view-badge .bi-eye-fill {
    color: #fff !important;
}

[data-bs-theme="dark"] .view-badge {
    background-color: #0dcaf0 !important;
    /* Aynı rengi koruyorum */
    color: #ffffff !important;
}

[data-bs-theme="dark"] .view-badge .bi-eye-fill {
    color: #ffffff !important;
}

/* Dark mode için görüntülenme ve rating badgeleri stillerini düzelt */
[data-bs-theme="dark"] .rating-badge {
    background-color: #ffc107 !important;
    /* Sarı rengi koru */
    color: #212529 !important;
    /* Koyu metin rengi koru */
}

[data-bs-theme="dark"] .rating-badge .bi-star-fill {
    color: #212529 !important;
    /* Yıldız ikonunu koyu renkte tut */
}

[data-bs-theme="dark"] .layout-badges .badge.bg-light {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="dark"] .layout-badges .badge.bg-light .bi-eye,
[data-bs-theme="dark"] .layout-badges .badge.text-dark {
    color: #fff !important;
}

[data-bs-theme="dark"] hr {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Liste sayfaları için görüntüleme ve derecelendirme stileri */
.view-count,
.rating-count {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
}

.view-count .bi,
.rating-count .bi {
    font-size: 1rem;
}

/* Dark mode için liste sayfalarındaki iconlar */
.view-count .bi-eye-fill {
    color: #0dcaf0;
}

[data-bs-theme="dark"] .view-count {
    color: #ffffff;
}

[data-bs-theme="dark"] .view-count .bi-eye-fill {
    color: #0dcaf0 !important;
}

[data-bs-theme="dark"] .rating-count .bi-star-fill {
    color: #ffc107 !important;
    /* Yıldız ikonu sarı kalsın */
}

/* Google Login Button */
.btn-google {
    background-color: #fff;
    color: #444;
    border: 1px solid #ddd;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-google:hover {
    background-color: #f8f8f8;
    color: #222;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.btn-google img {
    width: 20px;
    height: 20px;
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: #adb5bd;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #dee2e6;
}

.auth-divider:not(:empty)::before {
    margin-right: .5rem;
}

.auth-divider:not(:empty)::after {
    margin-left: .5rem;
}

[data-bs-theme="dark"] .btn-google {
    background-color: #2d3238;
    color: #e9ecef;
    border-color: #454d55;
}

[data-bs-theme="dark"] .btn-google:hover {
    background-color: #3e444a;
    border-color: #5a6268;
}

[data-bs-theme="dark"] .auth-divider::before,
[data-bs-theme="dark"] .auth-divider::after {
    border-color: #454d55;
}