/**
 * Arkodach - Cookie Consent System
 * Minimalistyczny Web3 Style + EU Compliance
 */

/* ======================
   COOKIE BANNER - Kafelek
   ====================== */
#cookie-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    color: #2d2d2d;
    padding: 1.5rem;
    border: 2px solid #1e3a8a;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    max-width: 380px;
    width: calc(100vw - 40px);
    transform: translateY(150%);
    transition: transform 0.3s ease;
}

#cookie-banner.show {
    transform: translateY(0);
}

@media (max-width: 640px) {
    #cookie-banner {
        bottom: 0;
        right: 0;
        left: 0;
        max-width: 100%;
        width: 100%;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
    }
}

#cookie-banner .cookie-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

#cookie-banner .cookie-icon {
    width: 24px;
    height: 24px;
    color: #1e3a8a;
}

#cookie-banner .cookie-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e3a8a;
    margin: 0;
}

#cookie-banner .cookie-text {
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    color: #6b7280;
}

#cookie-banner .cookie-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

#cookie-banner button {
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    width: 100%;
    text-align: center;
}

#cookie-banner .btn-accept {
    background: #1e3a8a;
    color: white;
    border-color: #1e3a8a;
}

#cookie-banner .btn-accept:hover {
    background: #1e40af;
    border-color: #1e40af;
}

#cookie-banner .btn-settings {
    background: transparent;
    border-color: #1e3a8a;
    color: #1e3a8a;
}

#cookie-banner .btn-settings:hover {
    background: #f0f4ff;
}

#cookie-banner .btn-reject {
    background: transparent;
    color: #6b7280;
    border-color: #e5e7eb;
}

#cookie-banner .btn-reject:hover {
    background: #f9fafb;
    color: #2d2d2d;
}

/* ======================
   COOKIE MODAL - Minimalistyczny
   ====================== */
#cookie-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

#cookie-modal.show {
    display: flex !important;
}

#cookie-modal .modal-content {
    background: white;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    border: 2px solid #1e3a8a;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

#cookie-modal .modal-header {
    padding: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
}

#cookie-modal .modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: #1e3a8a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#cookie-modal .header-icon {
    width: 24px;
    height: 24px;
}

#cookie-modal .modal-close {
    background: transparent;
    border: 2px solid #e5e7eb;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

#cookie-modal .modal-close:hover {
    background: #f9fafb;
    border-color: #1e3a8a;
    color: #1e3a8a;
}

#cookie-modal .modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(90vh - 200px);
}

#cookie-modal .modal-intro {
    margin-bottom: 1.5rem;
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Tab Navigation */
#cookie-modal .tab-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
}

#cookie-modal .tab-btn {
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    color: #6b7280;
    transition: all 0.2s;
    margin-bottom: -2px;
}

#cookie-modal .tab-btn:hover {
    color: #1e3a8a;
}

#cookie-modal .tab-btn.active {
    color: #1e3a8a;
    border-bottom-color: #1e3a8a;
}

#cookie-modal .tab-content {
    display: none;
}

#cookie-modal .tab-content.active {
    display: block;
}

/* Category */
#cookie-modal .cookie-category {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    background: white;
}

#cookie-modal .cookie-category:last-child {
    margin-bottom: 0;
}

#cookie-modal .category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

#cookie-modal .category-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #2d2d2d;
    margin: 0;
}

#cookie-modal .category-description {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

#cookie-modal .category-required {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Cookie Details Table */
.cookie-details-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    margin-top: 1rem;
}

.cookie-details-table th,
.cookie-details-table td {
    padding: 0.75rem;
    text-align: left;
    border: 1px solid #e5e7eb;
}

.cookie-details-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #2d2d2d;
}

.cookie-details-table td {
    color: #6b7280;
}

/* Toggle Switch - Minimalistyczny */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb;
    transition: 0.2s;
    border: 2px solid #d1d5db;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.2s;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #1e3a8a;
    border-color: #1e3a8a;
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(24px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Footer */
#cookie-modal .modal-footer {
    padding: 1.5rem;
    border-top: 2px solid #e5e7eb;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    background: white;
}

@media (max-width: 640px) {
    #cookie-modal .modal-footer {
        grid-template-columns: 1fr;
    }
}

#cookie-modal .modal-footer button {
    padding: 0.875rem 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

#cookie-modal .btn-reject-all {
    background: transparent;
    color: #dc2626;
    border-color: #dc2626;
}

#cookie-modal .btn-reject-all:hover {
    background: #fef2f2;
}

#cookie-modal .btn-accept-all {
    background: transparent;
    color: #16a34a;
    border-color: #16a34a;
}

#cookie-modal .btn-accept-all:hover {
    background: #f0fdf4;
}

#cookie-modal .btn-save {
    background: #1e3a8a;
    color: white;
    border-color: #1e3a8a;
}

#cookie-modal .btn-save:hover {
    background: #1e40af;
    border-color: #1e40af;
}

body.modal-open {
    overflow: hidden;
}
