/* ==========================================================================
   Karta Moda - Gothic Up (Style dla frontendu oraz edytora blokowego)
   ========================================================================== */

:root,
.editor-styles-wrapper {
    --bg-secondary: #131720;
    --text-main: #a0a7ab;
    --link-color: #dd163b;
    --accent-color: #d10000;
    --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Lato', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Główny kontener widżetu */
.widget-card-mod-widget {
    display: flex;
    flex-wrap: wrap;
    background: var(--bg-secondary, #131720);
    border-radius: 12px;
    padding: 16px;
    margin: 2.2em 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
    align-items: center;
    gap: 20px;
    box-sizing: border-box;
    text-align: left;
    font-family: var(--font-body, 'Lato', sans-serif);
}

.widget-card-mod-widget * {
    box-sizing: border-box;
}

/* Miniaturka */
.widget-card-mod-thumb-wrapper {
    flex-shrink: 0;
    width: 150px;
}

.widget-card-mod-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.widget-card-mod-no-img {
    width: 150px;
    height: 100px;
    background: #1b202c;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 12px;
}

/* Treść karty */
.widget-card-mod-content {
    flex-grow: 1;
    min-width: 200px;
}

.widget-card-mod-title {
    margin: 0 0 10px 0 !important;
    font-size: 20px !important;
    color: #ffffff !important;
    font-family: var(--font-heading, 'Montserrat', sans-serif) !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-transform: uppercase;
}

.widget-card-mod-meta {
    font-size: 14px;
    color: var(--text-main, #a0a7ab);
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    line-height: 1.5;
}

.widget-card-mod-meta strong {
    color: #ffffff;
    font-weight: 700;
}

/* Przyciski akcji */
.widget-card-mod-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* Przycisk: Przejdź do bazy modów */
.widget-card-mod-btn {
    background-color: #912035;
    color: #ffffff !important;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none !important;
    font-weight: bold;
    transition: background-color 0.2s ease;
    height: 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    text-transform: uppercase;
    font-size: 0.85rem;
    line-height: 1;
    border: none;
    cursor: pointer;
}

.widget-card-mod-btn:hover {
    background-color: #dd163b;
    color: #ffffff !important;
}

.widget-card-mod-btn .bmgup-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    color: #ffffff;
    flex-shrink: 0;
}

.widget-card-mod-btn .bmgup-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    display: block;
}

/* Kontener przycisku pobierania i dropdownu */
.bmgup-download-wrapper {
    position: relative;
    display: inline-block;
}

/* Główny przycisk Download */
.bmgup-main-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    cursor: pointer;
    background-color: var(--link-color, #dd163b);
    color: #ffffff !important;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.2s ease;
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    height: 45px;
    font-size: 0.85rem;
    text-transform: uppercase;
    line-height: 1;
}

.bmgup-main-btn:hover {
    background-color: #b80f2f;
}

.bmgup-main-btn .bmgup-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    color: #ffffff;
    flex-shrink: 0;
}

.bmgup-main-btn .bmgup-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    display: block;
}

/* Wysuwana lista opcji pobierania */
.bmgup-download-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin: 8px 0 0 !important;
    padding: 0 !important;
    list-style: none !important;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 260px;
    z-index: 1000;
    overflow: hidden;
}

/* Otwieranie listy (klasa aktywności lub hover w edytorze) */
.bmgup-download-list.bmgup-is-active,
.bmgup-toggle-btn[aria-expanded="true"] + .bmgup-download-list,
.bmgup-download-wrapper:hover .bmgup-download-list,
.bmgup-download-wrapper:focus-within .bmgup-download-list {
    display: block;
}

.bmgup-download-list li {
    margin: 0 !important;
    padding: 0 !important;
    list-style-type: none !important;
}

.bmgup-download-list a.bmgup-btn {
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 10px 16px;
    text-decoration: none !important;
    color: #334155 !important;
    background: transparent;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    transition: background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.bmgup-download-list li:last-child a.bmgup-btn {
    border-bottom: none;
}

.bmgup-download-list a.bmgup-btn:hover {
    background-color: #f8fafc;
    color: #0f172a !important;
}

.bmgup-download-list .bmgup-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #64748b;
}

.bmgup-download-list .bmgup-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
    display: block;
}

/* Responsywność dla ekranów mobilnych */
@media (max-width: 600px) {
    .widget-card-mod-widget {
        flex-direction: column;
        text-align: center;
    }
    .widget-card-mod-thumb-wrapper {
        width: 100%;
        max-width: 250px;
        margin: 0 auto;
    }
    .widget-card-mod-actions {
        justify-content: center;
    }
}
