/**
 * KA Cookie Manager - Style frontend
 */

/* Banner cookies */
.ka-cookie-banner {
    position: fixed;
    z-index: 999999;
    width: 100%;
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    transition: all 0.3s ease;
}

.ka-cookie-banner.ka-cookie-bottom {
    bottom: 0;
    left: 0;
}

.ka-cookie-banner.ka-cookie-top {
    top: 0;
    left: 0;
}

.ka-cookie-banner.ka-cookie-top-left {
    top: 20px;
    left: 20px;
    width: auto;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.ka-cookie-banner.ka-cookie-top-right {
    top: 20px;
    right: 20px;
    left: auto;
    width: auto;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.ka-cookie-banner.ka-cookie-bottom-left {
    bottom: 20px;
    left: 20px;
    width: auto;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.ka-cookie-banner.ka-cookie-bottom-right {
    bottom: 20px;
    right: 20px;
    left: auto;
    width: auto;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.ka-cookie-banner.ka-cookie-dark {
    background: #2c3e50;
    color: #ecf0f1;
    border-top-color: #34495e;
}

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

.ka-cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.ka-cookie-text {
    flex: 1;
    min-width: 300px;
}

.ka-cookie-text p {
    margin: 0 0 10px 0;
}

.ka-cookie-link {
    color: #3498db;
    text-decoration: none;
    margin-right: 15px;
    font-weight: 500;
}

.ka-cookie-link:hover {
    text-decoration: underline;
}

.ka-cookie-banner.ka-cookie-dark .ka-cookie-link {
    color: #74b9ff;
}

.ka-cookie-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.ka-cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 100px;
}

.ka-cookie-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.ka-cookie-btn.ka-cookie-primary {
    background: #3498db;
    color: white;
}

.ka-cookie-btn.ka-cookie-primary:hover {
    background: #2980b9;
}

.ka-cookie-btn:not(.ka-cookie-primary) {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.ka-cookie-btn:not(.ka-cookie-primary):hover {
    background: #e9ecef;
}

.ka-cookie-banner.ka-cookie-dark .ka-cookie-btn:not(.ka-cookie-primary) {
    background: #34495e;
    color: #ecf0f1;
    border-color: #4a5f7a;
}

.ka-cookie-banner.ka-cookie-dark .ka-cookie-btn:not(.ka-cookie-primary):hover {
    background: #4a5f7a;
}

/* Modal */
.ka-cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ka-cookie-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.ka-cookie-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: ka-cookie-modal-slide-in 0.3s ease;
}

@keyframes ka-cookie-modal-slide-in {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ka-cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
}

.ka-cookie-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
}

.ka-cookie-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.ka-cookie-modal-close:hover {
    background: #f8f9fa;
    color: #495057;
}

.ka-cookie-modal-body {
    padding: 24px;
}

.ka-cookie-modal-body > p {
    margin: 0 0 20px 0;
    color: #6c757d;
    font-size: 14px;
}

.ka-cookie-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ka-cookie-option {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s ease;
}

.ka-cookie-option:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.1);
}

.ka-cookie-option-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.ka-cookie-checkbox {
    position: relative;
    display: inline-block;
    cursor: pointer;
    margin: 0;
}

.ka-cookie-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.ka-cookie-checkmark {
    height: 20px;
    width: 20px;
    background-color: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.ka-cookie-checkbox:hover input ~ .ka-cookie-checkmark {
    border-color: #3498db;
}

.ka-cookie-checkbox input:checked ~ .ka-cookie-checkmark {
    background-color: #3498db;
    border-color: #3498db;
}

.ka-cookie-checkbox input:disabled ~ .ka-cookie-checkmark {
    background-color: #e9ecef;
    border-color: #ced4da;
    cursor: not-allowed;
}

.ka-cookie-checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.ka-cookie-checkbox input:checked ~ .ka-cookie-checkmark:after {
    display: block;
}

.ka-cookie-option-title {
    flex: 1;
}

.ka-cookie-option-title strong {
    display: block;
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 2px;
}

.ka-cookie-required {
    font-size: 12px;
    color: #6c757d;
    font-weight: normal;
}

.ka-cookie-option p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
}

.ka-cookie-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* Strona ustawień */
.ka-cookie-settings-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.ka-cookie-settings-container h1 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 32px;
    font-weight: 600;
}

.ka-cookie-settings-intro {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #3498db;
}

.ka-cookie-current-settings {
    background: #e8f5e8;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #27ae60;
}

.ka-cookie-current-settings h2 {
    color: #27ae60;
    margin-top: 0;
    font-size: 20px;
}

.ka-cookie-current-settings ul {
    margin: 10px 0;
    padding-left: 20px;
}

.ka-cookie-current-settings li {
    margin-bottom: 5px;
}

.ka-cookie-settings-section {
    margin-bottom: 30px;
}

.ka-cookie-settings-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 24px;
}

.ka-cookie-settings-form .ka-cookie-options {
    margin-bottom: 30px;
}

.ka-cookie-settings-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.ka-cookie-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 40px;
}

.ka-cookie-info h2 {
    color: #2c3e50;
    margin-top: 0;
    font-size: 20px;
}

/* Responsywność */
@media (max-width: 768px) {
    .ka-cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .ka-cookie-text {
        min-width: auto;
    }
    
    .ka-cookie-buttons {
        justify-content: center;
    }
    
    .ka-cookie-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .ka-cookie-modal-footer {
        flex-direction: column;
    }
    
    .ka-cookie-modal-footer .ka-cookie-btn {
        width: 100%;
    }
    
    .ka-cookie-settings-actions {
        flex-direction: column;
    }
    
    .ka-cookie-settings-actions .ka-cookie-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .ka-cookie-container {
        padding: 15px;
    }
    
    .ka-cookie-btn {
        padding: 8px 16px;
        font-size: 13px;
        min-width: 80px;
    }
    
    .ka-cookie-modal-header,
    .ka-cookie-modal-body,
    .ka-cookie-modal-footer {
        padding: 15px;
    }
} 