/**
 * Public Styles - Customer Management Plugin
 */

/* Ogólne style */
.cmp-profil-container,
.cmp-tablica-container,
.cmp-kalendarz-container,
.cmp-baza-wiedzy-container,
.cmp-rejestracja-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Komunikaty */
.cmp-message {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.cmp-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.cmp-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.cmp-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Formularze */
.cmp-form-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
}

.cmp-form-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    color: #333;
    border-bottom: 2px solid #2271b1;
    padding-bottom: 10px;
}

.cmp-form-group {
    margin-bottom: 20px;
}

.cmp-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.cmp-input,
.cmp-textarea,
.cmp-select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.cmp-input:focus,
.cmp-textarea:focus,
.cmp-select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.cmp-textarea {
    resize: vertical;
    min-height: 100px;
}

.cmp-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.cmp-form-description,
.cmp-help-text {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    display: block;
}

.cmp-checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
}

.cmp-checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Przyciski */
.cmp-button {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.cmp-button-primary {
    background: #2271b1;
    color: #fff;
}

.cmp-button-primary:hover {
    background: #135e96;
    color: #fff;
}

.cmp-button-secondary {
    background: #f0f0f1;
    color: #2c3338;
}

.cmp-button-secondary:hover {
    background: #dcdcde;
}

.cmp-button-large {
    padding: 12px 30px;
    font-size: 16px;
}

.cmp-button-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    transition: transform 0.2s;
}

.cmp-button-icon:hover {
    transform: scale(1.2);
}

.cmp-form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

/* Profil */
.cmp-profil-avatar {
    text-align: center;
    margin-bottom: 30px;
}

.cmp-profil-avatar img {
    border-radius: 50%;
    border: 4px solid #2271b1;
}

.cmp-profil-info {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.cmp-info-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
}

.cmp-info-list li {
    padding: 8px 0;
    border-bottom: 1px solid #ddd;
}

.cmp-info-list li:last-child {
    border-bottom: none;
}

/* Tablica */
.cmp-tablica-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cmp-tablica-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.cmp-board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.cmp-board-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    transition: box-shadow 0.3s;
}

.cmp-board-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.cmp-board-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.cmp-priority-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.cmp-priority-low {
    background: #d1ecf1;
    color: #0c5460;
}

.cmp-priority-normal {
    background: #d4edda;
    color: #155724;
}

.cmp-priority-high {
    background: #fff3cd;
    color: #856404;
}

.cmp-priority-urgent {
    background: #f8d7da;
    color: #721c24;
}

.cmp-board-item-title {
    font-size: 18px;
    margin: 0 0 10px;
}

.cmp-board-item-content {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.cmp-board-item-date {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

.cmp-board-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.cmp-board-item-actions {
    display: flex;
    gap: 5px;
}

/* Kalendarz */
.cmp-kalendarz-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.cmp-calendar-view {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    min-height: 400px;
}

.cmp-events-list {
    margin-top: 30px;
}

.cmp-events-grid {
    display: grid;
    gap: 15px;
}

.cmp-event-item {
    display: flex;
    gap: 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    transition: box-shadow 0.3s;
}

.cmp-event-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cmp-event-date {
    text-align: center;
    min-width: 60px;
}

.cmp-event-day {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #2271b1;
}

.cmp-event-month {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: #666;
}

.cmp-event-details {
    flex: 1;
}

.cmp-event-details h4 {
    margin: 0 0 5px;
    font-size: 16px;
}

.cmp-event-time {
    font-size: 13px;
    color: #666;
    margin: 5px 0;
}

.cmp-event-description {
    font-size: 14px;
    color: #666;
    margin: 10px 0;
}

.cmp-event-type-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    background: #f0f0f1;
    color: #2c3338;
}

.cmp-kalendarz-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.cmp-tab-button {
    padding: 10px 20px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.cmp-tab-button.active {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.cmp-tab-content {
    display: none;
}

.cmp-tab-content.active {
    display: block;
}

.cmp-events-date-group {
    margin-bottom: 30px;
}

.cmp-events-date-header {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2271b1;
}

.cmp-event-time-badge {
    display: inline-block;
    padding: 5px 12px;
    background: #2271b1;
    color: #fff;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.cmp-event-content {
    flex: 1;
}

.cmp-event-meta {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.cmp-event-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Baza wiedzy */
.cmp-baza-wiedzy-header {
    text-align: center;
    margin-bottom: 30px;
}

.cmp-subtitle {
    color: #666;
    font-size: 16px;
}

.cmp-search-bar {
    margin-bottom: 30px;
}

.cmp-search-form {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.cmp-search-input {
    flex: 1;
}

.cmp-baza-wiedzy-content {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
}

.cmp-baza-wiedzy-sidebar {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    height: fit-content;
}

.cmp-categories-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.cmp-categories-list li {
    margin-bottom: 8px;
}

.cmp-categories-list a {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    transition: background 0.3s;
}

.cmp-categories-list a:hover,
.cmp-categories-list a.active {
    background: #f0f0f1;
    color: #2271b1;
}

.cmp-count {
    color: #666;
    font-size: 12px;
}

.cmp-popular-articles {
    margin-top: 30px;
}

.cmp-popular-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.cmp-popular-list li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.cmp-popular-list li:last-child {
    border-bottom: none;
}

.cmp-popular-list a {
    text-decoration: none;
    color: #2271b1;
    font-weight: 500;
}

.cmp-views {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.cmp-baza-wiedzy-main {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
}

.cmp-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.cmp-article-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    transition: box-shadow 0.3s;
}

.cmp-article-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.cmp-category-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #2271b1;
    color: #fff;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 10px;
}

.cmp-article-card h3 {
    margin: 10px 0;
}

.cmp-article-card h3 a {
    text-decoration: none;
    color: #333;
}

.cmp-article-card h3 a:hover {
    color: #2271b1;
}

.cmp-article-excerpt {
    color: #666;
    font-size: 14px;
    margin: 10px 0;
}

.cmp-article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #666;
}

.cmp-article-single {
    max-width: 800px;
}

.cmp-back-link {
    display: inline-block;
    margin-bottom: 20px;
    text-decoration: none;
    color: #2271b1;
}

.cmp-article-header h1 {
    margin: 10px 0 20px;
}

.cmp-article-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.cmp-article-content {
    line-height: 1.8;
    color: #333;
}

.cmp-article-tags {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.cmp-tag {
    display: inline-block;
    padding: 5px 12px;
    background: #f0f0f1;
    border-radius: 12px;
    font-size: 12px;
    margin-right: 8px;
    margin-top: 8px;
}

.cmp-article-feedback {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    text-align: center;
}

/* Rejestracja */
.cmp-rejestracja-header {
    text-align: center;
    margin-bottom: 30px;
}

.cmp-form-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

/* Modal */
.cmp-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.cmp-modal-content {
    background: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    max-width: 600px;
    position: relative;
}

.cmp-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #666;
}

.cmp-modal-close:hover {
    color: #000;
}

/* Empty state */
.cmp-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

/* Responsywność */
@media (max-width: 768px) {
    .cmp-form-row {
        grid-template-columns: 1fr;
    }
    
    .cmp-board-grid {
        grid-template-columns: 1fr;
    }
    
    .cmp-baza-wiedzy-content {
        grid-template-columns: 1fr;
    }
    
    .cmp-baza-wiedzy-sidebar {
        order: 2;
    }
    
    .cmp-articles-grid {
        grid-template-columns: 1fr;
    }
    
    .cmp-tablica-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .cmp-event-item {
        flex-direction: column;
    }
}

/* ============================================
   NAWIGACJA
   ============================================ */

.cmp-navigation {
    background: linear-gradient(135deg, #2271b1 0%, #1a5a8a 100%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    margin-bottom: 30px;
}

.cmp-navigation-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
}

.cmp-navigation-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}

.cmp-brand-icon {
    font-size: 24px;
}

.cmp-brand-text {
    display: none;
}

.cmp-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.cmp-mobile-toggle span {
    width: 25px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s;
}

.cmp-mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.cmp-mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.cmp-mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.cmp-navigation-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
    align-items: center;
}

.cmp-nav-item {
    position: relative;
}

.cmp-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
}

.cmp-nav-link:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.cmp-nav-link.active {
    background: rgba(255,255,255,0.2);
    color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cmp-nav-icon {
    font-size: 18px;
    line-height: 1;
}

.cmp-nav-text {
    white-space: nowrap;
}

.cmp-nav-divider {
    width: 1px;
    height: 30px;
    background: rgba(255,255,255,0.2);
    margin: 0 10px;
}

/* Menu użytkownika */
.cmp-nav-user {
    position: relative;
}

.cmp-user-menu {
    position: relative;
}

.cmp-user-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 25px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.cmp-user-toggle:hover {
    background: rgba(255,255,255,0.2);
}

.cmp-user-toggle img {
    border-radius: 50%;
    width: 32px;
    height: 32px;
}

.cmp-user-name {
    font-size: 14px;
    font-weight: 500;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cmp-dropdown-arrow {
    font-size: 10px;
    transition: transform 0.3s;
}

.cmp-user-toggle.active .cmp-dropdown-arrow {
    transform: rotate(180deg);
}

.cmp-user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 220px;
    list-style: none;
    margin: 0;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1001;
}

.cmp-user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cmp-user-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: -2px -2px 4px rgba(0,0,0,0.05);
}

.cmp-user-dropdown li {
    margin: 0;
}

.cmp-user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
    font-size: 14px;
}

.cmp-user-dropdown a:hover {
    background: #f5f5f5;
}

.cmp-dropdown-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.cmp-dropdown-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 8px 0;
}

.cmp-nav-login {
    background: rgba(255,255,255,0.2);
    font-weight: 600;
}

.cmp-nav-login:hover {
    background: rgba(255,255,255,0.3);
}

/* Responsywność */
@media (min-width: 769px) {
    .cmp-brand-text {
        display: inline;
    }
}

@media (max-width: 768px) {
    .cmp-mobile-toggle {
        display: flex;
    }
    
    .cmp-navigation-menu {
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: #2271b1;
        flex-direction: column;
        gap: 0;
        padding: 10px 0;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: all 0.3s;
    }
    
    .cmp-navigation-menu.active {
        max-height: 500px;
        opacity: 1;
    }
    
    .cmp-nav-item {
        width: 100%;
    }
    
    .cmp-nav-link {
        width: 100%;
        padding: 12px 20px;
        border-radius: 0;
    }
    
    .cmp-nav-divider {
        width: 100%;
        height: 1px;
        margin: 8px 0;
    }
    
    .cmp-nav-user {
        width: 100%;
    }
    
    .cmp-user-toggle {
        width: calc(100% - 40px);
        margin: 0 20px;
        justify-content: center;
    }
    
    .cmp-user-dropdown {
        position: static;
        box-shadow: none;
        background: rgba(0,0,0,0.1);
        margin: 10px 20px;
        border-radius: 6px;
    }
    
    .cmp-user-dropdown::before {
        display: none;
    }
    
    .cmp-user-dropdown a {
        color: #fff;
    }
    
    .cmp-user-dropdown a:hover {
        background: rgba(255,255,255,0.1);
    }
    
    .cmp-dropdown-divider {
        background: rgba(255,255,255,0.2);
    }
}

/* Animacje */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cmp-navigation-menu.active {
    animation: slideDown 0.3s ease-out;
}
