/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

/* Header */
.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.privacy-badge {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 10px 20px;
    display: inline-block;
    backdrop-filter: blur(10px);
}

/* Main Content */
.content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.card h2 {
    color: #667eea;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Data Collection */
.data-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.data-item:last-child {
    border-bottom: none;
}

.data-label {
    font-weight: 600;
    color: #555;
}

.data-value {
    color: #333;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

/* Privacy Score */
.privacy-score {
    text-align: center;
    margin: 20px 0;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: white;
}

.score-good { background: #27ae60; }
.score-fair { background: #f39c12; }
.score-poor { background: #e74c3c; }

/* Buttons */
.btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    margin: 5px;
    transition: all 0.3s ease;
}

.btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.btn-export {
    background: #27ae60;
}

.btn-export:hover {
    background: #229954;
}

/* Educational Content */
.education {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-top: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.tip {
    background: #e8f5e8;
    border-left: 4px solid #27ae60;
    padding: 15px;
    margin: 15px 0;
    border-radius: 0 8px 8px 0;
}

.warning {
    background: #fef2e7;
    border-left: 4px solid #e67e22;
    padding: 15px;
    margin: 15px 0;
    border-radius: 0 8px 8px 0;
}

.danger {
    background: #fee;
    border-left: 4px solid #e74c3c;
    padding: 15px;
    margin: 15px 0;
    border-radius: 0 8px 8px 0;
}

/* Loading */
.loading {
    text-align: center;
    padding: 20px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .content {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 2rem;
    }
}

/* Status indicators */
.status-good { color: #27ae60; }
.status-warning { color: #f39c12; }
.status-danger { color: #e74c3c; }

/* New framework status classes */
.status-collected {
    border-left: 4px solid #e74c3c;
    background: #fef5f5;
    padding-left: 8px;
}

.status-protected {
    border-left: 4px solid #27ae60;
    background: #f0fdf4;
    padding-left: 8px;
}

.status-skipped {
    border-left: 4px solid #3b82f6;
    background: #f0f9ff;
    padding-left: 8px;
}

/* Data section styling */
.data-section {
    margin: 20px 0;
}

.section-title {
    color: #374151;
    margin-bottom: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 8px;
}

.section-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Collection summary stats */
.summary-stats {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    flex: 1;
    min-width: 80px;
}

.stat-collected {
    background: #fef5f5;
    border: 2px solid #e74c3c;
}

.stat-protected {
    background: #f0fdf4;
    border: 2px solid #27ae60;
}

.stat-skipped {
    background: #f0f9ff;
    border: 2px solid #3b82f6;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: inherit;
}

.stat-collected .stat-number { color: #e74c3c; }
.stat-protected .stat-number { color: #27ae60; }
.stat-skipped .stat-number { color: #3b82f6; }

.stat-label {
    display: block;
    font-size: 0.9rem;
    margin-top: 5px;
    opacity: 0.8;
}

.summary-message {
    text-align: center;
    font-style: italic;
    color: #6b7280;
    margin-top: 15px;
}

/* Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 15px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    border-top: 3px solid #3498db;
}

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

.cookie-banner-text h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
}

.cookie-banner-text p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.cookie-banner-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
    margin: 0;
}

@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .cookie-banner-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* External Features Styling */
.external-features {
    margin: 15px 0;
}

.external-feature {
    background: rgba(255, 193, 7, 0.1);
    border-left: 4px solid #ffc107;
    padding: 12px;
    margin: 10px 0;
    border-radius: 4px;
}

.external-feature h4 {
    margin: 0 0 8px 0;
    color: #e67e22;
}

.external-feature p {
    margin: 5px 0;
    font-size: 14px;
}

.external-feature small {
    color: #666;
    font-style: italic;
}

.external-controls {
    margin-top: 15px;
    text-align: center;
}

.external-controls .btn {
    margin: 0 5px;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.debug-info {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
    text-align: center;
}

.debug-info small {
    color: #888;
    font-family: monospace;
}

/* External Consent Banner - Persistent Bottom Banner */
.external-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border-top: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    animation: bannerSlideUp 0.4s ease-out;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.external-consent-banner.minimized {
    transform: translateY(calc(100% - 50px));
}

@keyframes bannerSlideUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.banner-text {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.banner-icon {
    font-size: 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    padding: 8px;
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-message {
    font-size: 14px;
    line-height: 1.4;
}

.banner-message strong {
    color: #fff;
    margin-right: 6px;
}

.banner-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

.banner-actions .btn {
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 6px;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.banner-actions .btn-primary {
    background: rgba(34, 197, 94, 0.9);
    color: white;
    border-color: rgba(34, 197, 94, 0.3);
}

.banner-actions .btn-primary:hover {
    background: rgba(34, 197, 94, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.banner-actions .btn-ghost {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
}

.banner-actions .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

@media (max-width: 768px) {
    .banner-content {
        flex-direction: column;
        padding: 16px;
        gap: 12px;
        text-align: center;
    }

    .banner-text {
        justify-content: center;
    }

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

    .banner-actions .btn {
        flex: 1;
        max-width: 140px;
    }
}

/* External Consent Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-dialog {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

.modal-header h3 {
    margin: 0;
    color: #e67e22;
    font-size: 18px;
}

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

.modal-close:hover {
    background: #f0f0f0;
    color: #666;
}

.modal-body {
    padding: 20px;
}

.consent-service-info h4 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 16px;
}

.consent-service-info p {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 14px;
}

.consent-warning,
.consent-recipient,
.consent-purpose,
.consent-privacy-impact {
    margin: 15px 0;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #e67e22;
}

.consent-warning {
    background: #fff3cd;
    border-left-color: #ffc107;
}

.consent-recipient {
    background: #d1ecf1;
    border-left-color: #17a2b8;
}

.consent-purpose {
    background: #d4edda;
    border-left-color: #28a745;
}

.consent-privacy-impact {
    background: #f8d7da;
    border-left-color: #dc3545;
}

.consent-warning strong,
.consent-recipient strong,
.consent-purpose strong,
.consent-privacy-impact strong {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

.consent-warning p,
.consent-recipient p,
.consent-purpose p,
.consent-privacy-impact p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

.modal-footer {
    padding: 15px 20px 20px 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    border-top: 1px solid #eee;
}

.btn-primary {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.btn-primary:hover {
    background: #218838;
    border-color: #1e7e34;
}

.btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    border-color: #545b62;
}

@media (max-width: 768px) {
    .modal-dialog {
        margin: 20px;
        width: calc(100% - 40px);
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
        margin: 0;
    }
}

/* Cookie Settings Modal */
.cookie-consent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.cookie-consent-dialog {
    background: white;
    border-radius: 15px;
    padding: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeInScale 0.3s ease-out;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.cookie-consent-title {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cookie-options {
    margin: 15px 0;
    flex: 1;
    overflow-y: auto;
}

.cookie-option {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    margin: 8px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cookie-option:hover {
    border-color: #667eea;
    background: #f0f2ff;
}

.cookie-option.selected {
    border-color: #667eea;
    background: #e8f0fe;
}

.cookie-option h4 {
    margin: 0 0 5px 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-option p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* Cookie Categories */
.cookie-category {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
}

.cookie-category-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.cookie-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 12px;
    font-size: 1rem;
}

.cookie-toggle input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: #ccc;
    border-radius: 24px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.cookie-toggle input:checked + .toggle-slider {
    background: #27ae60;
}

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

.cookie-toggle input:disabled + .toggle-slider {
    background: #667eea;
    opacity: 0.7;
    cursor: not-allowed;
}

.cookie-toggle input:disabled + .toggle-slider.essential::before {
    background: #f8f9fa;
}

.cookie-category details {
    margin-top: 10px;
}

.cookie-category summary {
    cursor: pointer;
    color: #667eea;
    font-size: 0.9rem;
    padding: 5px 0;
}

.cookie-category details ul {
    margin: 10px 0 0 20px;
    font-size: 0.85rem;
    color: #666;
}

.cookie-category details li {
    margin: 5px 0;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
    flex-shrink: 0;
    padding-top: 15px;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}

.cookie-buttons .btn {
    flex: 1;
    min-width: 120px;
    max-width: 150px;
    padding: 10px;
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .cookie-buttons .btn {
        flex: 1 1 100%;
        max-width: none;
        margin: 2px 0;
    }
}

.btn-cookie-accept {
    background: #27ae60;
    color: white;
}

.btn-cookie-accept:hover {
    background: #229954;
}

.btn-cookie-decline {
    background: #e74c3c;
    color: white;
}

.btn-cookie-decline:hover {
    background: #c0392b;
}

.btn-cookie-custom {
    background: #667eea;
    color: white;
}

.btn-cookie-custom:hover {
    background: #5a6fd8;
}

/* Footer */
.footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 40px;
    padding: 20px;
}

/* Data Category Display Styles */
.data-category {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #667eea;
}

.data-category-essential {
    border-left-color: #27ae60;
}

.data-category-functional {
    border-left-color: #3498db;
}

.data-category-analytics {
    border-left-color: #f39c12;
}

.data-category-marketing {
    border-left-color: #e74c3c;
}

.data-category h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.data-points {
    display: grid;
    gap: 15px;
}

.data-point {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.data-point:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.data-point h4 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1rem;
    font-weight: 600;
}

.data-point .data-content {
    color: #495057;
    font-size: 0.9rem;
    line-height: 1.5;
}

.data-point .data-content strong {
    color: #2c3e50;
    display: inline-block;
    min-width: 120px;
}

.data-point-failed {
    background: #f8f9fa;
    border-color: #28a745;
    color: #155724;
}

.data-point-failed .data-content {
    color: #155724;
    font-weight: 500;
}

.collection-summary {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.collection-summary small {
    color: #6c757d;
    font-size: 0.85rem;
}