/* Kontener główny */
.rr-frontend-container {
    max-width: 100%;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Box wyszukiwania */
.rr-search-box {
    margin-bottom: 20px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: flex-end;
}

#rr-search {
    flex: 1;
    min-width: 200px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
    line-height: 1.4;
    box-sizing: border-box;
}

#rr-search:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 3px rgba(0,115,170,0.2);
}

.rr-button {
    padding: 6px 12px;
    background: #0073aa;
    color: #fff;
    border: 1px solid transparent;
    border-radius: 3px;
    font-size: 13px;
    line-height: 1.4;
    cursor: pointer;
    transition: background 0.3s;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.rr-button:hover {
    background: #005177;
}

.rr-button-secondary {
    background: #6c757d;
}

.rr-button-secondary:hover {
    background: #5a6268;
}

/* Róża */
.rr-roza-frontend {
    margin-bottom: 30px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.rr-roza-title {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
}

.rr-roza-title-left {
    flex: 1;
}

.rr-roza-title-right {
    text-align: right;
}

.rr-roza-title h2 {
    margin: 0 0 3px 0;
    font-size: inherit;
    font-weight: 600;
    line-height: 1.2;
}

.rr-roza-count {
    margin: 0;
    font-size: 12px;
    color: #666;
}

.rr-roza-year {
    font-size: 11px;
    color: #999;
    margin: 0;
    line-height: 1.2;
    padding-top: 2px;
}

/* Kalendarz */
.rr-calendar-wrapper {
    overflow-x: auto;
    padding: 15px;
}

.rr-calendar-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.rr-calendar-table th {
    background: #f0f0f0;
    padding: 8px 5px;
    text-align: center;
    border: 1px solid #ddd;
    font-weight: 600;
}

.rr-th-uczestnik {
    text-align: left !important;
    width: 150px;
    min-width: 150px;
    max-width: 150px;
}

.rr-th-miesiac {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    padding: 8px 3px;
}

.rr-current-month {
    background: #ffeb3b !important;
    font-weight: bold;
    box-shadow: inset 0 0 0 2px #ff9800;
}

.rr-calendar-table td {
    padding: 5px;
    border: 1px solid #ddd;
}

.rr-td-uczestnik {
    font-weight: 500;
    padding: 8px;
    width: 150px;
    min-width: 150px;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rr-td-tajemnica {
    text-align: center;
    cursor: help;
    transition: transform 0.2s;
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    padding: 3px;
}

.rr-td-tajemnica:hover {
    transform: scale(1.1);
    z-index: 10;
    position: relative;
}

.rr-tajemnica-symbol {
    font-size: 24px;
    display: inline-block;
}

.rr-tajemnica-icon {
    width: 35px;
    height: 35px;
    display: block;
    margin: 0 auto;
}

/* Legenda */
.rr-legend {
    padding: 10px 15px;
    background: #f9f9f9;
    border-top: 1px solid #ddd;
}

.rr-legend h4 {
    margin: 0 0 8px 0;
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

.rr-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rr-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    background: #fff;
    border-radius: 3px;
    border: 1px solid #ddd;
}

.rr-legend-symbol {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border-radius: 2px;
    border: 1px solid #ddd;
}

.rr-legend-name {
    font-size: 11px;
    font-weight: 500;
}

/* Brak wyników */
.rr-no-results {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 18px;
}

/* Box dotacji na frontendzie */
.rr-donation-frontend {
    margin-top: 40px;
    padding: 20px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
    border-radius: 8px;
    text-align: center;
}

.rr-donation-frontend p {
    margin: 0 0 15px 0;
    color: #856404;
    font-size: 16px;
}

.rr-button-donate {
    background: #ffc107 !important;
    color: #000 !important;
    font-weight: 600;
}

.rr-button-donate:hover {
    background: #e0a800 !important;
}

/* Responsywność */
@media (max-width: 768px) {
    .rr-frontend-container {
        padding: 10px;
    }
    
    .rr-search-box {
        flex-direction: column;
    }
    
    #rr-search {
        width: 100%;
    }
    
    .rr-roza-title h2 {
        font-size: 20px;
    }
    
    .rr-calendar-wrapper {
        padding: 10px;
    }
    
    .rr-calendar-table {
        font-size: 12px;
    }
    
    .rr-calendar-table th,
    .rr-calendar-table td {
        padding: 6px 4px;
    }
    
    .rr-tajemnica-symbol {
        font-size: 18px;
    }
    
    .rr-th-uczestnik {
        min-width: 100px;
    }
    
    .rr-th-miesiac {
        min-width: 40px;
    }
    
    .rr-legend {
        padding: 10px;
    }
    
    .rr-legend-items {
        gap: 8px;
    }
    
    .rr-legend-item {
        padding: 5px 8px;
    }
    
    .rr-legend-symbol {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
    
    .rr-legend-name {
        font-size: 12px;
    }
}

/* Drukowanie */
@media print {
    .rr-search-box,
    .rr-donation-frontend {
        display: none;
    }
    
    .rr-calendar-table {
        border: 2px solid #000;
    }
    
    .rr-td-tajemnica {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}