/* Kontener siatki (Grid) */
.lunaria-file-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    /* Responsywna siatka */
    gap: 25px;
}

/* Pojedynczy kafel z plikiem */
.lunaria-file-item {
    border: 1px solid #e1e1e1;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

/* Efekt po najechaniu myszką */
.lunaria-file-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border-color: #d1d1d1;
}

/* Obrazek (miniatura) */
.lunaria-file-thumb {
    max-width: 100%;
    height: auto;
    margin-bottom: 15px;
    border-radius: 4px;
    object-fit: cover;
}

/* Ikona dla plików niebędących obrazkami (np. PDF) */
.lunaria-file-icon {
    font-size: 48px;
    margin-bottom: 15px;
    line-height: 1;
}

/* Tytuł pliku */
.lunaria-file-title {
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 0.95em;
    line-height: 1.4;
    color: #333;
    word-break: break-word;
    /* Zabezpieczenie przed długimi nazwami */
}

/* Przycisk */
.lunaria-file-button {
    margin-top: auto;
    /* Dopycha przycisk do dołu */
    width: 100%;
    text-align: center;
}


/* =========================================
   STYLIZACJA MENU MOJE KONTO (EZOTERYCZNE)
   ========================================= */

/* Kontener nawigacji - usuwamy domyślne style listy */
.woocommerce-MyAccount-navigation ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 12px; /* Odstęp między przyciskami */
}

/* 1. STYL BAZOWY DLA WSZYSTKICH PRZYCISKÓW MENU */
.woocommerce-MyAccount-navigation-link a {
    display: block;
    padding: 16px 24px;
    background-color: #ffffff;
    color: #4a4a4a; /* Ciemny szary tekst */
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 12px; /* Nowoczesne zaokrąglenia */
    border: 1px solid #f0f0f5; /* Bardzo delikatna ramka */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02); /* Minimalny cień */
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); /* Płynna animacja */
    position: relative;
    overflow: hidden;
}

/* Subtelny pasek po lewej stronie przy hover (akcent) */
.woocommerce-MyAccount-navigation-link a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: #e0e0e0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 2. EFEKT HOVER DLA ZWYKŁYCH PRZYCISKÓW */
.woocommerce-MyAccount-navigation-link a:hover,
.woocommerce-MyAccount-navigation-link.is-active a {
    background-color: #fcfaff; /* Lekko fioletowa biel */
    color: #5e2a84; /* Głęboki fiolet */
    transform: translateX(5px); /* Przesunięcie w prawo */
    box-shadow: 0 8px 15px rgba(94, 42, 132, 0.1); /* Miękka poświata */
    border-color: rgba(155, 89, 182, 0.2);
}

.woocommerce-MyAccount-navigation-link a:hover::before,
.woocommerce-MyAccount-navigation-link.is-active a::before {
    opacity: 1;
    background: #9b59b6; /* Ametystowy akcent */
}

/* 3. SPECJALNY PRZYCISK "OD LUNARII" (MAGICZNY) */
.woocommerce-MyAccount-navigation-link--od-lunarii a {
    /* Kosmiczny gradient: od głębokiego fioletu do magicznego różu */
    background: linear-gradient(135deg, #4b2c68 0%, #8e44ad 50%, #c0392b 100%);
    background-size: 200% 200%; /* Przygotowanie do animacji tła */
    color: #ffffff !important; /* Biały tekst */
    border: none;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 14px;
    
    /* Magiczna poświata pod przyciskiem */
    box-shadow: 0 10px 25px rgba(142, 68, 173, 0.4); 
    
    /* Usunięcie bocznego paska ze standardowych stylów */
    padding-left: 24px; 
}

/* Ukrywamy ten szary pasek boczny dla przycisku Lunarii */
.woocommerce-MyAccount-navigation-link--od-lunarii a::before {
    display: none;
}

/* EFEKT HOVER DLA "OD LUNARII" */
.woocommerce-MyAccount-navigation-link--od-lunarii a:hover {
    transform: scale(1.03) translateY(-2px); /* Lekkie powiększenie i uniesienie */
    box-shadow: 0 15px 35px rgba(142, 68, 173, 0.6); /* Mocniejsza poświata */
    
    /* Przesunięcie gradientu (animacja koloru) */
    background-position: 100% 50%;
    
    /* Dodanie "blasku" tekstu */
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

/* Ikona/Symbol przed tekstem "Od Lunarii" (opcjonalnie - księżyc) */
.woocommerce-MyAccount-navigation-link--od-lunarii a::after {
    content: '🌙';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.5));
    transition: transform 0.4s ease;
}

.woocommerce-MyAccount-navigation-link--od-lunarii a:hover::after {
    transform: translateY(-50%) rotate(-15deg) scale(1.2);
}




/* =========================================
   MODAL / POPUP (Styl Ezoteryczny)
   ========================================= */

/* Tło wygaszające (Overlay) */
.lunaria-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(20, 10, 30, 0.6); /* Ciemny fiolet, półprzezroczysty */
    backdrop-filter: blur(8px); /* Efekt rozmycia tła (szkło) */
    z-index: 9999;
    display: none; /* Domyślnie ukryty */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lunaria-modal-overlay.is-visible {
    display: flex;
    opacity: 1;
}

/* Okno Popupa */
.lunaria-modal-content {
    background: #ffffff;
    width: 90%;
    max-width: 500px;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 50px rgba(94, 42, 132, 0.3); /* Fioletowa poświata */
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(155, 89, 182, 0.2);
}

.lunaria-modal-overlay.is-visible .lunaria-modal-content {
    transform: scale(1);
}

/* Przycisk zamknięcia (X) */
.lunaria-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.lunaria-modal-close:hover {
    color: #5e2a84;
}

/* Tytuł w popupie */
.lunaria-modal-title {
    font-size: 24px;
    color: #4b2c68;
    margin-bottom: 20px;
    font-weight: 700;
}

/* Treść wiadomości */
.lunaria-modal-message {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 30px;
    font-style: italic;
    background: #f9f7fc;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #9b59b6;
}

/* Przycisk pobierania w popupie */
.lunaria-modal-btn {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, #8e44ad 0%, #c0392b 100%);
    color: white !important;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 10px 20px rgba(142, 68, 173, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.lunaria-modal-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(142, 68, 173, 0.6);
}


/* =========================================
   PRZYCISK "ZOBACZ" (STYL MAGICZNY - BEZ KLASY BUTTON)
   ========================================= */

button.lunaria-file-button.open-lunaria-popup {
    /* Reset stylów domyślnych przeglądarki */
    appearance: none;
    -webkit-appearance: none;
    border: none;
    outline: none;
    cursor: pointer; /* Ważne: przywraca "łapkę" */
    font-family: inherit; /* Dziedziczy czcionkę strony */
    line-height: normal;

    /* Tło: Magiczny gradient (fiolet -> ametyst) */
    background: linear-gradient(135deg, #5e2a84 0%, #b05fa7 100%);
    
    /* Tekst */
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    
    /* Kształt */
    border-radius: 50px;
    padding: 12px 30px;
    
    /* Pozycjonowanie i wymiary */
    margin-top: auto;
    display: inline-block;
    width: auto;
    min-width: 120px;
    
    /* Efekty */
    box-shadow: 0 5px 15px rgba(94, 42, 132, 0.25);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

/* Subtelna ramka wewnętrzna (efekt szkła) */
button.lunaria-file-button.open-lunaria-popup::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

/* HOVER - Uniesienie i blask */
button.lunaria-file-button.open-lunaria-popup:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(176, 95, 167, 0.45);
    background: linear-gradient(135deg, #6d3099 0%, #c96cc0 100%);
}

/* ACTIVE - Kliknięcie */
button.lunaria-file-button.open-lunaria-popup:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(94, 42, 132, 0.3);
}

/* Ikonka oka (opcjonalnie) */
button.lunaria-file-button.open-lunaria-popup::after {
    content: '👁'; 
    margin-left: 8px;
    font-size: 1.1em;
    vertical-align: middle;
    opacity: 0.8;
    transition: transform 0.3s;
    display: inline-block;
}

button.lunaria-file-button.open-lunaria-popup:hover::after {
    transform: scale(1.2);
}

