/* * Horoskop Pomyślności - Styles
 * Ścieżka: wp-content/plugins/horoskop-pomyslnosci/assets/css/horoskop.css
 */

.hp-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.hp-form-container {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.hp-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.hp-form-group {
    display: flex;
    flex-direction: column;
}

.hp-form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a148c;
}

.hp-form-group input {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.hp-form-group input:focus {
    outline: none;
    border-color: #7b1fa2;
}

.hp-submit-btn {
    grid-column: 1 / -1;
    padding: 15px 30px;
    background: linear-gradient(135deg, #7b1fa2 0%, #4a148c 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.hp-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(123, 31, 162, 0.4);
}

.hp-calendar-wrapper {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative; /* Ważne dla pozycjonowania nakładki */
    min-height: 500px;
}

.hp-legend {
    margin-bottom: 30px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 6px;
}

.hp-legend h3 {
    margin-top: 0;
    color: #4a148c;
    margin-bottom: 15px;
}

.hp-legend-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.hp-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.hp-color-box {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    flex-shrink: 0;
}

.hp-color-box.hp-contracts { background: #1976d2; }
.hp-color-box.hp-love { background: #e91e63; }
.hp-color-box.hp-finance { background: #4caf50; }
.hp-color-box.hp-health { background: #ff9800; }
.hp-color-box.hp-creativity { background: #9c27b0; }
.hp-color-box.hp-spiritual { background: #673ab7; }

.hp-calendar h3 {
    text-align: center;
    color: #4a148c;
    margin-bottom: 20px;
}

.hp-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    position: relative; /* Nakładka będzie wewnątrz grida */
}

.hp-day-header {
    text-align: center;
    font-weight: 700;
    padding: 12px;
    background: #7b1fa2;
    color: white;
    border-radius: 6px;
    font-size: 14px;
}

.hp-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    position: relative;
    background: #fff;
    transition: all 0.3s;
    padding: 8px;
}

.hp-day:not(.hp-empty):hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.hp-day-number {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.hp-day-markers {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    justify-content: center;
}

.hp-marker {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* Kolory markerów */
.hp-marker-contracts { background: #1976d2; }
.hp-marker-love { background: #e91e63; }
.hp-marker-finance { background: #4caf50; }
.hp-marker-health { background: #ff9800; }
.hp-marker-creativity { background: #9c27b0; }
.hp-marker-spiritual { background: #673ab7; }

/* Nowy styl dla zablokowanych (szarych) kropek */
.hp-marker-gray {
    background: #e0e0e0;
}

/* --- Style dla nakładki blokującej --- */

.hp-locked-overlay {
    position: absolute;
    top: 50px; /* Przesunięcie w dół, aby nie zasłaniać nagłówków dni tygodnia */
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.65); /* Półprzezroczyste tło */
    backdrop-filter: blur(2px); /* Lekki blur tła pod spodem */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    border-radius: 0 0 8px 8px;
}

.hp-lock-message {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(74, 20, 140, 0.2);
    max-width: 90%;
    width: 400px;
    border: 1px solid #e0e0e0;
}

.hp-lock-message h3 {
    color: #4a148c;
    margin-bottom: 15px;
    font-size: 22px;
}

.hp-lock-message p {
    margin-bottom: 25px;
    color: #555;
    line-height: 1.5;
}

.hp-join-btn {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, #7b1fa2 0%, #4a148c 100%);
    color: white !important;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
}

.hp-join-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(123, 31, 162, 0.4);
}

.hp-admin-unlock-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #fff;
    color: #c92a2a;
    border: 2px solid #c92a2a;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 15px;
}

.hp-admin-unlock-btn:hover {
    background: #c92a2a;
    color: white;
}

@media (max-width: 768px) {
    .hp-calendar-grid { gap: 4px; }
    .hp-day-number { font-size: 14px; }
    .hp-day-header { font-size: 12px; padding: 8px; }
    .hp-marker { width: 6px; height: 6px; }
}

/* --- Nowe style nagłówka i opisu --- */

.hp-header-section {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 10px;
}

.hp-main-title {
    font-family: 'Playfair Display', 'Georgia', serif; /* Elegancka czcionka szeryfowa */
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 2px;
    
    /* Magiczny gradient dla tekstu */
    background: linear-gradient(135deg, #4a148c 0%, #7b1fa2 50%, #ab47bc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: #4a148c; /* Fallback */
    
    position: relative;
    display: inline-block;
}

/* Ozdobna linia pod tytułem */
.hp-main-title::after {
    content: '';
    display: block;
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #7b1fa2, transparent);
    margin: 10px auto 0;
    border-radius: 2px;
}

.hp-intro-box {
    max-width: 800px;
    margin: 0 auto;
    background: linear-gradient(to bottom, #fff, #fbf7fd);
    border: 1px solid #f3e5f5;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(123, 31, 162, 0.05);
    position: relative;
}

/* Ozdobny "magiczny" element z boku (pasek) */
.hp-intro-box::before {
    content: '';
    position: absolute;
    top: 20px;
    bottom: 20px;
    left: 0;
    width: 4px;
    background: linear-gradient(to bottom, #7b1fa2, #ba68c8);
    border-radius: 0 4px 4px 0;
}

.hp-intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 15px;
    font-family: 'Open Sans', sans-serif; /* Czytelna czcionka dla tekstu */
}

.hp-intro-text:last-child {
    margin-bottom: 0;
}

.hp-intro-text strong {
    color: #6a1b9a;
    font-weight: 600;
}

/* Responsywność dla tytułu */
@media (max-width: 768px) {
    .hp-main-title {
        font-size: 2.2rem;
    }
    
    .hp-intro-box {
        padding: 20px;
    }
    
    .hp-intro-text {
        font-size: 1rem;
    }
}

/* --- Poprawki RWD dla Legendy --- */

/* Na mobile legenda jako jedna kolumna */
@media (max-width: 768px) {
    .hp-legend-items {
        grid-template-columns: 1fr;
        /* Jedna kolumna */
        gap: 8px;
    }

    .hp-legend-item {
        font-size: 13px;
        background: #fff;
        padding: 8px;
        border-radius: 4px;
        border: 1px solid #eee;
    }

    /* Naprawa wychodzenia poza kontener */
    .hp-legend {
        padding: 15px;
        overflow: hidden;
        /* Zabezpieczenie */
    }
}

/* --- Style dla Nawigacji Mobilnej Kalendarza --- */

.hp-mobile-nav {
    display: none;
    /* Domyślnie ukryte na desktopie */
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.hp-nav-btn {
    background: #7b1fa2;
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.hp-nav-btn:hover {
    background: #4a148c;
}

.hp-nav-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#hp-current-week-label {
    font-weight: 600;
    color: #4a148c;
    font-size: 14px;
}

/* --- Logika ukrywania tygodni na Mobile --- */
/* Domyślnie etykieta tekstowa dnia jest ukryta (desktop) */
.hp-mobile-day-label {
    display: none;
}

@media (max-width: 768px) {
    /* 1. Resetujemy grida - robimy listę pionową */
    .hp-calendar-grid {
        display: flex;
        flex-direction: column;
        gap: 8px;
        min-height: auto;
    }

    /* 2. Ukrywamy nagłówki tabeli i puste dni (fillery) */
    .hp-day-header, 
    .hp-day.hp-empty {
        display: none !important;
    }

    /* 3. Stylowanie kafelka dnia jako paska */
    .hp-day.hp-week-active {
        display: flex !important; /* Nadpisuje domyślne flex-column z .hp-day */
        flex-direction: row;      /* Układ poziomy wewnątrz paska */
        align-items: center;
        justify-content: space-between; /* Rozrzucamy elementy */
        
        width: 100%;
        aspect-ratio: auto;       /* Wyłączamy kwadratowy kształt */
        min-height: 60px;
        padding: 0 20px;
        margin-bottom: 0;
    }
    
    /* 4. Pokazujemy nazwę dnia tygodnia */
    .hp-mobile-day-label {
        display: block;
        font-weight: 600;
        color: #7b1fa2;
        font-size: 15px;
        width: 110px;       /* Stała szerokość dla wyrównania */
        text-align: left;
    }
    
    /* 5. Numer dnia */
    .hp-day-number {
        font-size: 18px;
        margin-bottom: 0;
        margin-right: auto; /* Pcha kropki maksymalnie w prawo */
        color: #333;
    }
    
    /* 6. Kropki */
    .hp-day-markers {
        display: flex;
        gap: 5px;
    }
    
    .hp-marker {
        width: 10px;
        height: 10px;
    }

    /* Pozostałe poprawki (legenda, nawigacja) z poprzedniego kroku */
    .hp-mobile-nav {
        display: flex;
    }
    
    .hp-legend-items {
        grid-template-columns: 1fr;
    }
    
    /* Ukrywanie dni spoza tygodnia (obsługiwane przez JS) */
    .hp-day:not(.hp-week-active) {
        display: none !important;
    }
}
