/* Arnet GDPR Complaint - Frontend Styles */

/* Base notice styles */
.agc-notice {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    box-sizing: border-box;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    opacity: 1;
    visibility: visible;
}

.agc-notice * {
    box-sizing: border-box;
}

.agc-notice.agc-notice-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Notice container */
.agc-notice-container {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    max-width: 100%;
}

/* Notice content */
.agc-notice-content {
    flex: 1;
    min-width: 0;
}

.agc-notice-message {
    margin: 0 0 15px 0;
}

.agc-notice-message p {
    margin: 0 0 10px 0;
}

.agc-notice-message p:last-child {
    margin-bottom: 0;
}

/* Notice buttons */
.agc-notice-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.agc-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--agc-button-bg, #007cba);
    color: var(--agc-button-color, #ffffff);
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.agc-btn:hover,
.agc-btn:focus {
    background-color: var(--agc-button-bg, #005a87);
    color: var(--agc-button-color, #ffffff);
    text-decoration: none;
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.3);
}

.agc-btn-decline {
    background-color: #6c757d;
    color: #ffffff;
}

.agc-btn-decline:hover,
.agc-btn-decline:focus {
    background-color: #545b62;
}

.agc-btn-more-info {
    background-color: transparent;
    color: var(--agc-button-bg, #007cba);
    border: 1px solid var(--agc-button-bg, #007cba);
}

.agc-btn-more-info:hover,
.agc-btn-more-info:focus {
    background-color: var(--agc-button-bg, #007cba);
    color: var(--agc-button-color, #ffffff);
}

/* Close button */
.agc-notice-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    padding: 5px;
    border-radius: 2px;
    transition: opacity 0.2s ease;
}

.agc-notice-close:hover,
.agc-notice-close:focus {
    opacity: 1;
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

/* Banner notice styles */
.agc-notice-banner {
    left: 0;
    right: 0;
    width: 100%;
}

.agc-notice-banner.agc-notice-footer {
    bottom: 0;
}

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

/* Floating box notice styles */
.agc-notice-box {
    max-width: 400px;
    border-radius: 8px;
    margin: 20px;
}

.agc-notice-box.agc-notice-bottom-left {
    bottom: 0;
    left: 0;
}

.agc-notice-box.agc-notice-bottom-right {
    bottom: 0;
    right: 0;
}

.agc-notice-box .agc-notice-container {
    padding: 20px;
}

.agc-notice-box .agc-notice-buttons {
    flex-direction: column;
}

.agc-notice-box .agc-btn {
    text-align: center;
    justify-content: center;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .agc-notice {
        font-size: 13px;
    }
    
    .agc-notice-banner .agc-notice-container {
        padding: 15px;
        flex-direction: column;
        text-align: center;
    }
    
    .agc-notice-box {
        max-width: calc(100vw - 20px);
        margin: 10px;
    }
    
    .agc-notice-box.agc-notice-bottom-left,
    .agc-notice-box.agc-notice-bottom-right {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }
    
    .agc-notice-buttons {
        flex-direction: column;
        gap: 8px;
        margin-top: 10px;
    }
    
    .agc-btn {
        padding: 12px 16px;
        font-size: 14px;
        text-align: center;
        width: 100%;
        min-height: 44px; /* Touch-friendly size */
    }
    
    .agc-notice-container {
        gap: 10px;
        padding: 15px;
    }
    
    .agc-notice-close {
        position: absolute;
        top: 8px;
        right: 8px;
        padding: 8px;
        min-width: 32px;
        min-height: 32px;
    }
}

@media (max-width: 480px) {
    .agc-notice {
        font-size: 12px;
    }
    
    .agc-notice-banner .agc-notice-container {
        padding: 12px;
    }
    
    .agc-notice-close {
        top: 8px;
        right: 8px;
        font-size: 16px;
    }
}

/* Accessibility improvements */
.agc-notice:focus-within {
    outline: 2px solid #005fcc;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .agc-notice,
    .agc-btn,
    .agc-notice-close {
        transition: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .agc-notice {
        border: 2px solid currentColor;
    }
    
    .agc-btn {
        border: 2px solid currentColor;
    }
}

/* Print styles */
@media print {
    .agc-notice {
        display: none !important;
    }
}

/* Animation for showing/hiding notice */
@keyframes agc-slide-up {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes agc-fade-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes agc-slide-out {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

.agc-notice-banner {
    animation: agc-slide-up 0.3s ease-out;
}

.agc-notice-box {
    animation: agc-fade-in 0.3s ease-out;
}

.agc-notice-hidden.agc-notice-banner {
    animation: agc-slide-out 0.3s ease-in;
}

.agc-notice-hidden.agc-notice-box {
    animation: agc-fade-in 0.3s ease-in reverse;
}

/* Enhanced touch support */
@media (hover: none) and (pointer: coarse) {
    .agc-btn {
        min-height: 48px;
        padding: 12px 20px;
        font-size: 16px;
    }
    
    .agc-notice-close {
        min-width: 48px;
        min-height: 48px;
        font-size: 20px;
    }
}

/* Tablet responsive styles */
@media (min-width: 481px) and (max-width: 768px) {
    .agc-notice-banner .agc-notice-container {
        flex-direction: row;
        align-items: center;
    }
    
    .agc-notice-buttons {
        flex-direction: row;
        justify-content: flex-end;
        margin-top: 0;
        margin-left: 15px;
    }
    
    .agc-btn {
        min-width: auto;
        width: auto;
    }
}

/* Large screen optimizations */
@media (min-width: 1200px) {
    .agc-notice-banner .agc-notice-container {
        padding: 25px 30px;
    }
    
    .agc-notice-box {
        max-width: 450px;
    }
}

/* Loading state */
.agc-notice-loading .agc-btn {
    pointer-events: none;
    opacity: 0.6;
}

.agc-notice-loading .agc-btn::after {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: agc-spin 1s linear infinite;
}

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