/**
 * Geo Redirect IoT - Popup Styles
 */

.georedirect-iot-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-width: 350px;
    min-width: 300px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 24px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.georedirect-iot-popup.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.georedirect-iot-popup.hide {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
}

.georedirect-iot-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    border: none;
    background: #ffffff;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 20px;
    line-height: 1;
    transition: color 0.2s ease, background-color 0.2s ease;
    border-radius: 4px;
    z-index: 10;
}

.georedirect-iot-popup-close:hover {
    color: #000;
    background: rgba(0, 0, 0, 0.05);
}

.georedirect-iot-popup-close:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.georedirect-iot-popup-content {
    margin-bottom: 16px;
    padding-right: 30px; /* Add padding to prevent text from overlapping close button */
}

.georedirect-iot-popup-text {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: #333;
}

.georedirect-iot-popup-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.georedirect-iot-popup-button {
    display: inline-block;
    padding: 10px 20px;
    background: #0073aa;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease, transform 0.1s ease;
    border: none;
    cursor: pointer;
    flex: 1;
    text-align: center;
}

.georedirect-iot-popup-button:hover {
    background: #005a87;
    transform: translateY(-1px);
    color: #ffffff;
}

.georedirect-iot-popup-button:active {
    transform: translateY(0);
}

.georedirect-iot-popup-button:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.georedirect-iot-popup-dismiss {
    padding: 10px 16px;
    background: transparent;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.georedirect-iot-popup-dismiss:hover {
    background: #f5f5f5;
    border-color: #bbb;
    color: #333;
}

/* Hide popup on mobile devices */
@media (max-width: 768px) {
    .georedirect-iot-popup {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
}

@media (max-width: 480px) {
    .georedirect-iot-popup {
        padding: 20px;
    }
    
    .georedirect-iot-popup-text {
        font-size: 14px;
    }
    
    .georedirect-iot-popup-button,
    .georedirect-iot-popup-dismiss {
        font-size: 13px;
        padding: 9px 16px;
    }
}

/* Animation for slide in from bottom right */
@keyframes georedirectSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes georedirectSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
}

/* Accessibility: Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .georedirect-iot-popup {
        transition: opacity 0.1s ease;
    }
    
    .georedirect-iot-popup.show {
        transform: none;
    }
    
    .georedirect-iot-popup.hide {
        transform: none;
    }
}

