/* Google Consent Mode v2 - Styles */

/* Banner główny */
.gcm-consent-banner {
    position: fixed;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    z-index: 999999;
    animation: slideUp 0.3s ease-in-out;
}

.gcm-consent-banner.gcm-position-bottom {
    bottom: 0;
}

.gcm-consent-banner.gcm-position-top {
    top: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.gcm-consent-banner.gcm-position-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 600px;
    border-radius: 10px;
}

.gcm-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.gcm-banner-text {
    flex: 1;
    min-width: 300px;
}

.gcm-banner-text p {
    margin: 0;
    color: #333333;
    font-size: 14px;
    line-height: 1.5;
}

.gcm-banner-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Przyciski */
.gcm-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.gcm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.gcm-btn-accept {
    background-color: #4CAF50;
    color: white;
}

.gcm-btn-accept:hover {
    background-color: #45a049;
}

.gcm-btn-reject {
    background-color: #f44336;
    color: white;
}

.gcm-btn-reject:hover {
    background-color: #da190b;
}

.gcm-btn-settings {
    background-color: #2196F3;
    color: white;
}

.gcm-btn-settings:hover {
    background-color: #0976d2;
}

/* Modal ustawień */
.gcm-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.gcm-modal-content {
    background-color: #fefefe;
    margin: 50px auto;
    padding: 0;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    border-radius: 10px;
    animation: slideDown 0.3s;
}

.gcm-modal-header {
    padding: 20px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gcm-modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.gcm-close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.gcm-close:hover,
.gcm-close:focus {
    color: #000;
}

.gcm-modal-body {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.gcm-modal-body p {
    color: #666;
    margin-bottom: 20px;
}

.gcm-modal-footer {
    padding: 20px;
    background-color: #f5f5f5;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0 0 10px 10px;
}

.gcm-modal-footer a {
    color: #2196F3;
    text-decoration: none;
}

.gcm-modal-footer a:hover {
    text-decoration: underline;
}

/* Kategorie zgód */
.gcm-consent-category {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.gcm-consent-category:hover {
    background-color: #f0f0f0;
}

.gcm-category-info {
    flex: 1;
    margin-left: 15px;
}

.gcm-category-info h3 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 16px;
}

.gcm-category-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Switch/Toggle */
.gcm-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.gcm-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.gcm-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.gcm-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .gcm-slider {
    background-color: #4CAF50;
}

input:disabled + .gcm-slider {
    background-color: #4CAF50;
    opacity: 0.6;
    cursor: not-allowed;
}

input:checked + .gcm-slider:before {
    transform: translateX(26px);
}

/* Animacje */
@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsywność */
@media (max-width: 768px) {
    .gcm-banner-content {
        flex-direction: column;
        text-align: center;
    }

    .gcm-banner-buttons {
        width: 100%;
        justify-content: center;
    }

    .gcm-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .gcm-modal-content {
        width: 95%;
        margin: 20px auto;
    }

    .gcm-consent-category {
        flex-direction: column;
        text-align: center;
    }

    .gcm-category-info {
        margin-left: 0;
        margin-top: 10px;
    }
}

/* Floating settings button (opcjonalne) */
.gcm-floating-settings {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background-color: #2196F3;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 99999;
    transition: all 0.3s ease;
}

.gcm-floating-settings:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.gcm-floating-settings svg {
    width: 24px;
    height: 24px;
    fill: white;
}

/* Floating Cookie Button */
.gcm-floating-button {
    position: fixed;
    bottom: 20px;
    left: 20px;

    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50px;
    padding: 12px 10px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    z-index: 99998;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideInLeft 0.5s ease-out;
}

.gcm-floating-button:hover {
    transform: translateX(5px) scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.gcm-floating-button:active {
    transform: scale(0.95);
}

.gcm-floating-button svg {
    width: 24px;
    height: 24px;
    color: white;
    flex-shrink: 0;
}

.gcm-floating-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
    margin-left: 8px;
    white-space: nowrap;
    max-width: 0;
    overflow: hidden;
    transition: max-width 0.3s ease-in-out, margin 0.3s ease-in-out;
}

.gcm-floating-button:hover .gcm-floating-text {
    max-width: 100px;
    margin-left: 10px;
}

/* Animacja wejścia floating button */
@keyframes slideInLeft {
    from {
        transform: translateX(-100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Pulsowanie floating button co jakiś czas */
@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(102, 126, 234, 0.8);
    }
    100% {
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    }
}

.gcm-floating-button.pulse {
    animation: pulse 2s infinite;
}

/* Alternatywne style floating button */
.gcm-floating-button.style-minimal {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid #e0e0e0;
}

.gcm-floating-button.style-minimal svg {
    color: #333;
}

.gcm-floating-button.style-minimal .gcm-floating-text {
    color: #333;
}

.gcm-floating-button.style-minimal:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #2196F3;
}

/* Style dla małych ekranów */
@media (max-width: 480px) {
    .gcm-floating-button {
        bottom: 15px;
        left: 15px;
        padding: 10px;
    }

    .gcm-floating-button svg {
        width: 20px;
        height: 20px;
    }

    .gcm-floating-button .gcm-floating-text {
        display: none;
    }
}

/* Dark mode support (opcjonalne) */
@media (prefers-color-scheme: dark) {
    .gcm-consent-banner {
        background: #1a1a1a;
    }

    .gcm-banner-text p {
        color: #e0e0e0;
    }

    .gcm-modal-content {
        background-color: #1a1a1a;
        border-color: #333;
    }

    .gcm-modal-header,
    .gcm-modal-footer {
        background-color: #2a2a2a;
        border-color: #333;
    }

    .gcm-modal-header h2,
    .gcm-category-info h3 {
        color: #e0e0e0;
    }

    .gcm-modal-body p,
    .gcm-category-info p {
        color: #b0b0b0;
    }

    .gcm-consent-category {
        background-color: #2a2a2a;
    }

    .gcm-consent-category:hover {
        background-color: #333;
    }
}
