/* ============================================
   RandomT Cookie Banner - v1.0
   Modern, responsive & accessible
   ============================================ */

/* Banner Container */
.randomt-cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 99999;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Posição Top */
.randomt-cookie-banner-top {
    top: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Posição Bottom */
.randomt-cookie-banner-bottom {
    bottom: 0;
}

/* Container Interior */
.randomt-cookie-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

/* Content Area */
.randomt-cookie-content {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    flex: 1;
    color: #ffffff;
}

/* Cookie Icon */
.randomt-cookie-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    backdrop-filter: blur(10px);
}

.randomt-cookie-icon svg {
    width: 24px;
    height: 24px;
    color: #ffffff;
    animation: cookiePulse 2s ease-in-out infinite;
}

/* Text Area */
.randomt-cookie-text {
    flex: 1;
}

.randomt-cookie-text p {
    margin: 0 0 8px 0;
    font-size: 15px;
    line-height: 1.6;
    color: #ffffff;
    font-weight: 400;
}

/* Privacy Link */
.randomt-cookie-privacy-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #ffffff;
    text-decoration: underline;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.randomt-cookie-privacy-link:hover {
    opacity: 1;
    text-decoration: none;
}

/* Actions Area */
.randomt-cookie-actions {
    flex-shrink: 0;
}

/* Accept Button */
.randomt-cookie-btn-accept {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    background: #ffffff;
    color: #667eea;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    min-width: 140px;
}

.randomt-cookie-btn-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: #f8f9fa;
}

.randomt-cookie-btn-accept:active {
    transform: translateY(0);
}

/* Hide Animation */
.randomt-cookie-banner.randomt-cookie-hidden {
    animation: slideOut 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

/* ============================================
   Animations
   ============================================ */

@keyframes slideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

@keyframes cookiePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Top Position Animations */
.randomt-cookie-banner-top {
    animation-name: slideInTop;
}

.randomt-cookie-banner-top.randomt-cookie-hidden {
    animation-name: slideOutTop;
}

@keyframes slideInTop {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutTop {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

/* ============================================
   Responsive Design
   ============================================ */

/* Tablets */
@media (max-width: 992px) {
    .randomt-cookie-container {
        padding: 18px 25px;
        gap: 20px;
    }
    
    .randomt-cookie-text p {
        font-size: 14px;
    }
    
    .randomt-cookie-btn-accept {
        padding: 10px 24px;
        font-size: 14px;
        min-width: 120px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .randomt-cookie-container {
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        text-align: center;
    }
    
    .randomt-cookie-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .randomt-cookie-icon {
        width: 50px;
        height: 50px;
    }
    
    .randomt-cookie-text p {
        font-size: 14px;
        line-height: 1.5;
    }
    
    .randomt-cookie-actions {
        width: 100%;
    }
    
    .randomt-cookie-btn-accept {
        width: 100%;
        padding: 14px 20px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .randomt-cookie-container {
        padding: 15px;
    }
    
    .randomt-cookie-text p {
        font-size: 13px;
    }
    
    .randomt-cookie-privacy-link {
        font-size: 13px;
    }
}

/* ============================================
   RTL Support (Arabic, Hebrew)
   ============================================ */

[dir="rtl"] .randomt-cookie-content {
    flex-direction: row-reverse;
}

[dir="rtl"] .randomt-cookie-privacy-link {
    flex-direction: row-reverse;
}

/* ============================================
   Accessibility
   ============================================ */

/* Focus States */
.randomt-cookie-btn-accept:focus {
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.randomt-cookie-privacy-link:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .randomt-cookie-banner,
    .randomt-cookie-icon svg,
    .randomt-cookie-btn-accept,
    .randomt-cookie-privacy-link {
        animation: none !important;
        transition: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .randomt-cookie-banner {
        background: #000000;
        border-top: 2px solid #ffffff;
    }
    
    .randomt-cookie-btn-accept {
        border: 2px solid #000000;
    }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .randomt-cookie-banner {
        display: none !important;
    }
}

/* ============================================
   Powered by RandomT (Branding)
   ============================================ */

.randomt-cookie-links {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.randomt-cookie-powered {
    display: inline-block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    white-space: nowrap;
}

.randomt-cookie-powered a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.randomt-cookie-powered a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Mobile - Stack vertically */
@media (max-width: 768px) {
    .randomt-cookie-links {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }
}