/*
 * Custom stylesheet for PIM Test.
 * Provides light theming in addition to Bootstrap defaults.
 */
body {
    background-color: #f8f9fa; /* light grey background for overall page */
    padding-top: 56px; /* offset content for fixed navigation */
}

h1, h2 {
    margin-top: 1rem; /* consistent spacing for headings */
}

/* Indicator shown next to articles that have a draft awaiting approval */
.pending-draft-badge {
    background-color: #ffc107; /* Bootstrap warning color for visibility */
    color: #212529;
    border-radius: 4px;
    padding: 0 4px;
    font-size: 0.75rem;
    margin-left: 4px;
}

/* Back-to-top button styles */
#backToTop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none; /* hidden until scrolling */
    z-index: 1000;
}

/* Layout helpers for media galleries and media pool cards */
.media-card {
    border: 1px solid #e9ecef;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05);
}

.media-card .media-preview {
    background-color: #f8f9fa;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.media-card .media-preview > a {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.media-card .media-thumb {
    object-fit: contain;
    height: 100% !important;
    width: 100% !important;
    max-height: none !important;
    display: block;
}

.media-card .media-video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
}

.media-card .document-placeholder {
    color: #6c757d;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 1rem;
    text-align: center;
}

.media-priority-ribbon {
    position: absolute;
    top: 14px;
    right: -36px;
    width: 140px;
    padding: 0.3rem 0;
    background: linear-gradient(135deg, #0d6efd, #084298);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-align: center;
    transform: rotate(45deg);
    box-shadow: 0 8px 18px rgba(13, 110, 253, 0.28);
    z-index: 2;
}

.media-priority-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(33, 37, 41, 0.82);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    z-index: 2;
}

.article-search-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    max-width: 640px;
}

.article-number-filter {
    padding: 1rem;
    border: 1px solid #d9e2ec;
    border-radius: 0.5rem;
    background: #f8fbfe;
}

.article-number-filter textarea {
    resize: vertical;
    min-height: 7rem;
}

.article-view-toggle {
    white-space: nowrap;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.article-tile {
    position: relative;
    display: block;
    height: 100%;
    border: 1px solid #d9e2ec;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f6f8fb 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    padding: 1rem;
    color: #1f2933;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.article-export-check {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.7);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    cursor: pointer;
}

.article-export-check .form-check-input {
    margin: 0;
}

.article-tile-has-image {
    overflow: hidden;
}

.article-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.1);
    border-color: #b8c7d9;
    color: #1f2933;
}

.article-tile-media {
    height: 180px;
    margin: -1rem -1rem 1rem;
    background-image:
        linear-gradient(180deg, rgba(16, 42, 67, 0.08) 0%, rgba(16, 42, 67, 0.24) 100%),
        var(--article-tile-image);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    border-bottom: 1px solid #d9e2ec;
}

.article-tile-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.article-tile-kicker {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #7b8794;
    margin-bottom: 0.25rem;
}

.article-tile-title {
    font-size: 1.15rem;
    line-height: 1.2;
    margin: 0;
    color: #102a43;
}

.article-tile-body {
    display: grid;
    gap: 0.85rem;
}

.article-tile-field {
    padding-top: 0.75rem;
    border-top: 1px solid #e6edf5;
}

.article-tile-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #627d98;
    margin-bottom: 0.25rem;
}

.article-tile-value {
    color: #243b53;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

.article-list-table {
    background: #fff;
}

.shopware-export-stat,
.shopware-export-form {
    border: 1px solid #d9e2ec;
    border-radius: 0.5rem;
    background: #fff;
}

.shopware-export-stat {
    padding: 1rem;
}

.shopware-export-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    color: #102a43;
}

.shopware-export-stat-label {
    margin-top: 0.35rem;
    color: #627d98;
}

.shopware-export-form {
    padding: 1rem;
}

@media (max-width: 576px) {
    .article-search-row {
        flex-direction: column;
        align-items: stretch;
    }

    .article-view-toggle {
        width: 100%;
    }
}
