/**
 * Frontend styles for Amondi CMP
 */

/* Banner Container */
.amondi-cmp-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999999;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    border-top: 3px solid #0073aa;
}

.amondi-cmp-banner-hidden {
    display: none !important;
}

.amondi-cmp-banner-visible {
    transform: translateY(0);
    display: block !important;
}

.amondi-cmp-banner-active {
    padding-bottom: 0;
}

/* Banner Content */
.amondi-cmp-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Banner Header */
.amondi-cmp-banner-header {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.amondi-cmp-banner-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

/* Banner Body */
.amondi-cmp-banner-body {
    margin-bottom: 20px;
}

.amondi-cmp-description {
    margin: 0 0 20px 0;
    color: #555;
    line-height: 1.6;
    font-size: 14px;
}

.amondi-cmp-description a {
    color: #0073aa;
    text-decoration: underline;
}

.amondi-cmp-description a:hover {
    color: #005177;
}

.amondi-cmp-privacy-link {
    margin-left: 5px;
    font-weight: 500;
}

/* Categories */
.amondi-cmp-categories {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.amondi-cmp-category {
    padding: 12px;
    background: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

/* Toggle Switch */
.amondi-cmp-toggle {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    gap: 12px;
}

.amondi-cmp-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.amondi-cmp-toggle-slider {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    background-color: #ccc;
    border-radius: 24px;
    transition: background-color 0.3s;
    flex-shrink: 0;
    margin-top: 2px;
}

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

.amondi-cmp-toggle input:checked + .amondi-cmp-toggle-slider {
    background-color: #0073aa;
}

.amondi-cmp-toggle input:checked + .amondi-cmp-toggle-slider:before {
    transform: translateX(20px);
}

.amondi-cmp-toggle input:disabled + .amondi-cmp-toggle-slider {
    background-color: #4caf50;
    cursor: not-allowed;
}

.amondi-cmp-toggle-label {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.amondi-cmp-toggle-label strong {
    display: block;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.amondi-cmp-toggle-description {
    display: block;
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

/* Banner Footer */
.amondi-cmp-banner-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

/* Buttons */
.amondi-cmp-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.amondi-cmp-btn-primary {
    background-color: #0073aa;
    color: #fff;
}

.amondi-cmp-btn-primary:hover {
    background-color: #005177;
}

.amondi-cmp-btn-secondary {
    background-color: #f0f0f0;
    color: #333;
}

.amondi-cmp-btn-secondary:hover {
    background-color: #e0e0e0;
}

/* Responsive */
@media (max-width: 768px) {
    .amondi-cmp-banner-content {
        padding: 15px;
    }

    .amondi-cmp-banner-header h2 {
        font-size: 18px;
    }

    .amondi-cmp-banner-footer {
        flex-direction: column;
    }

    .amondi-cmp-btn {
        width: 100%;
    }

    .amondi-cmp-toggle {
        flex-direction: row;
    }
}

/* Overlay (optional, for modal style) */
body.amondi-cmp-banner-active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

/* Accessibility */
.amondi-cmp-banner:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.amondi-cmp-btn:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Floating Icon */
.amondi-cmp-floating-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #0073aa;
    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: 999998;
    transition: all 0.3s ease;
    color: #fff;
}

.amondi-cmp-floating-icon:hover {
    background-color: #005177;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.amondi-cmp-floating-icon:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.amondi-cmp-floating-icon svg {
    width: 24px;
    height: 24px;
}

/* Print styles */
@media print {
    .amondi-cmp-banner,
    .amondi-cmp-floating-icon {
        display: none;
    }
}
