/**
 * Scapparee User Posts Grid Styles
 */

.scapparee-user-posts-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.scapparee-posts-header {
    margin-bottom: 2rem;
}

.scapparee-posts-title {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem;
}

.scapparee-posts-count {
    color: #6b7280;
    font-size: 1rem;
    margin: 0;
}

.scapparee-no-posts {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
    font-size: 1.125rem;
}

/* Grid Layout */
.scapparee-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 640px) {
    .scapparee-posts-grid {
        grid-template-columns: 1fr;
    }
}

/* Post Card */
.scapparee-post-card {
    background: #ffffff;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.scapparee-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.scapparee-post-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.scapparee-post-card__image {
    position: relative;
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #f3f4f6;
}

.scapparee-post-card__date-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.375rem 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.scapparee-post-card__image--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.scapparee-post-card__image--placeholder svg {
    width: 64px;
    height: 64px;
    color: rgba(255, 255, 255, 0.8);
}

.scapparee-post-card__status {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    backdrop-filter: blur(8px);
}

.scapparee-post-card__status.status-draft {
    background: rgba(59, 130, 246, 0.9);
    color: #ffffff;
}

.scapparee-post-card__status.status-private {
    background: rgba(107, 114, 128, 0.9);
    color: #ffffff;
}

.scapparee-post-card__status.status-published {
    background: rgba(34, 197, 94, 0.9);
    color: #ffffff;
}

.scapparee-post-card__content {
    padding: 1.25rem;
}

.scapparee-post-card__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.scapparee-post-card__destination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4b5563;
    font-size: 0.875rem;
    margin: 0 0 0.75rem;
}

.scapparee-post-card__destination svg {
    flex-shrink: 0;
    color: #9ca3af;
}

.scapparee-post-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.scapparee-post-card__days,
.scapparee-post-card__cost {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.scapparee-post-card__days svg,
.scapparee-post-card__cost svg {
    flex-shrink: 0;
    color: #9ca3af;
}

.scapparee-post-card__summary {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card Actions (PDF Download Button) */
.scapparee-post-card__actions {
    padding: 0 1.25rem 1.25rem;
    margin-top: -0.5rem;
}

.scapparee-post-card__pdf-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: #232323;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.scapparee-post-card__pdf-button:hover {
    background: #585858;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.scapparee-post-card__pdf-button:active {
    transform: translateY(0);
}

.scapparee-post-card__pdf-button svg {
    flex-shrink: 0;
}

/* Pagination */
.scapparee-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem 0;
}

@media (max-width: 640px) {
    .scapparee-pagination {
        flex-direction: column;
    }
}

.scapparee-pagination__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.scapparee-pagination__link:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #111827;
}

.scapparee-pagination__link svg {
    width: 20px;
    height: 20px;
}

.scapparee-pagination__info {
    color: #6b7280;
    font-size: 0.875rem;
}

.scapparee-pagination__info strong {
    color: #111827;
}

/* Favorite Post Styles */
.post-favorite-post {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #ffffff;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    transition: box-shadow 0.2s, transform 0.2s;
}

.post-favorite-post:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.post-favorite-image {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 0.375rem;
    overflow: hidden;
}

.post-favorite-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-favorite-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-favorite-body h4 {
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
}

.post-favorite-body h4 a {
    color: #111827;
    text-decoration: none;
    transition: color 0.2s;
}

.post-favorite-body h4 a:hover {
    color: #232323;
}

.post-favorite-body p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #6b7280;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 640px) {
    .post-favorite-post {
        flex-direction: column;
    }

    .post-favorite-image {
        width: 100%;
        height: 200px;
    }
}

/* Table Styles for WordPress Posts */
.scapparee-user-posts-grid table,
.type-post table,
.single-post table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.875rem;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 0.5rem;
    overflow: hidden;
}

.scapparee-user-posts-grid table th,
.type-post table th,
.single-post table th {
    background-color: #f9fafb;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
    font-size: 0.875rem;
    color: #374151;
}

.scapparee-user-posts-grid table td,
.type-post table td,
.single-post table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
    line-height: 1.5;
}

.scapparee-user-posts-grid table tbody tr:hover,
.type-post table tbody tr:hover,
.single-post table tbody tr:hover {
    background-color: #fafafa;
}

.scapparee-user-posts-grid table tr:last-child td,
.type-post table tr:last-child td,
.single-post table tr:last-child td {
    border-bottom: none;
}

/* Table Images */
.scapparee-user-posts-grid .place-table-image,
.type-post .place-table-image,
.single-post .place-table-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 0.5rem;
    display: block;
}

.scapparee-user-posts-grid .place-image-placeholder,
.type-post .place-image-placeholder,
.single-post .place-image-placeholder {
    width: 80px;
    height: 80px;
    background: #f3f4f6;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

/* Table Cell Styles */
.scapparee-user-posts-grid .place-table-name,
.type-post .place-table-name,
.single-post .place-table-name {
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
    margin-bottom: 0.25rem;
}

.scapparee-user-posts-grid .place-table-address,
.type-post .place-table-address,
.single-post .place-table-address {
    color: #6b7280;
    font-size: 0.8125rem;
    line-height: 1.3;
}

.scapparee-user-posts-grid .place-table-price,
.type-post .place-table-price,
.single-post .place-table-price {
    text-align: center;
    white-space: nowrap;
    font-weight: 600;
    color: #374151;
}

.scapparee-user-posts-grid .place-table-contact,
.type-post .place-table-contact,
.single-post .place-table-contact {
    text-align: center;
}

.scapparee-user-posts-grid .place-table-contact a,
.type-post .place-table-contact a,
.single-post .place-table-contact a {
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.8125rem;
    transition: color 0.2s;
}

.scapparee-user-posts-grid .place-table-contact a:hover,
.type-post .place-table-contact a:hover,
.single-post .place-table-contact a:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* Responsive Tables */
@media (max-width: 768px) {
    .scapparee-user-posts-grid table,
    .type-post table,
    .single-post table {
        font-size: 0.8125rem;
    }

    .scapparee-user-posts-grid table th,
    .type-post table th,
    .single-post table th,
    .scapparee-user-posts-grid table td,
    .type-post table td,
    .single-post table td {
        padding: 0.625rem 0.75rem;
    }

    .scapparee-user-posts-grid .place-table-image,
    .type-post .place-table-image,
    .single-post .place-table-image,
    .scapparee-user-posts-grid .place-image-placeholder,
    .type-post .place-image-placeholder,
    .single-post .place-image-placeholder {
        width: 60px;
        height: 60px;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .scapparee-user-posts-grid {
        color: #f9fafb;
    }

    .scapparee-posts-title {
        color: #f9fafb;
    }

    /* Table Dark Mode */
    .scapparee-user-posts-grid table,
    .type-post table,
    .single-post table {
        background: #1f2937;
        border-color: #374151;
    }

    .scapparee-user-posts-grid table th,
    .type-post table th,
    .single-post table th {
        background-color: #111827;
        border-bottom-color: #374151;
        color: #d1d5db;
    }

    .scapparee-user-posts-grid table td,
    .type-post table td,
    .single-post table td {
        border-bottom-color: #374151;
    }

    .scapparee-user-posts-grid table tbody tr:hover,
    .type-post table tbody tr:hover,
    .single-post table tbody tr:hover {
        background-color: #374151;
    }

    .scapparee-user-posts-grid .place-table-name,
    .type-post .place-table-name,
    .single-post .place-table-name {
        color: #f9fafb;
    }

    .scapparee-user-posts-grid .place-table-address,
    .type-post .place-table-address,
    .single-post .place-table-address {
        color: #9ca3af;
    }

    .scapparee-user-posts-grid .place-table-price,
    .type-post .place-table-price,
    .single-post .place-table-price {
        color: #d1d5db;
    }

    .scapparee-user-posts-grid .place-image-placeholder,
    .type-post .place-image-placeholder,
    .single-post .place-image-placeholder {
        background: #374151;
    }

    .scapparee-posts-count,
    .scapparee-no-posts {
        color: #9ca3af;
    }

    .scapparee-post-card {
        background: #1f2937;
        box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
    }

    .scapparee-post-card__title {
        color: #f9fafb;
    }

    .scapparee-post-card__destination,
    .scapparee-post-card__days,
    .scapparee-post-card__cost {
        color: #d1d5db;
    }

    .scapparee-post-card__meta {
        border-bottom-color: #374151;
    }

    .scapparee-post-card__date {
        color: #9ca3af;
    }

    .scapparee-post-card__summary {
        color: #9ca3af;
    }

    .scapparee-post-card__pdf-button {
        background: #232323;
    }

    .scapparee-post-card__pdf-button:hover {
        background: #585858;
    }

    .scapparee-pagination__link {
        background: #1f2937;
        border-color: #374151;
        color: #d1d5db;
    }

    .scapparee-pagination__link:hover {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }

    .scapparee-pagination__info {
        color: #9ca3af;
    }

    .scapparee-pagination__info strong {
        color: #f9fafb;
    }

    .post-favorite-post {
        background: #1f2937;
        border-color: #374151;
    }

    .post-favorite-body h4 a {
        color: #f9fafb;
    }

    .post-favorite-body h4 a:hover {
        color: #d1d5db;
    }

    .post-favorite-body p {
        color: #9ca3af;
    }
}
